Fix #32964: IK constraint had a "Target" option, which actually is an internal
[blender.git] / release / scripts / startup / bl_ui / properties_data_bone.py
index 1e70483864ca2f5ed885913dc46c0a31f038d7f9..1441c642d513b59e3e4ea412af914060c996e9af 100644 (file)
@@ -246,72 +246,74 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel, Panel):
         row = layout.row()
         row.prop(ob.pose, "ik_solver")
 
+        active = pchan.is_in_ik_chain
+
         split = layout.split(percentage=0.25)
         split.prop(pchan, "lock_ik_x", icon='LOCKED' if pchan.lock_ik_x else 'UNLOCKED', text="X")
-        split.active = pchan.is_in_ik_chain
+        split.active = active
         row = split.row()
         row.prop(pchan, "ik_stiffness_x", text="Stiffness", slider=True)
-        row.active = pchan.lock_ik_x is False and pchan.is_in_ik_chain
+        row.active = pchan.lock_ik_x is False and active
 
         split = layout.split(percentage=0.25)
         sub = split.row()
 
         sub.prop(pchan, "use_ik_limit_x", text="Limit")
-        sub.active = pchan.lock_ik_x is False and pchan.is_in_ik_chain
+        sub.active = pchan.lock_ik_x is False and active
         sub = split.row(align=True)
         sub.prop(pchan, "ik_min_x", text="")
         sub.prop(pchan, "ik_max_x", text="")
-        sub.active = pchan.lock_ik_x is False and pchan.use_ik_limit_x and pchan.is_in_ik_chain
+        sub.active = pchan.lock_ik_x is False and pchan.use_ik_limit_x and active
 
         split = layout.split(percentage=0.25)
         split.prop(pchan, "lock_ik_y", icon='LOCKED' if pchan.lock_ik_y else 'UNLOCKED', text="Y")
-        split.active = pchan.is_in_ik_chain
+        split.active = active
         row = split.row()
         row.prop(pchan, "ik_stiffness_y", text="Stiffness", slider=True)
-        row.active = pchan.lock_ik_y is False and pchan.is_in_ik_chain
+        row.active = pchan.lock_ik_y is False and active
 
         split = layout.split(percentage=0.25)
         sub = split.row()
 
         sub.prop(pchan, "use_ik_limit_y", text="Limit")
-        sub.active = pchan.lock_ik_y is False and pchan.is_in_ik_chain
+        sub.active = pchan.lock_ik_y is False and active
 
         sub = split.row(align=True)
         sub.prop(pchan, "ik_min_y", text="")
         sub.prop(pchan, "ik_max_y", text="")
-        sub.active = pchan.lock_ik_y is False and pchan.use_ik_limit_y and pchan.is_in_ik_chain
+        sub.active = pchan.lock_ik_y is False and pchan.use_ik_limit_y and active
 
         split = layout.split(percentage=0.25)
         split.prop(pchan, "lock_ik_z", icon='LOCKED' if pchan.lock_ik_z else 'UNLOCKED', text="Z")
-        split.active = pchan.is_in_ik_chain
+        split.active = active
         sub = split.row()
         sub.prop(pchan, "ik_stiffness_z", text="Stiffness", slider=True)
-        sub.active = pchan.lock_ik_z is False and pchan.is_in_ik_chain
+        sub.active = pchan.lock_ik_z is False and active
 
         split = layout.split(percentage=0.25)
         sub = split.row()
 
         sub.prop(pchan, "use_ik_limit_z", text="Limit")
-        sub.active = pchan.lock_ik_z is False and pchan.is_in_ik_chain
+        sub.active = pchan.lock_ik_z is False and active
         sub = split.row(align=True)
         sub.prop(pchan, "ik_min_z", text="")
         sub.prop(pchan, "ik_max_z", text="")
-        sub.active = pchan.lock_ik_z is False and pchan.use_ik_limit_z and pchan.is_in_ik_chain
+        sub.active = pchan.lock_ik_z is False and pchan.use_ik_limit_z and active
 
         split = layout.split(percentage=0.25)
         split.label(text="Stretch:")
         sub = split.row()
         sub.prop(pchan, "ik_stretch", text="", slider=True)
-        sub.active = pchan.is_in_ik_chain
+        sub.active = active
 
         if ob.pose.ik_solver == 'ITASC':
             split = layout.split()
             col = split.column()
             col.prop(pchan, "use_ik_rotation_control", text="Control Rotation")
-            col.active = pchan.is_in_ik_chain
+            col.active = active
             col = split.column()
             col.prop(pchan, "ik_rotation_weight", text="Weight", slider=True)
-            col.active = pchan.is_in_ik_chain
+            col.active = active
             # not supported yet
             #row = layout.row()
             #row.prop(pchan, "use_ik_linear_control", text="Joint Size")