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
This commit is contained in:
@@ -119,21 +119,28 @@ class BONE_PT_transform_locks(BoneButtonsPanel, Panel):
|
|||||||
bone = context.bone
|
bone = context.bone
|
||||||
pchan = ob.pose.bones[bone.name]
|
pchan = ob.pose.bones[bone.name]
|
||||||
|
|
||||||
row = layout.row()
|
split = layout.split(percentage=0.1)
|
||||||
col = row.column()
|
|
||||||
col.prop(pchan, "lock_location")
|
col = split.column(align=True)
|
||||||
col.active = not (bone.parent and bone.use_connect)
|
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'}:
|
if pchan.rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
|
||||||
col.prop(pchan, "lock_rotations_4d", text="Lock Rotation")
|
row = layout.row()
|
||||||
if pchan.lock_rotations_4d:
|
row.prop(pchan, "lock_rotations_4d", text="Lock Rotation")
|
||||||
col.prop(pchan, "lock_rotation_w", text="W")
|
|
||||||
col.prop(pchan, "lock_rotation", text="")
|
sub = row.row()
|
||||||
else:
|
sub.active = pchan.lock_rotations_4d
|
||||||
col.prop(pchan, "lock_rotation", text="Rotation")
|
sub.prop(pchan, "lock_rotation_w", text="W")
|
||||||
|
|
||||||
row.column().prop(pchan, "lock_scale")
|
|
||||||
|
|
||||||
|
|
||||||
class BONE_PT_relations(BoneButtonsPanel, Panel):
|
class BONE_PT_relations(BoneButtonsPanel, Panel):
|
||||||
|
@@ -104,21 +104,26 @@ class OBJECT_PT_transform_locks(ObjectButtonsPanel, Panel):
|
|||||||
|
|
||||||
ob = context.object
|
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'}:
|
if ob.rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
|
||||||
col.prop(ob, "lock_rotations_4d", text="Rotation")
|
row = layout.row()
|
||||||
if ob.lock_rotations_4d:
|
row.prop(ob, "lock_rotations_4d", text="Lock Rotation")
|
||||||
col.prop(ob, "lock_rotation_w", text="W")
|
|
||||||
col.prop(ob, "lock_rotation", text="")
|
sub = row.row()
|
||||||
else:
|
sub.active = ob.lock_rotations_4d
|
||||||
col.prop(ob, "lock_rotation", text="Rotation")
|
sub.prop(ob, "lock_rotation_w", text="W")
|
||||||
|
|
||||||
row.column().prop(ob, "lock_scale", text="Scale")
|
|
||||||
|
|
||||||
|
|
||||||
class OBJECT_PT_relations(ObjectButtonsPanel, Panel):
|
class OBJECT_PT_relations(ObjectButtonsPanel, Panel):
|
||||||
|
Reference in New Issue
Block a user