[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34017] trunk/blender/release/scripts/ui/ properties_object_constraint.py: Constraints UI Tweak:
Joshua Leung
aligorith at gmail.com
Mon Jan 3 00:50:16 CET 2011
Revision: 34017
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=34017
Author: aligorith
Date: 2011-01-03 00:50:16 +0100 (Mon, 03 Jan 2011)
Log Message:
-----------
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...
Modified Paths:
--------------
trunk/blender/release/scripts/ui/properties_object_constraint.py
Modified: trunk/blender/release/scripts/ui/properties_object_constraint.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_object_constraint.py 2011-01-02 23:47:48 UTC (rev 34016)
+++ trunk/blender/release/scripts/ui/properties_object_constraint.py 2011-01-02 23:50:16 UTC (rev 34017)
@@ -704,7 +704,7 @@
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,9 +719,14 @@
layout = self.layout
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:
self.draw_constraint(context, con)
More information about the Bf-blender-cvs
mailing list