diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-09-08 22:02:47 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-09-08 22:02:47 +0300 |
commit | 6f7d7c35dda1a0b3b6ec932d2c04ecd7d69bafbd (patch) | |
tree | 944410793d2680bf93f6dff37215ca76a899cfc9 | |
parent | fb23ec0c0bbfd5fcc208aa6729d42121adba9a49 (diff) |
Fix T69313: rigify crashes on custom properties without UI metadata.
Patch suggested by @pioverfour.
-rw-r--r-- | rigify/utils/bones.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/rigify/utils/bones.py b/rigify/utils/bones.py index a8e55f9a..136ece7d 100644 --- a/rigify/utils/bones.py +++ b/rigify/utils/bones.py @@ -198,10 +198,11 @@ def copy_bone(obj, bone_name, assign_name=''): and key != "rigify_parameters" \ and key != "rigify_type": prop1 = rna_idprop_ui_prop_get(pose_bone_1, key, create=False) - prop2 = rna_idprop_ui_prop_get(pose_bone_2, key, create=True) pose_bone_2[key] = pose_bone_1[key] - for key in prop1.keys(): - prop2[key] = prop1[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] bpy.ops.object.mode_set(mode='EDIT') |