diff options
18 files changed, 190 insertions, 152 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 57e46314777..e8d5d75097a 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -2086,7 +2086,7 @@ static void rna_def_modifier_build(BlenderRNA *brna) prop = RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_TIME); RNA_def_property_float_sdna(prop, NULL, "start"); RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF); - RNA_def_property_ui_text(prop, "Start", "Start frame of the effect"); + RNA_def_property_ui_text(prop, "Start Frame", "Start frame of the effect"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop = RNA_def_property(srna, "frame_duration", PROP_FLOAT, PROP_TIME); @@ -3415,7 +3415,7 @@ static void rna_def_modifier_cast(BlenderRNA *brna) prop = RNA_def_property(srna, "use_radius_as_size", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_SIZE_FROM_RADIUS); RNA_def_property_ui_text( - prop, "From Radius", "Use radius as size of projection shape (0 = auto)"); + prop, "Size from Radius", "Use radius as size of projection shape (0 = auto)"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop = RNA_def_property(srna, "use_transform", PROP_BOOLEAN, PROP_NONE); @@ -4800,7 +4800,7 @@ static void rna_def_modifier_screw(BlenderRNA *brna) prop = RNA_def_property(srna, "use_normal_calculate", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SCREW_NORMAL_CALC); RNA_def_property_ui_text( - prop, "Calc Order", "Calculate the order of edges (needed for meshes, but not curves)"); + prop, "Calculate Order", "Calculate the order of edges (needed for meshes, but not curves)"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop = RNA_def_property(srna, "use_object_screw_offset", PROP_BOOLEAN, PROP_NONE); diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index e1f271e83c3..48d69f8e02c 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -76,6 +76,9 @@ static void initData(ModifierData *md) amd->fit_type = MOD_ARR_FIXEDCOUNT; amd->offset_type = MOD_ARR_OFF_RELATIVE; amd->flags = 0; + + /* Open the first subpanel by default, it corresspnds to Relative offset which is enabled too. */ + md->ui_expand_flag = (1 << 0) | (1 << 1); } static void foreachObjectLink(ModifierData *md, Object *ob, ObjectWalkFunc walk, void *userData) @@ -835,7 +838,6 @@ static bool isDisabled(const struct Scene *UNUSED(scene), static void panel_draw(const bContext *C, Panel *panel) { - uiLayout *col; uiLayout *layout = panel->layout; PointerRNA ptr; @@ -857,12 +859,6 @@ static void panel_draw(const bContext *C, Panel *panel) uiItemR(layout, &ptr, "curve", 0, NULL, ICON_NONE); } - uiItemS(layout); - - col = uiLayoutColumn(layout, false); - uiItemR(col, &ptr, "start_cap", 0, IFACE_("Cap Start"), ICON_NONE); - uiItemR(col, &ptr, "end_cap", 0, IFACE_("End"), ICON_NONE); - modifier_panel_end(layout, &ptr); } @@ -984,6 +980,21 @@ static void uv_panel_draw(const bContext *C, Panel *panel) uiItemR(col, &ptr, "offset_v", UI_ITEM_R_EXPAND, IFACE_("V"), ICON_NONE); } +static void caps_panel_draw(const bContext *C, Panel *panel) +{ + uiLayout *col; + uiLayout *layout = panel->layout; + + PointerRNA ptr; + modifier_panel_get_property_pointers(C, panel, NULL, &ptr); + + uiLayoutSetPropSep(layout, true); + + col = uiLayoutColumn(layout, false); + uiItemR(col, &ptr, "start_cap", 0, IFACE_("Cap Start"), ICON_NONE); + uiItemR(col, &ptr, "end_cap", 0, IFACE_("End"), ICON_NONE); +} + static void panelRegister(ARegionType *region_type) { PanelType *panel_type = modifier_panel_register(region_type, eModifierType_Array, panel_draw); @@ -1004,6 +1015,7 @@ static void panelRegister(ARegionType *region_type) modifier_subpanel_register( region_type, "merge", "", symmetry_panel_header_draw, symmetry_panel_draw, panel_type); modifier_subpanel_register(region_type, "uv", "UVs", NULL, uv_panel_draw, panel_type); + modifier_subpanel_register(region_type, "caps", "Caps", NULL, caps_panel_draw, panel_type); } ModifierTypeInfo modifierType_Array = { diff --git a/source/blender/modifiers/intern/MOD_bevel.c b/source/blender/modifiers/intern/MOD_bevel.c index 0a1eb8eba10..21bb7f4764a 100644 --- a/source/blender/modifiers/intern/MOD_bevel.c +++ b/source/blender/modifiers/intern/MOD_bevel.c @@ -279,51 +279,38 @@ static bool isDisabled(const Scene *UNUSED(scene), ModifierData *md, bool UNUSED static void panel_draw(const bContext *C, Panel *panel) { - uiLayout *col; + uiLayout *col, *sub; uiLayout *layout = panel->layout; PointerRNA ptr; PointerRNA ob_ptr; modifier_panel_get_property_pointers(C, panel, &ob_ptr, &ptr); + bool edge_bevel = RNA_enum_get(&ptr, "affect") != MOD_BEVEL_VERT; + + uiItemR(layout, &ptr, "affect", UI_ITEM_R_EXPAND, NULL, ICON_NONE); + uiLayoutSetPropSep(layout, true); col = uiLayoutColumn(layout, false); - const char *offset_name = ""; + uiItemR(col, &ptr, "offset_type", 0, NULL, ICON_NONE); if (RNA_enum_get(&ptr, "offset_type") == BEVEL_AMT_PERCENT) { uiItemR(col, &ptr, "width_pct", 0, NULL, ICON_NONE); } else { - switch (RNA_enum_get(&ptr, "offset_type")) { - case BEVEL_AMT_DEPTH: - offset_name = "Depth"; - break; - case BEVEL_AMT_WIDTH: - offset_name = "Width"; - break; - case BEVEL_AMT_OFFSET: - offset_name = "Offset"; - break; - case BEVEL_AMT_ABSOLUTE: - offset_name = "Absolute"; - break; - } - uiItemR(col, &ptr, "width", 0, IFACE_(offset_name), ICON_NONE); + uiItemR(col, &ptr, "width", 0, IFACE_("Amount"), ICON_NONE); } - uiItemR(col, &ptr, "offset_type", 0, NULL, ICON_NONE); uiItemR(layout, &ptr, "segments", 0, NULL, ICON_NONE); uiItemS(layout); - uiItemR(layout, &ptr, "affect", UI_ITEM_R_EXPAND, NULL, ICON_NONE); - - uiItemS(layout); - col = uiLayoutColumn(layout, false); uiItemR(col, &ptr, "limit_method", 0, NULL, ICON_NONE); int limit_method = RNA_enum_get(&ptr, "limit_method"); - if (limit_method == MOD_BEVEL_ANGLE) { + if (limit_method != MOD_BEVEL_ANGLE) { + sub = uiLayoutColumn(col, false); + uiLayoutSetActive(sub, edge_bevel); uiItemR(col, &ptr, "angle_limit", 0, NULL, ICON_NONE); } else if (limit_method == MOD_BEVEL_VGROUP) { @@ -333,25 +320,78 @@ static void panel_draw(const bContext *C, Panel *panel) modifier_panel_end(layout, &ptr); } +static void profile_panel_draw(const bContext *C, Panel *panel) +{ + uiLayout *row; + uiLayout *layout = panel->layout; + + PointerRNA ptr; + modifier_panel_get_property_pointers(C, panel, NULL, &ptr); + + int profile_type = RNA_enum_get(&ptr, "profile_type"); + int miter_inner = RNA_enum_get(&ptr, "miter_inner"); + int miter_outer = RNA_enum_get(&ptr, "miter_outer"); + bool edge_bevel = RNA_enum_get(&ptr, "affect") != MOD_BEVEL_VERT; + + uiItemR(layout, &ptr, "profile_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE); + + uiLayoutSetPropSep(layout, true); + + if (ELEM(profile_type, MOD_BEVEL_PROFILE_SUPERELLIPSE, MOD_BEVEL_PROFILE_CUSTOM)) { + row = uiLayoutRow(layout, false); + uiLayoutSetActive( + row, + profile_type == MOD_BEVEL_PROFILE_SUPERELLIPSE || + (profile_type == MOD_BEVEL_PROFILE_CUSTOM && edge_bevel && + !((miter_inner == MOD_BEVEL_MITER_SHARP) && (miter_outer == MOD_BEVEL_MITER_SHARP)))); + uiItemR(row, + &ptr, + "profile", + UI_ITEM_R_SLIDER, + (profile_type == MOD_BEVEL_PROFILE_SUPERELLIPSE) ? IFACE_("Shape") : + IFACE_("Miter Shape"), + ICON_NONE); + + if (profile_type == MOD_BEVEL_PROFILE_CUSTOM) { + uiLayout *sub = uiLayoutColumn(layout, false); + uiLayoutSetPropDecorate(sub, false); + uiTemplateCurveProfile(sub, &ptr, "custom_profile"); + } + } +} + static void geometry_panel_draw(const bContext *C, Panel *panel) { + uiLayout *row; uiLayout *layout = panel->layout; PointerRNA ptr; modifier_panel_get_property_pointers(C, panel, NULL, &ptr); + bool edge_bevel = RNA_enum_get(&ptr, "affect") != MOD_BEVEL_VERT; + uiLayoutSetPropSep(layout, true); - uiItemR(layout, &ptr, "miter_inner", 0, IFACE_("Miter Inner"), ICON_NONE); - uiItemR(layout, &ptr, "miter_outer", 0, IFACE_("Outer"), ICON_NONE); + row = uiLayoutRow(layout, false); + uiLayoutSetActive(row, edge_bevel); + uiItemR(row, &ptr, "miter_outer", 0, IFACE_("Miter Outer"), ICON_NONE); + row = uiLayoutRow(layout, false); + uiLayoutSetActive(row, edge_bevel); + uiItemR(row, &ptr, "miter_inner", 0, IFACE_("Inner"), ICON_NONE); if (RNA_enum_get(&ptr, "miter_inner") == BEVEL_MITER_ARC) { - uiItemR(layout, &ptr, "spread", 0, NULL, ICON_NONE); + row = uiLayoutRow(layout, false); + uiLayoutSetActive(row, edge_bevel); + uiItemR(row, &ptr, "spread", 0, NULL, ICON_NONE); } uiItemS(layout); - uiItemR(layout, &ptr, "vmesh_method", 0, IFACE_("Intersections"), ICON_NONE); + row = uiLayoutRow(layout, false); + uiLayoutSetActive(row, edge_bevel); + uiItemR(row, &ptr, "vmesh_method", 0, IFACE_("Intersections"), ICON_NONE); uiItemR(layout, &ptr, "use_clamp_overlap", 0, NULL, ICON_NONE); - uiItemR(layout, &ptr, "loop_slide", 0, NULL, ICON_NONE); + row = uiLayoutRow(layout, false); + uiLayoutSetActive(row, edge_bevel); + uiItemR(row, &ptr, "loop_slide", 0, NULL, ICON_NONE); } static void shading_panel_draw(const bContext *C, Panel *panel) @@ -362,11 +402,14 @@ static void shading_panel_draw(const bContext *C, Panel *panel) PointerRNA ptr; modifier_panel_get_property_pointers(C, panel, NULL, &ptr); + bool edge_bevel = RNA_enum_get(&ptr, "affect") != MOD_BEVEL_VERT; + uiLayoutSetPropSep(layout, true); uiItemR(layout, &ptr, "harden_normals", 0, NULL, ICON_NONE); col = uiLayoutColumnWithHeading(layout, true, IFACE_("Mark")); + uiLayoutSetActive(col, edge_bevel); uiItemR(col, &ptr, "mark_seam", 0, IFACE_("Seam"), ICON_NONE); uiItemR(col, &ptr, "mark_sharp", 0, IFACE_("Sharp"), ICON_NONE); @@ -374,36 +417,6 @@ static void shading_panel_draw(const bContext *C, Panel *panel) uiItemR(layout, &ptr, "face_strength_mode", 0, NULL, ICON_NONE); } -static void profile_panel_draw(const bContext *C, Panel *panel) -{ - uiLayout *layout = panel->layout; - - PointerRNA ptr; - modifier_panel_get_property_pointers(C, panel, NULL, &ptr); - - int profile_type = RNA_enum_get(&ptr, "profile_type"); - - uiItemR(layout, &ptr, "profile_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE); - - uiLayoutSetPropSep(layout, true); - - if (ELEM(profile_type, MOD_BEVEL_PROFILE_SUPERELLIPSE, MOD_BEVEL_PROFILE_CUSTOM)) { - uiItemR(layout, - &ptr, - "profile", - UI_ITEM_R_SLIDER, - (profile_type == MOD_BEVEL_PROFILE_SUPERELLIPSE) ? IFACE_("Shape") : - IFACE_("Miter Shape"), - ICON_NONE); - - if (profile_type == MOD_BEVEL_PROFILE_CUSTOM) { - uiLayout *sub = uiLayoutColumn(layout, false); - uiLayoutSetPropDecorate(sub, false); - uiTemplateCurveProfile(sub, &ptr, "custom_profile"); - } - } -} - static void panelRegister(ARegionType *region_type) { PanelType *panel_type = modifier_panel_register(region_type, eModifierType_Bevel, panel_draw); diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c index 8a04e288f10..1d39aa786a5 100644 --- a/source/blender/modifiers/intern/MOD_boolean.c +++ b/source/blender/modifiers/intern/MOD_boolean.c @@ -364,9 +364,10 @@ static void panel_draw(const bContext *C, Panel *panel) PointerRNA ptr; modifier_panel_get_property_pointers(C, panel, NULL, &ptr); + uiItemR(layout, &ptr, "operation", UI_ITEM_R_EXPAND, NULL, ICON_NONE); + uiLayoutSetPropSep(layout, true); - uiItemR(layout, &ptr, "operation", 0, NULL, ICON_NONE); uiItemR(layout, &ptr, "object", 0, NULL, ICON_NONE); uiItemR(layout, &ptr, "double_threshold", 0, NULL, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c index 894a48d9f62..9b9dd0a079c 100644 --- a/source/blender/modifiers/intern/MOD_displace.c +++ b/source/blender/modifiers/intern/MOD_displace.c @@ -454,12 +454,12 @@ static void panel_draw(const bContext *C, Panel *panel) uiLayoutSetActive(col, has_texture); uiItemR(col, &ptr, "texture_coords", 0, IFACE_("Coordinates"), ICON_NONE); if (texture_coords == MOD_DISP_MAP_OBJECT) { - uiItemR(col, &ptr, "texture_coords_object", 0, NULL, ICON_NONE); + uiItemR(col, &ptr, "texture_coords_object", 0, IFACE_("Object"), ICON_NONE); PointerRNA texture_coords_obj_ptr = RNA_pointer_get(&ptr, "texture_coords_object"); if (!RNA_pointer_is_null(&texture_coords_obj_ptr) && (RNA_enum_get(&texture_coords_obj_ptr, "type") == OB_ARMATURE)) { PointerRNA texture_coords_obj_data_ptr = RNA_pointer_get(&texture_coords_obj_ptr, "data"); - uiItemPointerR(layout, + uiItemPointerR(col, &ptr, "texture_coords_bone", &texture_coords_obj_data_ptr, diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c index 29f7294c202..f6ad25ce282 100644 --- a/source/blender/modifiers/intern/MOD_explode.c +++ b/source/blender/modifiers/intern/MOD_explode.c @@ -1189,7 +1189,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * static void panel_draw(const bContext *C, Panel *panel) { - uiLayout *row; + uiLayout *row, *col; uiLayout *layout = panel->layout; int toggles_flag = UI_ITEM_R_TOGGLE | UI_ITEM_R_FORCE_BLANK_DECORATE; @@ -1211,8 +1211,9 @@ static void panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropSep(layout, true); - uiItemR(layout, &ptr, "use_edge_cut", 0, NULL, ICON_NONE); - uiItemR(layout, &ptr, "use_size", 0, NULL, ICON_NONE); + col = uiLayoutColumn(layout, false); + uiItemR(col, &ptr, "use_edge_cut", 0, NULL, ICON_NONE); + uiItemR(col, &ptr, "use_size", 0, NULL, ICON_NONE); modifier_vgroup_ui(layout, &ptr, &ob_ptr, "vertex_group", "invert_vertex_group", NULL); diff --git a/source/blender/modifiers/intern/MOD_meshsequencecache.c b/source/blender/modifiers/intern/MOD_meshsequencecache.c index 9eae7ae941f..8f6676dd0b2 100644 --- a/source/blender/modifiers/intern/MOD_meshsequencecache.c +++ b/source/blender/modifiers/intern/MOD_meshsequencecache.c @@ -200,7 +200,6 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte static void panel_draw(const bContext *C, Panel *panel) { - uiLayout *box; uiLayout *layout = panel->layout; PointerRNA ptr; @@ -210,11 +209,10 @@ static void panel_draw(const bContext *C, Panel *panel) PointerRNA cache_file_ptr = RNA_pointer_get(&ptr, "cache_file"); bool has_cache_file = !RNA_pointer_is_null(&cache_file_ptr); - box = uiLayoutBox(layout); - uiTemplateCacheFile(box, C, &ptr, "cache_file"); - uiLayoutSetPropSep(layout, true); + uiTemplateCacheFile(layout, C, &ptr, "cache_file"); + if (has_cache_file) { uiItemPointerR(layout, &ptr, "object_path", &cache_file_ptr, "object_paths", NULL, ICON_NONE); } diff --git a/source/blender/modifiers/intern/MOD_normal_edit.c b/source/blender/modifiers/intern/MOD_normal_edit.c index dc454b59e8c..7039b24cfc6 100644 --- a/source/blender/modifiers/intern/MOD_normal_edit.c +++ b/source/blender/modifiers/intern/MOD_normal_edit.c @@ -709,11 +709,12 @@ static void panel_draw(const bContext *C, Panel *panel) PointerRNA ob_ptr; modifier_panel_get_property_pointers(C, panel, &ob_ptr, &ptr); - uiLayoutSetPropSep(layout, true); - int mode = RNA_enum_get(&ptr, "mode"); uiItemR(layout, &ptr, "mode", UI_ITEM_R_EXPAND, NULL, ICON_NONE); + + uiLayoutSetPropSep(layout, true); + uiItemR(layout, &ptr, "target", 0, NULL, ICON_NONE); col = uiLayoutColumn(layout, false); diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c index 88581464a02..b88d80ffc5e 100644 --- a/source/blender/modifiers/intern/MOD_ocean.c +++ b/source/blender/modifiers/intern/MOD_ocean.c @@ -514,7 +514,7 @@ static void panel_draw(const bContext *C, Panel *panel) { uiLayout *layout = panel->layout; #ifdef WITH_OCEANSIM - uiLayout *col; + uiLayout *col, *sub; PointerRNA ptr; PointerRNA ob_ptr; @@ -522,22 +522,24 @@ static void panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropSep(layout, true); - uiItemR(layout, &ptr, "geometry_mode", 0, NULL, ICON_NONE); + col = uiLayoutColumn(layout, false); + uiItemR(col, &ptr, "geometry_mode", 0, NULL, ICON_NONE); if (RNA_enum_get(&ptr, "geometry_mode") == MOD_OCEAN_GEOM_GENERATE) { - col = uiLayoutColumn(layout, true); - uiItemR(col, &ptr, "repeat_x", 0, IFACE_("Repeat X"), ICON_NONE); - uiItemR(col, &ptr, "repeat_y", 0, IFACE_("Y"), ICON_NONE); + sub = uiLayoutColumn(col, true); + uiItemR(sub, &ptr, "repeat_x", 0, IFACE_("Repeat X"), ICON_NONE); + uiItemR(sub, &ptr, "repeat_y", 0, IFACE_("Y"), ICON_NONE); } - uiItemR(layout, &ptr, "random_seed", 0, NULL, ICON_NONE); - uiItemR(layout, &ptr, "resolution", 0, NULL, ICON_NONE); + uiItemR(col, &ptr, "resolution", 0, NULL, ICON_NONE); + + uiItemR(col, &ptr, "time", 0, NULL, ICON_NONE); - uiItemR(layout, &ptr, "time", 0, NULL, ICON_NONE); - uiItemR(layout, &ptr, "depth", 0, NULL, ICON_NONE); + uiItemR(col, &ptr, "depth", 0, NULL, ICON_NONE); + uiItemR(col, &ptr, "size", 0, NULL, ICON_NONE); + uiItemR(col, &ptr, "spatial_size", 0, NULL, ICON_NONE); - uiItemR(layout, &ptr, "size", 0, NULL, ICON_NONE); - uiItemR(layout, &ptr, "spatial_size", 0, NULL, ICON_NONE); + uiItemR(col, &ptr, "random_seed", 0, NULL, ICON_NONE); - uiItemR(layout, &ptr, "use_normals", 0, NULL, ICON_NONE); + uiItemR(col, &ptr, "use_normals", 0, NULL, ICON_NONE); modifier_panel_end(layout, &ptr); @@ -550,7 +552,7 @@ static void panel_draw(const bContext *C, Panel *panel) #ifdef WITH_OCEANSIM static void waves_panel_draw(const bContext *C, Panel *panel) { - uiLayout *col; + uiLayout *col, *sub; uiLayout *layout = panel->layout; PointerRNA ptr; @@ -558,16 +560,20 @@ static void waves_panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropSep(layout, true); - uiItemR(layout, &ptr, "wave_scale", 0, IFACE_("Scale"), ICON_NONE); - uiItemR(layout, &ptr, "wave_scale_min", 0, NULL, ICON_NONE); - uiItemR(layout, &ptr, "choppiness", 0, NULL, ICON_NONE); - uiItemR(layout, &ptr, "wind_velocity", 0, NULL, ICON_NONE); + col = uiLayoutColumn(layout, false); + uiItemR(col, &ptr, "wave_scale", 0, IFACE_("Scale"), ICON_NONE); + uiItemR(col, &ptr, "wave_scale_min", 0, NULL, ICON_NONE); + uiItemR(col, &ptr, "choppiness", 0, NULL, ICON_NONE); + uiItemR(col, &ptr, "wind_velocity", 0, NULL, ICON_NONE); + + uiItemS(layout); - uiItemR(layout, &ptr, "wave_alignment", 0, IFACE_("Alignment"), ICON_NONE); col = uiLayoutColumn(layout, false); - uiLayoutSetActive(col, RNA_float_get(&ptr, "wave_alignment") > 0.0f); - uiItemR(col, &ptr, "wave_direction", 0, IFACE_("Direction"), ICON_NONE); - uiItemR(col, &ptr, "damping", 0, NULL, ICON_NONE); + uiItemR(col, &ptr, "wave_alignment", 0, IFACE_("Alignment"), ICON_NONE); + sub = uiLayoutColumn(col, false); + uiLayoutSetActive(sub, RNA_float_get(&ptr, "wave_alignment") > 0.0f); + uiItemR(sub, &ptr, "wave_direction", 0, IFACE_("Direction"), ICON_NONE); + uiItemR(sub, &ptr, "damping", 0, NULL, ICON_NONE); } static void foam_panel_draw_header(const bContext *C, Panel *panel) @@ -603,19 +609,21 @@ static void foam_panel_draw(const bContext *C, Panel *panel) static void spectrum_panel_draw(const bContext *C, Panel *panel) { + uiLayout *col; uiLayout *layout = panel->layout; PointerRNA ptr; modifier_panel_get_property_pointers(C, panel, NULL, &ptr); - uiLayoutSetPropSep(layout, true); - int spectrum = RNA_enum_get(&ptr, "spectrum"); - uiItemR(layout, &ptr, "spectrum", 0, NULL, ICON_NONE); + uiLayoutSetPropSep(layout, true); + + col = uiLayoutColumn(layout, false); + uiItemR(col, &ptr, "spectrum", 0, NULL, ICON_NONE); if (ELEM(spectrum, MOD_OCEAN_SPECTRUM_TEXEL_MARSEN_ARSLOE, MOD_OCEAN_SPECTRUM_JONSWAP)) { - uiItemR(layout, &ptr, "sharpen_peak_jonswap", 0, NULL, ICON_NONE); - uiItemR(layout, &ptr, "fetch_jonswap", 0, NULL, ICON_NONE); + uiItemR(col, &ptr, "sharpen_peak_jonswap", 0, NULL, ICON_NONE); + uiItemR(col, &ptr, "fetch_jonswap", 0, NULL, ICON_NONE); } } @@ -652,7 +660,7 @@ static void bake_panel_draw(const bContext *C, Panel *panel) col = uiLayoutColumn(layout, true); uiLayoutSetEnabled(col, !is_cached); - uiItemR(col, &ptr, "frame_start", 0, IFACE_("Start"), ICON_NONE); + uiItemR(col, &ptr, "frame_start", 0, IFACE_("Frame Start"), ICON_NONE); uiItemR(col, &ptr, "frame_end", 0, IFACE_("End"), ICON_NONE); col = uiLayoutColumn(layout, false); diff --git a/source/blender/modifiers/intern/MOD_particleinstance.c b/source/blender/modifiers/intern/MOD_particleinstance.c index 3a9a60cf2e9..dd881f1ac74 100644 --- a/source/blender/modifiers/intern/MOD_particleinstance.c +++ b/source/blender/modifiers/intern/MOD_particleinstance.c @@ -645,6 +645,7 @@ static void path_panel_draw(const bContext *C, Panel *panel) static void layers_panel_draw(const bContext *C, Panel *panel) { + uiLayout *col; uiLayout *layout = panel->layout; PointerRNA ptr; @@ -655,20 +656,11 @@ static void layers_panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropSep(layout, true); - uiItemPointerR(layout, - &ptr, - "index_layer_name", - &obj_data_ptr, - "vertex_colors", - IFACE_("Index"), - ICON_NONE); - uiItemPointerR(layout, - &ptr, - "value_layer_name", - &obj_data_ptr, - "vertex_colors", - IFACE_("Value"), - ICON_NONE); + col = uiLayoutColumn(layout, false); + uiItemPointerR( + col, &ptr, "index_layer_name", &obj_data_ptr, "vertex_colors", IFACE_("Index"), ICON_NONE); + uiItemPointerR( + col, &ptr, "value_layer_name", &obj_data_ptr, "vertex_colors", IFACE_("Value"), ICON_NONE); } static void panelRegister(ARegionType *region_type) diff --git a/source/blender/modifiers/intern/MOD_remesh.c b/source/blender/modifiers/intern/MOD_remesh.c index 6fc564448c3..197d759c352 100644 --- a/source/blender/modifiers/intern/MOD_remesh.c +++ b/source/blender/modifiers/intern/MOD_remesh.c @@ -241,7 +241,7 @@ static void panel_draw(const bContext *C, Panel *panel) { uiLayout *layout = panel->layout; #ifdef WITH_MOD_REMESH - uiLayout *row; + uiLayout *row, *col; PointerRNA ptr; PointerRNA ob_ptr; @@ -253,16 +253,17 @@ static void panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropSep(layout, true); + col = uiLayoutColumn(layout, false); if (mode == MOD_REMESH_VOXEL) { - uiItemR(layout, &ptr, "voxel_size", 0, NULL, ICON_NONE); - uiItemR(layout, &ptr, "adaptivity", 0, NULL, ICON_NONE); + uiItemR(col, &ptr, "voxel_size", 0, NULL, ICON_NONE); + uiItemR(col, &ptr, "adaptivity", 0, NULL, ICON_NONE); } else { - uiItemR(layout, &ptr, "octree_depth", 0, NULL, ICON_NONE); - uiItemR(layout, &ptr, "scale", 0, NULL, ICON_NONE); + uiItemR(col, &ptr, "octree_depth", 0, NULL, ICON_NONE); + uiItemR(col, &ptr, "scale", 0, NULL, ICON_NONE); if (mode == MOD_REMESH_SHARP_FEATURES) { - uiItemR(layout, &ptr, "sharpness", 0, NULL, ICON_NONE); + uiItemR(col, &ptr, "sharpness", 0, NULL, ICON_NONE); } uiItemR(layout, &ptr, "use_remove_disconnected", 0, NULL, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_shrinkwrap.c b/source/blender/modifiers/intern/MOD_shrinkwrap.c index 131a0f3ed26..a5f6be04a08 100644 --- a/source/blender/modifiers/intern/MOD_shrinkwrap.c +++ b/source/blender/modifiers/intern/MOD_shrinkwrap.c @@ -242,13 +242,14 @@ static void panel_draw(const bContext *C, Panel *panel) uiItemR(layout, &ptr, "project_limit", 0, IFACE_("Limit"), ICON_NONE); uiItemR(layout, &ptr, "subsurf_levels", 0, NULL, ICON_NONE); - row = uiLayoutRowWithHeading(layout, true, IFACE_("Axis")); + col = uiLayoutColumn(layout, false); + row = uiLayoutRowWithHeading(col, true, IFACE_("Axis")); uiItemR(row, &ptr, "use_project_x", toggles_flag, NULL, ICON_NONE); uiItemR(row, &ptr, "use_project_y", toggles_flag, NULL, ICON_NONE); uiItemR(row, &ptr, "use_project_z", toggles_flag, NULL, ICON_NONE); - uiItemR(layout, &ptr, "use_negative_direction", 0, NULL, ICON_NONE); - uiItemR(layout, &ptr, "use_positive_direction", 0, NULL, ICON_NONE); + uiItemR(col, &ptr, "use_negative_direction", 0, NULL, ICON_NONE); + uiItemR(col, &ptr, "use_positive_direction", 0, NULL, ICON_NONE); uiItemR(layout, &ptr, "cull_face", UI_ITEM_R_EXPAND, NULL, ICON_NONE); col = uiLayoutColumn(layout, false); diff --git a/source/blender/modifiers/intern/MOD_skin.c b/source/blender/modifiers/intern/MOD_skin.c index 683ae023271..8f0174fe6d9 100644 --- a/source/blender/modifiers/intern/MOD_skin.c +++ b/source/blender/modifiers/intern/MOD_skin.c @@ -1974,7 +1974,7 @@ static void panel_draw(const bContext *C, Panel *panel) uiItemO(row, IFACE_("Create Armature"), ICON_NONE, "OBJECT_OT_skin_armature_create"); uiItemO(row, NULL, ICON_NONE, "MESH_OT_customdata_skin_add"); - row = uiLayoutRow(layout, true); + row = uiLayoutRow(layout, false); uiItemFullO(row, "OBJECT_OT_skin_loose_mark_clear", IFACE_("Mark Loose"), diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c index 82a8227c33a..df9cdee1893 100644 --- a/source/blender/modifiers/intern/MOD_solidify.c +++ b/source/blender/modifiers/intern/MOD_solidify.c @@ -152,6 +152,7 @@ static void panel_draw(const bContext *C, Panel *panel) static void normals_panel_draw(const bContext *C, Panel *panel) { + uiLayout *col; uiLayout *layout = panel->layout; PointerRNA ptr; @@ -162,9 +163,10 @@ static void normals_panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropSep(layout, true); - uiItemR(layout, &ptr, "use_flip_normals", 0, NULL, ICON_NONE); + col = uiLayoutColumn(layout, false); + uiItemR(col, &ptr, "use_flip_normals", 0, IFACE_("Flip"), ICON_NONE); if (solidify_mode == MOD_SOLIDIFY_MODE_EXTRUDE) { - uiItemR(layout, &ptr, "use_quality_normals", 0, IFACE_("High Quality"), ICON_NONE); + uiItemR(col, &ptr, "use_quality_normals", 0, IFACE_("High Quality"), ICON_NONE); } } @@ -198,16 +200,18 @@ static void edge_data_panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropSep(layout, true); if (solidify_mode == MOD_SOLIDIFY_MODE_EXTRUDE) { - uiItemR(layout, &ptr, "edge_crease_inner", 0, IFACE_("Inner"), ICON_NONE); - uiItemR(layout, &ptr, "edge_crease_outer", 0, IFACE_("Outer"), ICON_NONE); - uiItemR(layout, &ptr, "edge_crease_rim", 0, IFACE_("Rim"), ICON_NONE); + uiLayout *col; + col = uiLayoutColumn(layout, true); + uiItemR(col, &ptr, "edge_crease_inner", 0, IFACE_("Crease Inner"), ICON_NONE); + uiItemR(col, &ptr, "edge_crease_outer", 0, IFACE_("Outer"), ICON_NONE); + uiItemR(col, &ptr, "edge_crease_rim", 0, IFACE_("Rim"), ICON_NONE); } uiItemR(layout, &ptr, "bevel_convex", UI_ITEM_R_SLIDER, NULL, ICON_NONE); } static void clamp_panel_draw(const bContext *C, Panel *panel) { - uiLayout *row; + uiLayout *row, *col; uiLayout *layout = panel->layout; PointerRNA ptr; @@ -216,8 +220,9 @@ static void clamp_panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropSep(layout, true); - uiItemR(layout, &ptr, "thickness_clamp", 0, NULL, ICON_NONE); - row = uiLayoutRow(layout, false); + col = uiLayoutColumn(layout, false); + uiItemR(col, &ptr, "thickness_clamp", 0, NULL, ICON_NONE); + row = uiLayoutRow(col, false); uiLayoutSetActive(row, RNA_float_get(&ptr, "thickness_clamp") > 0.0f); uiItemR(row, &ptr, "use_thickness_angle_clamp", 0, NULL, ICON_NONE); } diff --git a/source/blender/modifiers/intern/MOD_subsurf.c b/source/blender/modifiers/intern/MOD_subsurf.c index cbd2c2d27be..d5ff31bd3b1 100644 --- a/source/blender/modifiers/intern/MOD_subsurf.c +++ b/source/blender/modifiers/intern/MOD_subsurf.c @@ -350,9 +350,9 @@ static void panel_draw(const bContext *C, Panel *panel) } #endif - uiLayoutSetPropSep(layout, true); + uiItemR(layout, &ptr, "subdivision_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE); - uiItemR(layout, &ptr, "subdivision_type", 0, IFACE_("Type"), ICON_NONE); + uiLayoutSetPropSep(layout, true); if (show_adaptive_options) { uiItemR(layout, diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c index 2b67b26e620..cbe774e91da 100644 --- a/source/blender/modifiers/intern/MOD_warp.c +++ b/source/blender/modifiers/intern/MOD_warp.c @@ -468,6 +468,7 @@ static void falloff_panel_draw(const bContext *C, Panel *panel) static void texture_panel_draw(const bContext *C, Panel *panel) { + uiLayout *col; uiLayout *layout = panel->layout; PointerRNA ptr; @@ -480,15 +481,15 @@ static void texture_panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropSep(layout, true); - uiItemR(layout, &ptr, "texture_coords", 0, IFACE_("Coordinates"), ICON_NONE); - + col = uiLayoutColumn(layout, false); + uiItemR(col, &ptr, "texture_coords", 0, IFACE_("Coordinates"), ICON_NONE); if (texture_coords == MOD_DISP_MAP_OBJECT) { - uiItemR(layout, &ptr, "texture_coords_object", 0, "Object", ICON_NONE); + uiItemR(col, &ptr, "texture_coords_object", 0, IFACE_("Object"), ICON_NONE); PointerRNA texture_coords_obj_ptr = RNA_pointer_get(&ptr, "texture_coords_object"); if (!RNA_pointer_is_null(&texture_coords_obj_ptr) && (RNA_enum_get(&texture_coords_obj_ptr, "type") == OB_ARMATURE)) { PointerRNA texture_coords_obj_data_ptr = RNA_pointer_get(&texture_coords_obj_ptr, "data"); - uiItemPointerR(layout, + uiItemPointerR(col, &ptr, "texture_coords_bone", &texture_coords_obj_data_ptr, @@ -499,7 +500,7 @@ static void texture_panel_draw(const bContext *C, Panel *panel) } else if (texture_coords == MOD_DISP_MAP_UV && RNA_enum_get(&ob_ptr, "type") == OB_MESH) { PointerRNA obj_data_ptr = RNA_pointer_get(&ob_ptr, "data"); - uiItemPointerR(layout, &ptr, "uv_layer", &obj_data_ptr, "uv_layers", NULL, ICON_NONE); + uiItemPointerR(col, &ptr, "uv_layer", &obj_data_ptr, "uv_layers", NULL, ICON_NONE); } } diff --git a/source/blender/modifiers/intern/MOD_wave.c b/source/blender/modifiers/intern/MOD_wave.c index 789b65dbde3..26f1bf2d69a 100644 --- a/source/blender/modifiers/intern/MOD_wave.c +++ b/source/blender/modifiers/intern/MOD_wave.c @@ -449,6 +449,7 @@ static void time_panel_draw(const bContext *C, Panel *panel) static void texture_panel_draw(const bContext *C, Panel *panel) { + uiLayout *col; uiLayout *layout = panel->layout; PointerRNA ptr; @@ -461,14 +462,15 @@ static void texture_panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropSep(layout, true); - uiItemR(layout, &ptr, "texture_coords", 0, IFACE_("Coordinates"), ICON_NONE); + col = uiLayoutColumn(layout, false); + uiItemR(col, &ptr, "texture_coords", 0, IFACE_("Coordinates"), ICON_NONE); if (texture_coords == MOD_DISP_MAP_OBJECT) { - uiItemR(layout, &ptr, "texture_coords_object", 0, NULL, ICON_NONE); + uiItemR(col, &ptr, "texture_coords_object", 0, IFACE_("Object"), ICON_NONE); PointerRNA texture_coords_obj_ptr = RNA_pointer_get(&ptr, "texture_coords_object"); if (!RNA_pointer_is_null(&texture_coords_obj_ptr) && (RNA_enum_get(&texture_coords_obj_ptr, "type") == OB_ARMATURE)) { PointerRNA texture_coords_obj_data_ptr = RNA_pointer_get(&texture_coords_obj_ptr, "data"); - uiItemPointerR(layout, + uiItemPointerR(col, &ptr, "texture_coords_bone", &texture_coords_obj_data_ptr, @@ -479,7 +481,7 @@ static void texture_panel_draw(const bContext *C, Panel *panel) } else if (texture_coords == MOD_DISP_MAP_UV && RNA_enum_get(&ob_ptr, "type") == OB_MESH) { PointerRNA obj_data_ptr = RNA_pointer_get(&ob_ptr, "data"); - uiItemPointerR(layout, &ptr, "uv_layer", &obj_data_ptr, "uv_layers", NULL, ICON_NONE); + uiItemPointerR(col, &ptr, "uv_layer", &obj_data_ptr, "uv_layers", NULL, ICON_NONE); } } diff --git a/source/blender/modifiers/intern/MOD_weighted_normal.c b/source/blender/modifiers/intern/MOD_weighted_normal.c index 42022369279..f174b6d5aa4 100644 --- a/source/blender/modifiers/intern/MOD_weighted_normal.c +++ b/source/blender/modifiers/intern/MOD_weighted_normal.c @@ -713,6 +713,7 @@ static bool dependsOnNormals(ModifierData *UNUSED(md)) static void panel_draw(const bContext *C, Panel *panel) { + uiLayout *col; uiLayout *layout = panel->layout; PointerRNA ptr; @@ -726,8 +727,9 @@ static void panel_draw(const bContext *C, Panel *panel) uiItemR(layout, &ptr, "weight", 0, IFACE_("Weight"), ICON_NONE); uiItemR(layout, &ptr, "thresh", 0, IFACE_("Threshold"), ICON_NONE); - uiItemR(layout, &ptr, "keep_sharp", 0, NULL, ICON_NONE); - uiItemR(layout, &ptr, "face_influence", 0, NULL, ICON_NONE); + col = uiLayoutColumn(layout, false); + uiItemR(col, &ptr, "keep_sharp", 0, NULL, ICON_NONE); + uiItemR(col, &ptr, "face_influence", 0, NULL, ICON_NONE); modifier_vgroup_ui(layout, &ptr, &ob_ptr, "vertex_group", "invert_vertex_group", NULL); |