diff options
author | Nathan Vegdahl <cessen@cessen.com> | 2011-06-19 23:53:01 +0400 |
---|---|---|
committer | Nathan Vegdahl <cessen@cessen.com> | 2011-06-19 23:53:01 +0400 |
commit | 670bf72cb6978ff2f26a23bf2b5bb83b6e631e10 (patch) | |
tree | 59919e085327201bfb713be1c0451fd699790ff5 /rigify/ui.py | |
parent | 1a3f4c4c6af16a3214c9dd3847590b87c580c11a (diff) |
Rig layers can now be organized into rows by the user, for nicer layout.
Diffstat (limited to 'rigify/ui.py')
-rw-r--r-- | rigify/ui.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/rigify/ui.py b/rigify/ui.py index eafa9679..3a2e89e3 100644 --- a/rigify/ui.py +++ b/rigify/ui.py @@ -92,10 +92,6 @@ class DATA_PT_rigify_layer_names(bpy.types.Panel): def poll(cls, context): if not context.armature: return False - #obj = context.object - #if obj: - # return (obj.mode in ('POSE', 'OBJECT', 'EDIT')) - #return False return True def draw(self, context): @@ -103,9 +99,11 @@ class DATA_PT_rigify_layer_names(bpy.types.Panel): layout = self.layout obj = context.object - if len(obj.data.rigify_props) < 1: - obj.data.rigify_props.add() + # Ensure that the layers exist + for i in range(1 + len(obj.data.rigify_layers), 29): + layer = obj.data.rigify_layers.add() + # UI for i in range(28): if (i % 16) == 0: col = layout.column() @@ -117,8 +115,10 @@ class DATA_PT_rigify_layer_names(bpy.types.Panel): col = layout.column(align=True) row = col.row() row.prop(obj.data, "layers", index=i, text="", toggle=True) - row.prop(obj.data.rigify_props[0], "layer_name_%s" % str(i+1).rjust(2, "0"), text="Layer %d" % (i + 1)) - + split = row.split(percentage=0.8) + split.prop(obj.data.rigify_layers[i], "name", text="Layer %d" % (i + 1)) + split.prop(obj.data.rigify_layers[i], "row", text="") + #split.prop(obj.data.rigify_layers[i], "column", text="") class BONE_PT_rigify_buttons(bpy.types.Panel): |