[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55182] trunk/blender/release/scripts/ startup/bl_ui/properties_object_constraint.py: Another attempt to reduce the confusion between Object and Bone constraints

Joshua Leung aligorith at gmail.com
Mon Mar 11 02:53:21 CET 2013


Revision: 55182
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55182
Author:   aligorith
Date:     2013-03-11 01:53:21 +0000 (Mon, 11 Mar 2013)
Log Message:
-----------
Another attempt to reduce the confusion between Object and Bone constraints

* The wording on the "Add Constraint" dropdown has been changed so that there is
no ambiguitiy about which tab is currently selected. That is, it now mentions
whether these are object or bone constraints, so that users don't need to try
and look up at the header to check.

* Show the warning about Ob vs Bone constraints when in armature editmode too.

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/properties_object_constraint.py

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_object_constraint.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_object_constraint.py	2013-03-11 01:46:22 UTC (rev 55181)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_object_constraint.py	2013-03-11 01:53:21 UTC (rev 55182)
@@ -853,12 +853,12 @@
 
         ob = context.object
 
-        if ob.mode == 'POSE':
+        if ob.type == 'ARMATURE' and ob.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")
         else:
-            layout.operator_menu_enum("object.constraint_add", "type")
+            layout.operator_menu_enum("object.constraint_add", "type", text="Add Object Constraint")
 
         for con in ob.constraints:
             self.draw_constraint(context, con)
@@ -876,7 +876,7 @@
     def draw(self, context):
         layout = self.layout
 
-        layout.operator_menu_enum("pose.constraint_add", "type")
+        layout.operator_menu_enum("pose.constraint_add", "type", text="Add Bone Constraint")
 
         for con in context.pose_bone.constraints:
             self.draw_constraint(context, con)




More information about the Bf-blender-cvs mailing list