Revision: 23613
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23613
Author:   billrey
Date:     2009-10-03 13:19:14 +0200 (Sat, 03 Oct 2009)

Log Message:
-----------
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

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/buttons_data_bone.py
    trunk/blender/release/scripts/ui/buttons_data_lamp.py
    trunk/blender/release/scripts/ui/buttons_object.py
    trunk/blender/source/blender/editors/space_outliner/outliner_header.c
    trunk/blender/source/blender/editors/space_view3d/view3d_header.c

Modified: trunk/blender/release/scripts/ui/buttons_data_bone.py
===================================================================
--- trunk/blender/release/scripts/ui/buttons_data_bone.py       2009-10-03 
04:21:38 UTC (rev 23612)
+++ trunk/blender/release/scripts/ui/buttons_data_bone.py       2009-10-03 
11:19:14 UTC (rev 23613)
@@ -48,7 +48,7 @@
                else:
                        pchan = ob.pose.pose_channels[context.bone.name]
 
-                       layout.itemR(pchan, "rotation_mode")
+                       
 
                        row = layout.row()
                        col = row.column()
@@ -67,6 +67,8 @@
                                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 @@
                
                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,40 +117,65 @@
                        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:
                        col.itemR(bone, "parent", text="")
                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 @@
 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)

Modified: trunk/blender/release/scripts/ui/buttons_data_lamp.py
===================================================================
--- trunk/blender/release/scripts/ui/buttons_data_lamp.py       2009-10-03 
04:21:38 UTC (rev 23612)
+++ trunk/blender/release/scripts/ui/buttons_data_lamp.py       2009-10-03 
11:19:14 UTC (rev 23613)
@@ -249,7 +249,7 @@
                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 @@
                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()

Modified: trunk/blender/release/scripts/ui/buttons_object.py
===================================================================
--- trunk/blender/release/scripts/ui/buttons_object.py  2009-10-03 04:21:38 UTC 
(rev 23612)
+++ trunk/blender/release/scripts/ui/buttons_object.py  2009-10-03 11:19:14 UTC 
(rev 23613)
@@ -26,7 +26,7 @@
                
                ob = context.object
                
-               layout.itemR(ob, "rotation_mode")
+               
 
                row = layout.row()
                
@@ -43,6 +43,8 @@
                        
                row.column().itemR(ob, "scale")
                
+               layout.itemR(ob, "rotation_mode")
+               
 class OBJECT_PT_transform_locks(ObjectButtonsPanel):
        __label__ = "Transform Locks"
        __default_closed__ = True

Modified: trunk/blender/source/blender/editors/space_outliner/outliner_header.c
===================================================================
--- trunk/blender/source/blender/editors/space_outliner/outliner_header.c       
2009-10-03 04:21:38 UTC (rev 23612)
+++ trunk/blender/source/blender/editors/space_outliner/outliner_header.c       
2009-10-03 11:19:14 UTC (rev 23613)
@@ -228,7 +228,7 @@
                xco += xmax;
                
                /* header text */
-               xco += XIC*2;
+               xco += XIC;
                
                uiBlockSetEmboss(block, UI_EMBOSS);
        }

Modified: trunk/blender/source/blender/editors/space_view3d/view3d_header.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/view3d_header.c   
2009-10-03 04:21:38 UTC (rev 23612)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_header.c   
2009-10-03 11:19:14 UTC (rev 23613)
@@ -2128,7 +2128,7 @@
                                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 @@
                                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 @@
                        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);
 


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to