[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47530] trunk/blender/release/scripts/ startup/bl_ui: Transform Locks UI:

Thomas Dinges blender at dingto.org
Wed Jun 6 20:11:24 CEST 2012


Revision: 47530
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47530
Author:   dingto
Date:     2012-06-06 18:11:12 +0000 (Wed, 06 Jun 2012)
Log Message:
-----------
Transform Locks UI:
* Some beautifying and cleanup to show X, Y, Z label.

This fixes [#31717] Transform Locks panel -> no x,y,z coordinates are displayed

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

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_data_bone.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_data_bone.py	2012-06-06 18:07:06 UTC (rev 47529)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_data_bone.py	2012-06-06 18:11:12 UTC (rev 47530)
@@ -119,23 +119,30 @@
         bone = context.bone
         pchan = ob.pose.bones[bone.name]
 
-        row = layout.row()
-        col = row.column()
-        col.prop(pchan, "lock_location")
-        col.active = not (bone.parent and bone.use_connect)
+        split = layout.split(percentage=0.1)
+        
+        col = split.column(align=True)
+        col.label(text="")
+        col.label(text="X:")
+        col.label(text="Y:")
+        col.label(text="Z:")
+        
+        col = split.row()
+        sub = col.row()
+        sub.active = not (bone.parent and bone.use_connect)
+        sub.column().prop(pchan, "lock_location", text="Location")
+        col.column().prop(pchan, "lock_rotation", text="Rotation")
+        col.column().prop(pchan, "lock_scale", text="Scale")
 
-        col = row.column()
         if pchan.rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
-            col.prop(pchan, "lock_rotations_4d", text="Lock Rotation")
-            if pchan.lock_rotations_4d:
-                col.prop(pchan, "lock_rotation_w", text="W")
-            col.prop(pchan, "lock_rotation", text="")
-        else:
-            col.prop(pchan, "lock_rotation", text="Rotation")
+            row = layout.row()
+            row.prop(pchan, "lock_rotations_4d", text="Lock Rotation")
+            
+            sub = row.row()
+            sub.active = pchan.lock_rotations_4d
+            sub.prop(pchan, "lock_rotation_w", text="W")
 
-        row.column().prop(pchan, "lock_scale")
 
-
 class BONE_PT_relations(BoneButtonsPanel, Panel):
     bl_label = "Relations"
 

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_object.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_object.py	2012-06-06 18:07:06 UTC (rev 47529)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_object.py	2012-06-06 18:11:12 UTC (rev 47530)
@@ -104,23 +104,28 @@
 
         ob = context.object
 
-        row = layout.row()
+        split = layout.split(percentage=0.1)
+        
+        col = split.column(align=True)
+        col.label(text="")
+        col.label(text="X:")
+        col.label(text="Y:")
+        col.label(text="Z:")
+        
+        col = split.row()
+        col.column().prop(ob, "lock_location", text="Location")
+        col.column().prop(ob, "lock_rotation", text="Rotation")
+        col.column().prop(ob, "lock_scale", text="Scale")
 
-        col = row.column()
-        col.prop(ob, "lock_location", text="Location")
-
-        col = row.column()
         if ob.rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
-            col.prop(ob, "lock_rotations_4d", text="Rotation")
-            if ob.lock_rotations_4d:
-                col.prop(ob, "lock_rotation_w", text="W")
-            col.prop(ob, "lock_rotation", text="")
-        else:
-            col.prop(ob, "lock_rotation", text="Rotation")
+            row = layout.row()
+            row.prop(ob, "lock_rotations_4d", text="Lock Rotation")
+            
+            sub = row.row()
+            sub.active = ob.lock_rotations_4d
+            sub.prop(ob, "lock_rotation_w", text="W")
 
-        row.column().prop(ob, "lock_scale", text="Scale")
 
-
 class OBJECT_PT_relations(ObjectButtonsPanel, Panel):
     bl_label = "Relations"
 




More information about the Bf-blender-cvs mailing list