forked from bartvdbraak/blender
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
This commit is contained in:
parent
f4c697cf7f
commit
2cbf21b582
@ -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()
|
||||
|
||||
col = split.column()
|
||||
|
||||
col.itemR(bone, "draw_wire", text="Wireframe")
|
||||
col.itemR(bone, "hidden", text="Hide")
|
||||
|
||||
col = split.column()
|
||||
col.itemL(text="Bone Group:")
|
||||
col.item_pointerR(pchan, "bone_group", ob.pose, "bone_groups", text="")
|
||||
|
||||
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)
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
@ -228,7 +228,7 @@ void outliner_header_buttons(const bContext *C, ARegion *ar)
|
||||
xco += xmax;
|
||||
|
||||
/* header text */
|
||||
xco += XIC*2;
|
||||
xco += XIC;
|
||||
|
||||
uiBlockSetEmboss(block, UI_EMBOSS);
|
||||
}
|
||||
|
@ -2128,7 +2128,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
|
||||
xco+= XIC+10;
|
||||
}
|
||||
uiBlockEndAlign(block);
|
||||
header_xco_step(ar, &xco, &yco, &maxco, XIC+10);
|
||||
header_xco_step(ar, &xco, &yco, &maxco, 10);
|
||||
}
|
||||
|
||||
/* Snap */
|
||||
@ -2147,7 +2147,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
|
||||
uiDefIconTextButS(block, ICONTEXTROW,B_REDR, ICON_SNAP_VERTEX, snapmode_pup(), xco,yco,XIC+10,YIC, &(ts->snap_mode), 0.0, 0.0, 0, 0, "Snapping mode");
|
||||
xco+= XIC;
|
||||
uiDefButS(block, MENU, B_NOP, "Snap Mode%t|Closest%x0|Center%x1|Median%x2|Active%x3",xco,yco,70,YIC, &ts->snap_target, 0, 0, 0, 0, "Snap Target Mode");
|
||||
xco+= XIC+70;
|
||||
xco+= XIC;
|
||||
} else {
|
||||
uiDefIconButBitS(block, TOG, SCE_SNAP, B_REDR, ICON_SNAP_GEAR,xco,yco,XIC,YIC, &ts->snap_flag, 0, 0, 0, 0, "Snap while Ctrl is held during transform (Shift Tab)");
|
||||
xco+= XIC;
|
||||
@ -2169,10 +2169,11 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
|
||||
uiDefIconButBitS(block, TOG, SCE_SELECT_FACE, B_SEL_FACE, ICON_FACESEL, xco,yco,XIC,YIC, &em->selectmode, 1.0, 0.0, 0, 0, "Face select mode (Ctrl Tab 3)");
|
||||
xco+= XIC;
|
||||
uiBlockEndAlign(block);
|
||||
header_xco_step(ar, &xco, &yco, &maxco, 10);
|
||||
if(v3d->drawtype > OB_WIRE) {
|
||||
uiDefIconButBitS(block, TOG, V3D_ZBUF_SELECT, B_REDR, ICON_ORTHO, xco,yco,XIC,YIC, &v3d->flag, 1.0, 0.0, 0, 0, "Occlude background geometry");
|
||||
xco+= XIC;
|
||||
}
|
||||
xco+= XIC;
|
||||
uiBlockEndAlign(block);
|
||||
header_xco_step(ar, &xco, &yco, &maxco, XIC);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user