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:
parent
c052a65b93
commit
6feddb8b61
Notes:
blender-bot
2023-02-14 04:39:18 +01:00
Referenced by issue #61559, Hide Object Constraints Properties when in Pose Mode
|
@ -704,7 +704,7 @@ class ConstraintButtonsPanel():
|
|||
col.prop(con, "rotation_range", text="Pivot When")
|
||||
|
||||
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):
|
||||
|
@ -719,8 +719,13 @@ class OBJECT_PT_constraints(ConstraintButtonsPanel, bpy.types.Panel):
|
|||
layout = self.layout
|
||||
|
||||
ob = context.object
|
||||
|
||||
layout.operator_menu_enum("object.constraint_add", "type")
|
||||
|
||||
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")
|
||||
|
||||
for con in ob.constraints:
|
||||
self.draw_constraint(context, con)
|
||||
|
|
Loading…
Reference in New Issue