Fix T59112: bone pinning error
authorPhilipp Oeser <info@graphics-engineer.com>
Mon, 10 Dec 2018 10:26:37 +0000 (11:26 +0100)
committerPhilipp Oeser <info@graphics-engineer.com>
Mon, 17 Dec 2018 14:13:29 +0000 (15:13 +0100)
Reviewers: angavrilov, brecht

Maniphest Tasks: T59112

Differential Revision: https://developer.blender.org/D4057

release/scripts/startup/bl_ui/properties_data_bone.py

index 781729e0594b559b7aa9effe2660596cb3b652f2..3a7f348efa57d8c92b998f3169a65e701ae9dffc 100644 (file)
@@ -128,13 +128,11 @@ class BONE_PT_curved(BoneButtonsPanel, Panel):
     def draw(self, context):
         ob = context.object
         bone = context.bone
-        # arm = context.armature
-        pchan = None
+        arm = context.armature
         bone_list = "bones"
 
         if ob and bone:
-            pchan = ob.pose.bones[bone.name]
-            bbone = pchan
+            bbone = ob.pose.bones[bone.name]
         elif bone is None:
             bone = context.edit_bone
             bbone = bone
@@ -176,14 +174,14 @@ class BONE_PT_curved(BoneButtonsPanel, Panel):
 
         col = col.column(align=True)
         col.active = (bone.bbone_handle_type_start != "AUTO")
-        col.prop_search(bone, "bbone_custom_handle_start", ob.data, bone_list, text="Custom")
+        col.prop_search(bone, "bbone_custom_handle_start", arm, bone_list, text="Custom")
 
         col = topcol.column(align=True)
         col.prop(bone, "bbone_handle_type_end", text="End Handle")
 
         col = col.column(align=True)
         col.active = (bone.bbone_handle_type_end != "AUTO")
-        col.prop_search(bone, "bbone_custom_handle_end", ob.data, bone_list, text="Custom")
+        col.prop_search(bone, "bbone_custom_handle_end", arm, bone_list, text="Custom")
 
 
 class BONE_PT_relations(BoneButtonsPanel, Panel):