diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-01-31 02:48:49 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-01-31 02:48:49 +0300 |
commit | ebbd1e0b20abcb0a985649ea417e4a5becaa3d0e (patch) | |
tree | 837cb2a45c9f5ac5fe3784dd1c9b29a4d7a4d9d6 /release/scripts/ui | |
parent | 08ee31990eae2c837ea30f1542ddbee63815e1a6 (diff) |
bugfix [#20579] Context pinning error (pose mode)
Diffstat (limited to 'release/scripts/ui')
-rw-r--r-- | release/scripts/ui/properties_object_constraint.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/release/scripts/ui/properties_object_constraint.py b/release/scripts/ui/properties_object_constraint.py index 21afadfa425..372c67211c5 100644 --- a/release/scripts/ui/properties_object_constraint.py +++ b/release/scripts/ui/properties_object_constraint.py @@ -744,18 +744,14 @@ class BONE_PT_constraints(ConstraintButtonsPanel): bl_context = "bone_constraint" def poll(self, context): - ob = context.object - return (ob and ob.type == 'ARMATURE' and context.bone) + return (context.pose_bone) def draw(self, context): layout = self.layout - ob = context.object - pchan = ob.pose.bones[context.bone.name] - layout.operator_menu_enum("pose.constraint_add", "type") - for con in pchan.constraints: + for con in context.pose_bone.constraints: self.draw_constraint(context, con) bpy.types.register(OBJECT_PT_constraints) |