Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_constraint.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_constraint.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py
index b47d4223372..da35ea680b8 100644
--- a/release/scripts/startup/bl_ui/properties_constraint.py
+++ b/release/scripts/startup/bl_ui/properties_constraint.py
@@ -114,11 +114,7 @@ class ConstraintButtonsPanel(Panel):
col.prop_search(con, "subtarget", con.target, "vertex_groups", text="Vertex Group")
def get_constraint(self, context):
- con = None
- if context.pose_bone:
- con = context.pose_bone.constraints[self.list_panel_index]
- else:
- con = context.object.constraints[self.list_panel_index]
+ con = self.custom_data
self.layout.context_pointer_set("constraint", con)
return con
@@ -963,11 +959,7 @@ class ConstraintButtonsSubPanel(Panel):
bl_options = {'DRAW_BOX'}
def get_constraint(self, context):
- con = None
- if context.pose_bone:
- con = context.pose_bone.constraints[self.list_panel_index]
- else:
- con = context.object.constraints[self.list_panel_index]
+ con = self.custom_data
self.layout.context_pointer_set("constraint", con)
return con