[Bf-blender-cvs] [482334aa98f] modifier-panels-ui: Various small tweaks to modifier layouts
Hans Goudey
noreply at git.blender.org
Wed Apr 15 22:13:44 CEST 2020
Commit: 482334aa98f6ee682090ba44b7019894e27f8a53
Author: Hans Goudey
Date: Wed Apr 15 15:13:36 2020 -0500
Branches: modifier-panels-ui
https://developer.blender.org/rB482334aa98f6ee682090ba44b7019894e27f8a53
Various small tweaks to modifier layouts
===================================================================
M source/blender/makesrna/intern/rna_modifier.c
M source/blender/modifiers/intern/MOD_bevel.c
M source/blender/modifiers/intern/MOD_displace.c
M source/blender/modifiers/intern/MOD_hook.c
M source/blender/modifiers/intern/MOD_mirror.c
M source/blender/modifiers/intern/MOD_remesh.c
M source/blender/modifiers/intern/MOD_warp.c
M source/blender/modifiers/intern/MOD_wave.c
M source/blender/modifiers/intern/MOD_weightvgproximity.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index dfa6269676d..1ff8afed00f 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -4790,7 +4790,7 @@ static void rna_def_modifier_weightvg_mask(BlenderRNA *UNUSED(brna),
prop = RNA_def_property(srna, "mask_vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "mask_defgrp_name");
- RNA_def_property_ui_text(prop, "Mask VGroup", "Masking vertex group name");
+ RNA_def_property_ui_text(prop, "Mask Vertex Group", "Masking vertex group name");
RNA_def_property_string_funcs(prop, NULL, NULL, mask_vgroup_setter);
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -5249,7 +5249,7 @@ static void rna_def_modifier_remesh(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_remove_disconnected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_REMESH_FLOOD_FILL);
- RNA_def_property_ui_text(prop, "Remove Disconnected Pieces", "");
+ RNA_def_property_ui_text(prop, "Remove Disconnected", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop = RNA_def_property(srna, "use_smooth_shade", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/modifiers/intern/MOD_bevel.c b/source/blender/modifiers/intern/MOD_bevel.c
index f84ea904b2c..42ef7fb824f 100644
--- a/source/blender/modifiers/intern/MOD_bevel.c
+++ b/source/blender/modifiers/intern/MOD_bevel.c
@@ -363,12 +363,12 @@ static void shading_panel_draw(const bContext *C, Panel *panel)
uiLayoutSetPropSep(layout, true);
- col = uiLayoutColumnWithHeading(layout, true, "Mark");
+ uiItemR(layout, &ptr, "harden_normals", 0, NULL, ICON_NONE);
+
+ col = uiLayoutColumnWithHeading(layout, true, IFACE_("Mark"));
uiItemR(col, &ptr, "mark_seam", 0, IFACE_("Seam"), ICON_NONE);
uiItemR(col, &ptr, "mark_sharp", 0, IFACE_("Sharp"), ICON_NONE);
- uiItemR(layout, &ptr, "harden_normals", 0, NULL, ICON_NONE);
-
uiItemR(layout, &ptr, "material", 0, NULL, ICON_NONE);
uiItemR(layout, &ptr, "face_strength_mode", 0, NULL, ICON_NONE);
}
diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c
index 8fc1a1b7cfe..f0d86b7e3ad 100644
--- a/source/blender/modifiers/intern/MOD_displace.c
+++ b/source/blender/modifiers/intern/MOD_displace.c
@@ -438,6 +438,7 @@ static void panel_draw(const bContext *C, Panel *panel)
PointerRNA texture_ptr = RNA_pointer_get(&ptr, "texture");
bool has_texture = !RNA_pointer_is_null(&texture_ptr);
bool has_vertex_group = RNA_string_length(&ptr, "vertex_group") != 0;
+ int texture_coords = RNA_enum_get(&ptr, "texture_coords");
uiLayoutSetPropSep(layout, true);
@@ -445,8 +446,7 @@ static void panel_draw(const bContext *C, Panel *panel)
col = uiLayoutColumn(layout, false);
uiLayoutSetActive(col, has_texture);
- uiItemR(col, &ptr, "texture_coords", 0, 0, ICON_NONE);
- int texture_coords = RNA_enum_get(&ptr, "texture_coords");
+ 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);
PointerRNA texture_coords_obj_ptr = RNA_pointer_get(&ptr, "texture_coords_object");
diff --git a/source/blender/modifiers/intern/MOD_hook.c b/source/blender/modifiers/intern/MOD_hook.c
index 8dd986664d0..7219c713400 100644
--- a/source/blender/modifiers/intern/MOD_hook.c
+++ b/source/blender/modifiers/intern/MOD_hook.c
@@ -455,17 +455,17 @@ static void falloff_panel_draw(const bContext *C, Panel *panel)
uiLayoutSetPropSep(layout, true);
- uiItemR(layout, &ptr, "falloff_type", 0, NULL, ICON_NONE);
+ uiItemR(layout, &ptr, "falloff_type", 0, IFACE_("Type"), ICON_NONE);
+
+ uiItemR(layout, &ptr, "use_falloff_uniform", 0, NULL, ICON_NONE);
row = uiLayoutRow(layout, false);
uiLayoutSetActive(row, use_falloff);
- uiItemR(layout, &ptr, "falloff_radius", 0, NULL, ICON_NONE);
+ uiItemR(row, &ptr, "falloff_radius", 0, NULL, ICON_NONE);
if (RNA_enum_get(&ptr, "falloff_type") == eWarp_Falloff_Curve) {
uiTemplateCurveMapping(layout, &ptr, "falloff_curve", 0, false, false, false, false);
}
-
- uiItemR(layout, &ptr, "use_falloff_uniform", 0, NULL, ICON_NONE);
}
static void panelRegister(ARegionType *region_type)
diff --git a/source/blender/modifiers/intern/MOD_mirror.c b/source/blender/modifiers/intern/MOD_mirror.c
index c1e8f3d036d..ff2ba1e38af 100644
--- a/source/blender/modifiers/intern/MOD_mirror.c
+++ b/source/blender/modifiers/intern/MOD_mirror.c
@@ -140,7 +140,7 @@ static void panel_draw(const bContext *C, Panel *panel)
uiLayoutSetPropSep(col, true);
/* No decorators for the first few rows. */
- uiLayoutSetPropDecorate(col, true);
+ // uiLayoutSetPropDecorate(col, true);
prop = RNA_struct_find_property(&ptr, "use_axis");
row = uiLayoutRowWithHeading(col, true, IFACE_("Axis"));
@@ -162,12 +162,12 @@ static void panel_draw(const bContext *C, Panel *panel)
uiItemS(col);
/* Now decorators are fine, we don't insert multiple items in a single row anymore. */
- uiLayoutSetPropDecorate(col, true);
-
- uiItemR(col, &ptr, "use_clip", 0, IFACE_("Clipping"), ICON_NONE);
+ // uiLayoutSetPropDecorate(col, true);
uiItemR(col, &ptr, "mirror_object", 0, NULL, ICON_NONE);
+ uiItemR(col, &ptr, "use_clip", 0, IFACE_("Clipping"), ICON_NONE);
+
modifier_panel_end(layout, &ptr);
}
diff --git a/source/blender/modifiers/intern/MOD_remesh.c b/source/blender/modifiers/intern/MOD_remesh.c
index 0cf4f94463e..4cbb567f617 100644
--- a/source/blender/modifiers/intern/MOD_remesh.c
+++ b/source/blender/modifiers/intern/MOD_remesh.c
@@ -243,9 +243,9 @@ static void panel_draw(const bContext *C, Panel *panel)
int mode = RNA_enum_get(&ptr, "mode");
- uiLayoutSetPropSep(layout, true);
+ uiItemR(layout, &ptr, "mode", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
- uiItemR(layout, &ptr, "mode", 0, NULL, ICON_NONE);
+ uiLayoutSetPropSep(layout, true);
if (mode == MOD_REMESH_VOXEL) {
uiItemR(layout, &ptr, "voxel_size", 0, NULL, ICON_NONE);
diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c
index dddd6bbf1f8..fb33ce94364 100644
--- a/source/blender/modifiers/intern/MOD_warp.c
+++ b/source/blender/modifiers/intern/MOD_warp.c
@@ -419,7 +419,7 @@ static void panel_draw(const bContext *C, Panel *panel)
if (!RNA_pointer_is_null(&from_obj_ptr) && RNA_enum_get(&from_obj_ptr, "type") == OB_ARMATURE) {
PointerRNA from_obj_data_ptr = RNA_pointer_get(&from_obj_ptr, "data");
- uiItemPointerR(col, &ptr, "bone_from", &from_obj_data_ptr, "bones", NULL, ICON_NONE);
+ uiItemPointerR(col, &ptr, "bone_from", &from_obj_data_ptr, "bones", IFACE_("Bone"), ICON_NONE);
}
col = uiLayoutColumn(layout, true);
@@ -427,7 +427,7 @@ static void panel_draw(const bContext *C, Panel *panel)
PointerRNA to_obj_ptr = RNA_pointer_get(&ptr, "object_to");
if (!RNA_pointer_is_null(&to_obj_ptr) && RNA_enum_get(&to_obj_ptr, "type") == OB_ARMATURE) {
PointerRNA to_obj_data_ptr = RNA_pointer_get(&to_obj_ptr, "data");
- uiItemPointerR(col, &ptr, "bone_to", &to_obj_data_ptr, "bones", NULL, ICON_NONE);
+ uiItemPointerR(col, &ptr, "bone_to", &to_obj_data_ptr, "bones", IFACE_("Bone"), ICON_NONE);
}
uiItemR(layout, &ptr, "use_volume_preserve", 0, NULL, ICON_NONE);
@@ -482,7 +482,7 @@ static void texture_panel_draw(const bContext *C, Panel *panel)
uiLayoutSetPropSep(layout, true);
- uiItemR(layout, &ptr, "texture_coords", 0, NULL, ICON_NONE);
+ uiItemR(layout, &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);
diff --git a/source/blender/modifiers/intern/MOD_wave.c b/source/blender/modifiers/intern/MOD_wave.c
index 0758632eab5..98202603c94 100644
--- a/source/blender/modifiers/intern/MOD_wave.c
+++ b/source/blender/modifiers/intern/MOD_wave.c
@@ -444,7 +444,7 @@ static void position_panel_draw(const bContext *C, Panel *panel)
uiLayoutSetPropSep(layout, true);
- uiItemR(layout, &ptr, "start_position_object", 0, NULL, ICON_NONE);
+ uiItemR(layout, &ptr, "start_position_object", 0, IFACE_("Object"), ICON_NONE);
col = uiLayoutColumn(layout, true);
uiItemR(col, &ptr, "start_position_x", 0, "Start position X", ICON_NONE);
@@ -482,7 +482,7 @@ static void texture_panel_draw(const bContext *C, Panel *panel)
uiLayoutSetPropSep(layout, true);
- uiItemR(layout, &ptr, "texture_coords", 0, NULL, ICON_NONE);
+ uiItemR(layout, &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);
PointerRNA texture_coords_obj_ptr = RNA_pointer_get(&ptr, "texture_coords_object");
diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c
index 568232c2872..810659e6a3c 100644
--- a/source/blender/modifiers/intern/MOD_weightvgproximity.c
+++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c
@@ -655,15 +655,19 @@ static void panel_draw(const bContext *C, Panel *panel)
uiItemR(layout, &ptr, "target", 0, NULL, ICON_NONE);
+ uiItemS(layout);
+
uiItemR(layout, &ptr, "proximity_mode", 0, NULL, ICON_NONE);
if (RNA_enum_get(&ptr, "proximity_mode") == MOD_WVG_PROXIMITY_GEOMETRY) {
- uiItemR(layout, &ptr, "proximity_geometry", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
+ uiItemR(layout, &ptr, "proximity_geometry", UI_ITEM_R_EXPAND, IFACE_("Geometry"), ICON_NONE);
}
col = uiLayoutColumn(layout, true);
uiItemR(col, &ptr, "min_dist", 0, NULL, ICON_NONE);
uiItemR(col, &ptr, "max_dist", 0, NULL, ICON_NONE);
+ uiItemS(layout);
+
row = uiLayoutRow(layout, true);
uiItemR(row, &ptr, "falloff_type", 0, NULL, ICON_NONE);
sub = uiLayoutRow(row, true);
More information about the Bf-blender-cvs
mailing list