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/faces/super_face.py
parent49230a4c122013bf851ab37b029e7d4f624d68ad (diff)
Rigify 0.5: new features, Animation Tools and Quat/Euler converter
small fixes & UI improvements
Diffstat (limited to 'rigify/rigs/faces/super_face.py')
-rw-r--r--rigify/rigs/faces/super_face.py60
1 files changed, 37 insertions, 23 deletions
diff --git a/rigify/rigs/faces/super_face.py b/rigify/rigs/faces/super_face.py
index f5121f90..dcdb1093 100644
--- a/rigify/rigs/faces/super_face.py
+++ b/rigify/rigs/faces/super_face.py
@@ -1031,26 +1031,26 @@ def add_parameters(params):
RigifyParameters PropertyGroup
"""
- #Setting up extra layers for the tweak bones
+ # Setting up extra layers for the tweak bones
params.primary_layers_extra = bpy.props.BoolProperty(
- name = "primary_layers_extra",
- default = True,
- description = ""
+ name="primary_layers_extra",
+ default=True,
+ description=""
)
params.primary_layers = bpy.props.BoolVectorProperty(
- size = 32,
- description = "Layers for the 1st tweak controls to be on",
- default = tuple( [ i == 1 for i in range(0, 32) ] )
+ size=32,
+ description="Layers for the 1st tweak controls to be on",
+ default=tuple([i == 1 for i in range(0, 32)])
)
params.secondary_layers_extra = bpy.props.BoolProperty(
- name = "secondary_layers_extra",
- default = True,
- description = ""
+ name="secondary_layers_extra",
+ default=True,
+ description=""
)
params.secondary_layers = bpy.props.BoolVectorProperty(
- size = 32,
- description = "Layers for the 2nd tweak controls to be on",
- default = tuple( [ i == 1 for i in range(0, 32) ] )
+ size=32,
+ description="Layers for the 2nd tweak controls to be on",
+ default=tuple([i == 1 for i in range(0, 32)])
)
@@ -1058,29 +1058,43 @@ def parameters_ui(layout, params):
""" Create the ui for the rig parameters."""
layers = ["primary_layers", "secondary_layers"]
+ bone_layers = bpy.context.active_pose_bone.bone.layers[:]
+
for layer in layers:
r = layout.row()
r.prop( params, layer + "_extra" )
r.active = getattr( params, layer + "_extra" )
-
+
col = r.column(align=True)
row = col.row(align=True)
for i in range(8):
- row.prop(params, layer, index=i, toggle=True, text="")
+ icon = "NONE"
+ if bone_layers[i]:
+ icon = "LAYER_ACTIVE"
+ row.prop(params, layer, index=i, toggle=True, text="", icon=icon)
row = col.row(align=True)
- for i in range(16,24):
- row.prop(params, layer, index=i, toggle=True, text="")
-
+ for i in range(16, 24):
+ icon = "NONE"
+ if bone_layers[i]:
+ icon = "LAYER_ACTIVE"
+ row.prop(params, layer, index=i, toggle=True, text="", icon=icon)
+
col = r.column(align=True)
row = col.row(align=True)
-
- for i in range(8,16):
- row.prop(params, layer, index=i, toggle=True, text="")
+
+ for i in range(8, 16):
+ icon = "NONE"
+ if bone_layers[i]:
+ icon = "LAYER_ACTIVE"
+ row.prop(params, layer, index=i, toggle=True, text="", icon=icon)
row = col.row(align=True)
- for i in range(24,32):
- row.prop(params, layer, index=i, toggle=True, text="")
+ for i in range(24, 32):
+ icon = "NONE"
+ if bone_layers[i]:
+ icon = "LAYER_ACTIVE"
+ row.prop(params, layer, index=i, toggle=True, text="", icon=icon)
def create_sample(obj):