diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-12-14 17:21:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-12-14 17:21:06 +0300 |
commit | 3bf27683be8401a53c761201fcd09974a53a80b7 (patch) | |
tree | 192bfe2dcf91260939590a7c10e1fdf0901bfcb1 /release/scripts/modules/rigify/spine_pivot_flex.py | |
parent | 32d5429e353b68ed90f2e32edc48a7841a2b4138 (diff) |
automatic layer placement, users can set the layers if they want.
predefined layer types 'main', 'extra', 'ik', 'fk'
Diffstat (limited to 'release/scripts/modules/rigify/spine_pivot_flex.py')
-rw-r--r-- | release/scripts/modules/rigify/spine_pivot_flex.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/release/scripts/modules/rigify/spine_pivot_flex.py b/release/scripts/modules/rigify/spine_pivot_flex.py index 4765f0591f7..ca954eeef4f 100644 --- a/release/scripts/modules/rigify/spine_pivot_flex.py +++ b/release/scripts/modules/rigify/spine_pivot_flex.py @@ -19,6 +19,7 @@ # <pep8 compliant> import bpy +from rigify import get_layer_dict from rigify_utils import bone_class_instance, copy_bone_simple from rna_prop_ui import rna_idprop_ui_prop_get @@ -495,5 +496,20 @@ def main(obj, bone_definition, base_names, options): mod.coefficients[0] = - (i - 1) mod.coefficients[1] = spine_chain_len + + # last step setup layers + layers = get_layer_dict(options) + lay = layers["extra"] + for attr in ex.attr_names: + getattr(ex, attr + "_b").layer = lay + for attr in ex_chain.attr_names: + getattr(ex_chain, attr + "_b").layer = lay + + lay = layers["main"] + for attr in df.attr_names: + getattr(df, attr + "_b").layer = lay + for attr in rv_chain .attr_names: + getattr(rv_chain , attr + "_b").layer = lay + # no support for blending chains return None |