2.5 Buttons
[blender-staging.git] / release / ui / buttons_objects.py
index 8ce0b4bf57d71e0e8dae7548071869852fa0b97e..a5074614515880906bbba711d7ce492296b6aa14 100644 (file)
@@ -39,15 +39,15 @@ class OBJECT_PT_groups(ObjectButtonsPanel):
 
                for group in bpy.data.groups:
                        if ob in group.objects:
-                               box = layout.box()
+                               col = layout.column(align=True)
 
-                               row = box.row()
-                               row.itemR(group, "name")
+                               row = col.box().row()
+                               row.itemR(group, "name", text="")
                                #row.itemO("OBJECT_OT_remove_group")
 
-                               row = box.row()
-                               row.column().itemR(group, "layer")
-                               row.column().itemR(group, "dupli_offset")
+                               split = col.box().split()
+                               split.column().itemR(group, "layer")
+                               split.column().itemR(group, "dupli_offset")
 
 class OBJECT_PT_display(ObjectButtonsPanel):
        __idname__ = "OBJECT_PT_display"
@@ -77,10 +77,9 @@ class OBJECT_PT_duplication(ObjectButtonsPanel):
                ob = context.active_object
                layout = self.layout
 
-               row = layout.row()
-               row.itemR(ob, "dupli_type", text="", expand=True)
+               layout.itemR(ob, "dupli_type", expand=True)
 
-               if ob.dupli_type == "FRAMES":
+               if ob.dupli_type == 'FRAMES':
                        split = layout.split()
                        
                        sub = split.column(align=True)
@@ -90,6 +89,19 @@ class OBJECT_PT_duplication(ObjectButtonsPanel):
                        sub = split.column(align=True)
                        sub.itemR(ob, "dupli_frames_on", text="On")
                        sub.itemR(ob, "dupli_frames_off", text="Off")
+                       
+                       layout.itemR(ob, "dupli_frames_no_speed", text="No Speed")
+
+               elif ob.dupli_type == 'VERTS':
+                       layout.itemR(ob, "dupli_verts_rotation", text="Rotation")
+
+               elif ob.dupli_type == 'FACES':
+                       row = layout.row()
+                       row.itemR(ob, "dupli_faces_scale", text="Scale")
+                       row.itemR(ob, "dupli_faces_inherit_scale", text="Inherit Scale")
+
+               elif ob.dupli_type == 'GROUP':
+                       layout.itemR(ob, "dupli_group", text="Group")
 
 class OBJECT_PT_animation(ObjectButtonsPanel):
        __idname__ = "OBJECT_PT_animation"
@@ -98,10 +110,10 @@ class OBJECT_PT_animation(ObjectButtonsPanel):
        def draw(self, context):
                ob = context.active_object
                layout = self.layout
-
-               row = layout.row()
                
-               sub = row.column()
+               split = layout.split()
+               
+               sub = split.column()
                sub.itemL(text="Time Offset:")
                sub.itemR(ob, "time_offset_edit", text="Edit")
                sub.itemR(ob, "time_offset_particle", text="Particle")
@@ -109,7 +121,7 @@ class OBJECT_PT_animation(ObjectButtonsPanel):
                sub.itemR(ob, "slow_parent")
                sub.itemR(ob, "time_offset", text="Offset")
                
-               sub = row.column()
+               sub = split.column()
                sub.itemL(text="Tracking:")
                sub.itemR(ob, "track_axis", text="Axis")
                sub.itemR(ob, "up_axis", text="Up Axis")
@@ -120,4 +132,3 @@ bpy.types.register(OBJECT_PT_groups)
 bpy.types.register(OBJECT_PT_display)
 bpy.types.register(OBJECT_PT_duplication)
 bpy.types.register(OBJECT_PT_animation)
-