Even more metaball layout changes.
authorWilliam Reynish <william@reynish.com>
Wed, 29 Jul 2009 20:56:22 +0000 (20:56 +0000)
committerWilliam Reynish <william@reynish.com>
Wed, 29 Jul 2009 20:56:22 +0000 (20:56 +0000)
Added icons in menu, moved type setting at top of panel. Need to make the size widgets only show the relevant options.

release/ui/buttons_data_metaball.py
source/blender/makesrna/intern/rna_meta.c

index b2e2728afe54c800cec054e38cac19ea7c3c43ee..009a13df0b74a90eb7e45a45305ee91e0c40da2b 100644 (file)
@@ -51,7 +51,7 @@ class DATA_PT_metaball(DataButtonsPanel):
                layout.itemR(mball, "flag", expand=True)
 
 class DATA_PT_metaball_element(DataButtonsPanel):
-       __label__ = "Meta Element"
+       __label__ = "Active Element"
        
        def poll(self, context):
                return (context.meta_ball and context.meta_ball.last_selected_element)
@@ -61,6 +61,10 @@ class DATA_PT_metaball_element(DataButtonsPanel):
                
                metaelem = context.meta_ball.last_selected_element
                
+               split = layout.split(percentage=0.3)
+               split.itemL(text="Type:")       
+               split.itemR(metaelem, "type", text="")
+               
                split = layout.split()
                
                col = split.column()
@@ -70,13 +74,9 @@ class DATA_PT_metaball_element(DataButtonsPanel):
                col = split.column()
                col.itemL(text="Settings:")
                col.itemR(metaelem, "stiffness", text="Stiffness")
+               col.itemR(metaelem, "negative", text="Negative")
+               col.itemR(metaelem, "hide", text="Hide")
                
-               layout.itemL(text="Type:")
-               layout.itemR(metaelem, "type", expand=True)
-               
-               flow = layout.column_flow()
-               flow.itemR(metaelem, "negative", text="Negative")
-               flow.itemR(metaelem, "hide", text="Hide")
        
 bpy.types.register(DATA_PT_context_metaball)
 bpy.types.register(DATA_PT_metaball)
index 279e1e084b03d1727c9afb5815b05895f61f8a4f..257b10d8408ff1d7d454a27c5b378fadb865f09f 100644 (file)
@@ -64,11 +64,11 @@ void rna_def_metaelement(BlenderRNA *brna)
        StructRNA *srna;
        PropertyRNA *prop;
        static EnumPropertyItem prop_type_items[] = {
-               {MB_BALL, "BALL", 0, "Ball", ""},
-               {MB_TUBE, "TUBE", 0, "Tube", ""},
-               {MB_PLANE, "PLANE", 0, "Plane", ""},
-               {MB_ELIPSOID, "ELLIPSOID", 0, "Ellipsoid", ""}, // NOTE: typo at original definition!
-               {MB_CUBE, "CUBE", 0, "Cube", ""},
+               {MB_BALL, "BALL", ICON_META_BALL, "Ball", ""},
+               {MB_TUBE, "TUBE", ICON_META_TUBE, "Tube", ""},
+               {MB_PLANE, "PLANE", ICON_META_PLANE, "Plane", ""},
+               {MB_ELIPSOID, "ELLIPSOID", ICON_META_ELLIPSOID, "Ellipsoid", ""}, // NOTE: typo at original definition!
+               {MB_CUBE, "CUBE", ICON_META_CUBE, "Cube", ""},
                {0, NULL, 0, NULL, NULL}};
        
        srna= RNA_def_struct(brna, "MetaElement", NULL);