Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Vegdahl <cessen@cessen.com>2011-06-19 00:41:43 +0400
committerNathan Vegdahl <cessen@cessen.com>2011-06-19 00:41:43 +0400
commit1a3f4c4c6af16a3214c9dd3847590b87c580c11a (patch)
tree546eadd221be849884ac0adb00829f70fa71272c /rigify/rig_ui_template.py
parent83840e5713eaeaf3b8ec0c779d0dffe8666cd85c (diff)
Rigify: users can now specify layer names in the metarig armature properties.
The layer names are then used in creating the custom rig layer UI. This is useful for users that do not want to--or do not have the knowledge to--edit the generated python script by hand. It is also handy even for more advanced users when regerating the rig over and over (which over-writes the script and any hand-made edits). Also misc bug fixes in some of the rig types.
Diffstat (limited to 'rigify/rig_ui_template.py')
-rw-r--r--rigify/rig_ui_template.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/rigify/rig_ui_template.py b/rigify/rig_ui_template.py
index db3bb6cb..35df1ec2 100644
--- a/rigify/rig_ui_template.py
+++ b/rigify/rig_ui_template.py
@@ -493,8 +493,8 @@ class RigUI(bpy.types.Panel):
'''
-def layers_ui(layers):
- """ Turn a list of booleans into a layer UI.
+def layers_ui(layers, names):
+ """ Turn a list of booleans + a list of names into a layer UI.
"""
code = '''
@@ -522,7 +522,7 @@ class RigLayers(bpy.types.Panel):
if i == 28:
code += " row.prop(context.active_object.data, 'layers', index=%s, toggle=True, text='Root')\n" % (str(i))
else:
- code += " row.prop(context.active_object.data, 'layers', index=%s, toggle=True, text='%s')\n" % (str(i), str(i + 1))
+ code += " row.prop(context.active_object.data, 'layers', index=%s, toggle=True, text='%s')\n" % (str(i), names[i])
i += 1
return code