Constraints UI Tweak:
Experimental tweak for the "Object Constraints" tab so that it now shows a warning message instead of the "Add Constraints" button when the active object is in Pose Mode. Hopefully this will further alleviate any confusion over Object vs Bone level constraints. Todo: While coding this, I noticed that we currently don't have any way of making help-text labels in UI panels which can span multiple lines (word-wrapped or manually split). Probably not a critical issue, but it would be nice for completeness...
This commit is contained in:
@@ -704,7 +704,7 @@ class ConstraintButtonsPanel():
|
|||||||
col.prop(con, "rotation_range", text="Pivot When")
|
col.prop(con, "rotation_range", text="Pivot When")
|
||||||
|
|
||||||
def SCRIPT(self, context, layout, con):
|
def SCRIPT(self, context, layout, con):
|
||||||
layout.label("blender 2.5 has no py-constraints")
|
layout.label("Blender 2.5 has no py-constraints")
|
||||||
|
|
||||||
|
|
||||||
class OBJECT_PT_constraints(ConstraintButtonsPanel, bpy.types.Panel):
|
class OBJECT_PT_constraints(ConstraintButtonsPanel, bpy.types.Panel):
|
||||||
@@ -720,6 +720,11 @@ class OBJECT_PT_constraints(ConstraintButtonsPanel, bpy.types.Panel):
|
|||||||
|
|
||||||
ob = context.object
|
ob = context.object
|
||||||
|
|
||||||
|
if ob.mode == 'POSE':
|
||||||
|
box = layout.box()
|
||||||
|
box.red_alert = True;
|
||||||
|
box.label(icon='INFO', text="See Bone Constraints tab to Add Constraints to active bone")
|
||||||
|
else:
|
||||||
layout.operator_menu_enum("object.constraint_add", "type")
|
layout.operator_menu_enum("object.constraint_add", "type")
|
||||||
|
|
||||||
for con in ob.constraints:
|
for con in ob.constraints:
|
||||||
|
|||||||
Reference in New Issue
Block a user