From 992382ddb3ddd3d225b74bf931fe734ad82ba2fb Mon Sep 17 00:00:00 2001 From: William Reynish Date: Wed, 29 Jul 2009 20:56:22 +0000 Subject: [PATCH] Even more metaball layout changes. 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 | 14 +++++++------- source/blender/makesrna/intern/rna_meta.c | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/release/ui/buttons_data_metaball.py b/release/ui/buttons_data_metaball.py index b2e2728afe5..009a13df0b7 100644 --- a/release/ui/buttons_data_metaball.py +++ b/release/ui/buttons_data_metaball.py @@ -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) diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c index 279e1e084b0..257b10d8408 100644 --- a/source/blender/makesrna/intern/rna_meta.c +++ b/source/blender/makesrna/intern/rna_meta.c @@ -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);