diff options
author | William Reynish <william@reynish.com> | 2009-10-03 15:19:14 +0400 |
---|---|---|
committer | William Reynish <william@reynish.com> | 2009-10-03 15:19:14 +0400 |
commit | 2cbf21b58243e2ce14a1b00c7a422a6245c00954 (patch) | |
tree | dee052600ec7e8e828d26515a4e1e559b3e7b169 /release/scripts | |
parent | f4c697cf7fc1b3bd3e040b90921fafbee8bafa4a (diff) |
UI tweaks
*Fixed some spacing issues in 3D View and Outliner headers
*Made the Bone properties layout consistent with Object properties
*Put Rotation Mode menus below transformation channels, being less important.
*Tiny layout tweak for area lamps
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/ui/buttons_data_bone.py | 68 | ||||
-rw-r--r-- | release/scripts/ui/buttons_data_lamp.py | 6 | ||||
-rw-r--r-- | release/scripts/ui/buttons_object.py | 4 |
3 files changed, 54 insertions, 24 deletions
diff --git a/release/scripts/ui/buttons_data_bone.py b/release/scripts/ui/buttons_data_bone.py index 12db3e7277d..e8041cc7393 100644 --- a/release/scripts/ui/buttons_data_bone.py +++ b/release/scripts/ui/buttons_data_bone.py @@ -48,7 +48,7 @@ class BONE_PT_transform(BoneButtonsPanel): else: pchan = ob.pose.pose_channels[context.bone.name] - layout.itemR(pchan, "rotation_mode") + row = layout.row() col = row.column() @@ -67,6 +67,8 @@ class BONE_PT_transform(BoneButtonsPanel): col.itemR(pchan, "rotation_euler", text="Rotation") row.column().itemR(pchan, "scale") + + layout.itemR(pchan, "rotation_mode") class BONE_PT_transform_locks(BoneButtonsPanel): __label__ = "Transform Locks" @@ -98,8 +100,8 @@ class BONE_PT_transform_locks(BoneButtonsPanel): row.column().itemR(pchan, "lock_scale") -class BONE_PT_bone(BoneButtonsPanel): - __label__ = "Bone" +class BONE_PT_relations(BoneButtonsPanel): + __label__ = "Relations" def draw(self, context): layout = self.layout @@ -115,7 +117,17 @@ class BONE_PT_bone(BoneButtonsPanel): pchan = ob.pose.pose_channels[context.bone.name] split = layout.split() - + + col = split.column() + col.itemL(text="Layers:") + col.itemR(bone, "layer", text="") + + col.itemS() + + if ob and pchan: + col.itemL(text="Bone Group:") + col.item_pointerR(pchan, "bone_group", ob.pose, "bone_groups", text="") + col = split.column() col.itemL(text="Parent:") if context.bone: @@ -123,32 +135,47 @@ class BONE_PT_bone(BoneButtonsPanel): else: col.item_pointerR(bone, "parent", arm, "edit_bones", text="") - row = col.row() - row.active = bone.parent != None - row.itemR(bone, "connected") + sub = col.column() + sub.active = bone.parent != None + sub.itemR(bone, "connected") + sub.itemR(bone, "hinge", text="Inherit Rotation") + sub.itemR(bone, "inherit_scale", text="Inherit Scale") + + +class BONE_PT_display(BoneButtonsPanel): + __label__ = "Display" + + def poll(self, context): + return context.bone + + def draw(self, context): + layout = self.layout - col.itemL(text="Layers:") - col.itemR(bone, "layer", text="") + ob = context.object + bone = context.bone + arm = context.armature - col = split.column() - col.itemL(text="Inherit:") - col.itemR(bone, "hinge", text="Rotation") - col.itemR(bone, "inherit_scale", text="Scale") - col.itemL(text="Display:") - col.itemR(bone, "draw_wire", text="Wireframe") - col.itemR(bone, "hidden", text="Hide") + if not bone: + bone = context.edit_bone + pchan = None + else: + pchan = ob.pose.pose_channels[context.bone.name] if ob and pchan: - split = layout.split() + split = layout.split() + col = split.column() - col.itemL(text="Bone Group:") - col.item_pointerR(pchan, "bone_group", ob.pose, "bone_groups", text="") + + col.itemR(bone, "draw_wire", text="Wireframe") + col.itemR(bone, "hidden", text="Hide") col = split.column() + col.itemL(text="Custom Shape:") col.itemR(pchan, "custom_shape", text="") + class BONE_PT_deform(BoneButtonsPanel): __label__ = "Deform" __default_closed__ = True @@ -201,5 +228,6 @@ class BONE_PT_deform(BoneButtonsPanel): bpy.types.register(BONE_PT_context_bone) bpy.types.register(BONE_PT_transform) bpy.types.register(BONE_PT_transform_locks) -bpy.types.register(BONE_PT_bone) +bpy.types.register(BONE_PT_relations) +bpy.types.register(BONE_PT_display) bpy.types.register(BONE_PT_deform) diff --git a/release/scripts/ui/buttons_data_lamp.py b/release/scripts/ui/buttons_data_lamp.py index 86ca5beb9b5..2879da8d8d5 100644 --- a/release/scripts/ui/buttons_data_lamp.py +++ b/release/scripts/ui/buttons_data_lamp.py @@ -249,7 +249,7 @@ class DATA_PT_area(DataButtonsPanel): split = layout.split() col = split.column() - col.itemR(lamp, "shape", text="") + col.row().itemR(lamp, "shape", expand=True) sub = col.column(align=True) if (lamp.shape == 'SQUARE'): @@ -273,9 +273,9 @@ class DATA_PT_spot(DataButtonsPanel): split = layout.split() col = split.column() - sub = col.column(align=True) + sub = col.column() sub.itemR(lamp, "spot_size", text="Size") - sub.itemR(lamp, "spot_blend", text="Blend") + sub.itemR(lamp, "spot_blend", text="Blend", slider=True) col.itemR(lamp, "square") col = split.column() diff --git a/release/scripts/ui/buttons_object.py b/release/scripts/ui/buttons_object.py index c069572aa28..d546ddb8fd8 100644 --- a/release/scripts/ui/buttons_object.py +++ b/release/scripts/ui/buttons_object.py @@ -26,7 +26,7 @@ class OBJECT_PT_transform(ObjectButtonsPanel): ob = context.object - layout.itemR(ob, "rotation_mode") + row = layout.row() @@ -43,6 +43,8 @@ class OBJECT_PT_transform(ObjectButtonsPanel): row.column().itemR(ob, "scale") + layout.itemR(ob, "rotation_mode") + class OBJECT_PT_transform_locks(ObjectButtonsPanel): __label__ = "Transform Locks" __default_closed__ = True |