Fix T61559: show object constraints also when in pose mode, remove warning.

This was originally added in 6feddb8b61df, but the warning is quite clumsy
and we also don't limit editing object transforms that way. The add constraint
button at the top now also indicates if it's for objects or bones, which was
not the case before and probably was part of the confusion.

If it does still cause issues we can always change back or hide the tab.
This commit is contained in:
Brecht Van Lommel 2019-03-27 15:38:29 +01:00
parent 00bdb5cdf0
commit 532536bf52

@ -974,14 +974,7 @@ class OBJECT_PT_constraints(ConstraintButtonsPanel, Panel):
obj = context.object
if obj.type == 'ARMATURE' and obj.mode == 'POSE':
box = layout.box()
box.alert = True # XXX: this should apply to the box background
box.label(icon='INFO', text="Constraints for active bone do not live here")
box.operator("wm.properties_context_change", icon='CONSTRAINT_BONE',
text="Go to Bone Constraints tab...").context = 'BONE_CONSTRAINT'
else:
layout.operator_menu_enum("object.constraint_add", "type", text="Add Object Constraint")
layout.operator_menu_enum("object.constraint_add", "type", text="Add Object Constraint")
for con in obj.constraints:
self.draw_constraint(context, con)