[Bf-blender-cvs] [0dd52d1] master: UI Tweak: Add a convenience button for switching to Bone Constraints Tab

Joshua Leung noreply at git.blender.org
Fri Mar 14 23:48:34 CET 2014


Commit: 0dd52d1b2671c2f91d16e7faa8a3b1ae5bd46f34
Author: Joshua Leung
Date:   Mon Mar 10 16:56:31 2014 +1300
https://developer.blender.org/rB0dd52d1b2671c2f91d16e7faa8a3b1ae5bd46f34

UI Tweak: Add a convenience button for switching to Bone Constraints Tab

To reduce user confusion, we were already presenting users with an error message
when they tried to edit constraints for bones from the Object Constraints tab.
This commit just makes things more convenient by adding a button which takes
users to the right tab when clicked.

===================================================================

M	release/scripts/startup/bl_ui/properties_constraint.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py
index 4ad178b..6076989 100644
--- a/release/scripts/startup/bl_ui/properties_constraint.py
+++ b/release/scripts/startup/bl_ui/properties_constraint.py
@@ -858,8 +858,9 @@ class OBJECT_PT_constraints(ConstraintButtonsPanel, Panel):
 
         if obj.type == 'ARMATURE' and obj.mode in {'EDIT', 'POSE'}:
             box = layout.box()
-            box.alert = True
-            box.label(icon='INFO', text="See Bone Constraints tab to Add Constraints to active bone")
+            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")




More information about the Bf-blender-cvs mailing list