diff options
author | Thomas Dinges <blender@dingto.org> | 2012-06-06 22:11:12 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2012-06-06 22:11:12 +0400 |
commit | 023fba473546ad1975f03a7490a3829286e82f03 (patch) | |
tree | 697f5ff673e2029c55df2ead1244f94972ca0927 /release | |
parent | b53b03ac1c9bbc194c2ac1f255f8017f1a78bdd2 (diff) |
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
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_data_bone.py | 33 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_object.py | 31 |
2 files changed, 38 insertions, 26 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_bone.py b/release/scripts/startup/bl_ui/properties_data_bone.py index 11524cf9c03..0f09893647a 100644 --- a/release/scripts/startup/bl_ui/properties_data_bone.py +++ b/release/scripts/startup/bl_ui/properties_data_bone.py @@ -119,21 +119,28 @@ class BONE_PT_transform_locks(BoneButtonsPanel, Panel): 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.column().prop(pchan, "lock_scale") + 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") class BONE_PT_relations(BoneButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py index 4f3ca26725c..87c62e2791f 100644 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@ -104,21 +104,26 @@ class OBJECT_PT_transform_locks(ObjectButtonsPanel, Panel): ob = context.object - row = layout.row() - - col = row.column() - col.prop(ob, "lock_location", text="Location") + 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() 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.column().prop(ob, "lock_scale", text="Scale") + 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") class OBJECT_PT_relations(ObjectButtonsPanel, Panel): |