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:
authorLucio Rossi <lucio.rossi75@gmail.com>2017-07-24 19:14:16 +0300
committerLucio Rossi <lucio.rossi75@gmail.com>2017-07-24 19:14:30 +0300
commit33b0e2e9025965133656dd85506bbef62ca3183d (patch)
tree52f2368a79623272cadf64a9c1ca3ac209176231 /rigify/rigs/limbs/simple_tentacle.py
parent49230a4c122013bf851ab37b029e7d4f624d68ad (diff)
Rigify 0.5: new features, Animation Tools and Quat/Euler converter
small fixes & UI improvements
Diffstat (limited to 'rigify/rigs/limbs/simple_tentacle.py')
-rw-r--r--rigify/rigs/limbs/simple_tentacle.py32
1 files changed, 23 insertions, 9 deletions
diff --git a/rigify/rigs/limbs/simple_tentacle.py b/rigify/rigs/limbs/simple_tentacle.py
index d8ca1bf9..310ed7ab 100644
--- a/rigify/rigs/limbs/simple_tentacle.py
+++ b/rigify/rigs/limbs/simple_tentacle.py
@@ -249,7 +249,7 @@ def parameters_ui(layout, params):
r = layout.row()
col = r.column(align=True)
row = col.row(align=True)
- for i,axis in enumerate( [ 'x', 'y', 'z' ] ):
+ for i, axis in enumerate(['x', 'y', 'z']):
row.prop(params, "copy_rotation_axes", index=i, toggle=True, text=axis)
r = layout.row()
@@ -259,24 +259,38 @@ def parameters_ui(layout, params):
col = r.column(align=True)
row = col.row(align=True)
- for i in range( 8 ): # Layers 0-7
- row.prop(params, "tweak_layers", index=i, toggle=True, text="")
+ bone_layers = bpy.context.active_pose_bone.bone.layers[:]
- row = col.row(align=True)
+ for i in range(8): # Layers 0-7
+ icon = "NONE"
+ if bone_layers[i]:
+ icon = "LAYER_ACTIVE"
+ row.prop(params, "tweak_layers", index=i, toggle=True, text="", icon=icon)
- for i in range( 16, 24 ): # Layers 16-23
- row.prop(params, "tweak_layers", index=i, toggle=True, text="")
+ row = col.row(align=True)
+ for i in range(16, 24): # Layers 16-23
+ icon = "NONE"
+ if bone_layers[i]:
+ icon = "LAYER_ACTIVE"
+ row.prop(params, "tweak_layers", index=i, toggle=True, text="", icon=icon)
+
col = r.column(align=True)
row = col.row(align=True)
- for i in range( 8, 16 ): # Layers 8-15
- row.prop(params, "tweak_layers", index=i, toggle=True, text="")
+ for i in range(8, 16): # Layers 8-15
+ icon = "NONE"
+ if bone_layers[i]:
+ icon = "LAYER_ACTIVE"
+ row.prop(params, "tweak_layers", index=i, toggle=True, text="", icon=icon)
row = col.row(align=True)
for i in range( 24, 32 ): # Layers 24-31
- row.prop(params, "tweak_layers", index=i, toggle=True, text="")
+ icon = "NONE"
+ if bone_layers[i]:
+ icon = "LAYER_ACTIVE"
+ row.prop(params, "tweak_layers", index=i, toggle=True, text="", icon=icon)
def create_sample(obj):