diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2020-12-21 12:29:17 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2020-12-21 15:23:04 +0300 |
commit | 1ada831ca1981c028a0a2b2983c0c384b2656ea5 (patch) | |
tree | 564f3ecb31458d29014903e495baa2512633c415 /rigify/utils/bones.py | |
parent | a7c0667baa646896d676ad154c66aed914cc560c (diff) |
Rigify: generate UI script for custom properties from metarig.
Improve auto-generated UI naming and update basic.pivot, basic.raw_copy
and basic.super_copy. Also allow raw_copy to generate builtin widgets.
Diffstat (limited to 'rigify/utils/bones.py')
-rw-r--r-- | rigify/utils/bones.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/rigify/utils/bones.py b/rigify/utils/bones.py index 659afeae..0142922c 100644 --- a/rigify/utils/bones.py +++ b/rigify/utils/bones.py @@ -196,16 +196,9 @@ def copy_bone_properties(obj, bone_name_1, bone_name_2, transforms=True, props=T # Copy custom properties if props: - for key in pose_bone_1.keys(): - if key != "_RNA_UI" \ - and key != "rigify_parameters" \ - and key != "rigify_type": - prop1 = rna_idprop_ui_prop_get(pose_bone_1, key, create=False) - pose_bone_2[key] = pose_bone_1[key] - if prop1 is not None: - prop2 = rna_idprop_ui_prop_get(pose_bone_2, key, create=True) - for key in prop1.keys(): - prop2[key] = prop1[key] + from .mechanism import copy_custom_properties + + copy_custom_properties(pose_bone_1, pose_bone_2) if widget: pose_bone_2.custom_shape = pose_bone_1.custom_shape |