Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2011-01-03 02:50:16 +0300
committerJoshua Leung <aligorith@gmail.com>2011-01-03 02:50:16 +0300
commit6feddb8b61df5e85d45a126baf7562d32635f989 (patch)
tree6bf3dce55f126ff0cb9453ddb937b6de7520bbba /release
parentc052a65b93cf213edda5629ee916d9920b411fbd (diff)
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...
Diffstat (limited to 'release')
-rw-r--r--release/scripts/ui/properties_object_constraint.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/release/scripts/ui/properties_object_constraint.py b/release/scripts/ui/properties_object_constraint.py
index ea8e08fd390..4c3544fa48a 100644
--- a/release/scripts/ui/properties_object_constraint.py
+++ b/release/scripts/ui/properties_object_constraint.py
@@ -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)