Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-30 06:42:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-30 07:48:39 +0300
commite83d4d963766487919edb8858de0020ef2c3cfe8 (patch)
tree71e6c2b81ad7d7b349afc0b6c1e75e2eccb2373d /source/blender/makesrna
parent95a9646c00a1cbf727f24c506c4aeffe99016352 (diff)
UI: reorganize proportional editing options
- Move connected & projected into individual toggles. - Top-level proportional editing button now only toggles. - Use popover for proportional edit-mode falloff and options. Note that it's no longer possible to toggle connected via key bindings, although this could be supported again if it's needed. Resolves T58081
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/RNA_enum_types.h1
-rw-r--r--source/blender/makesrna/intern/rna_scene.c40
2 files changed, 17 insertions, 24 deletions
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
index 463d612094e..56791542fbd 100644
--- a/source/blender/makesrna/RNA_enum_types.h
+++ b/source/blender/makesrna/RNA_enum_types.h
@@ -44,7 +44,6 @@ extern const EnumPropertyItem rna_enum_metaelem_type_items[];
extern const EnumPropertyItem rna_enum_proportional_falloff_items[];
extern const EnumPropertyItem rna_enum_proportional_falloff_curve_only_items[];
-extern const EnumPropertyItem rna_enum_proportional_editing_items[];
extern const EnumPropertyItem rna_enum_snap_target_items[];
extern const EnumPropertyItem rna_enum_snap_element_items[];
extern const EnumPropertyItem rna_enum_snap_node_element_items[];
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 8802eb07149..bb42c044c6d 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -148,22 +148,6 @@ const EnumPropertyItem rna_enum_proportional_falloff_curve_only_items[] = {
{0, NULL, 0, NULL, NULL},
};
-const EnumPropertyItem rna_enum_proportional_editing_items[] = {
- {PROP_EDIT_OFF, "DISABLED", ICON_PROP_OFF, "Disable", "Proportional Editing disabled"},
- {PROP_EDIT_ON, "ENABLED", ICON_PROP_ON, "Enable", "Proportional Editing enabled"},
- {PROP_EDIT_PROJECTED,
- "PROJECTED",
- ICON_PROP_PROJECTED,
- "Projected (2D)",
- "Proportional Editing using screen space locations"},
- {PROP_EDIT_CONNECTED,
- "CONNECTED",
- ICON_PROP_CON,
- "Connected",
- "Proportional Editing using connected geometry only"},
- {0, NULL, 0, NULL, NULL},
-};
-
/* keep for operators, not used here */
const EnumPropertyItem rna_enum_mesh_select_mode_items[] = {
{SCE_SELECT_VERTEX, "VERTEX", ICON_VERTEXSEL, "Vertex", "Vertex selection mode"},
@@ -2798,19 +2782,29 @@ static void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
/* Transform */
- prop = RNA_def_property(srna, "proportional_edit", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "proportional");
- RNA_def_property_enum_items(prop, rna_enum_proportional_editing_items);
- RNA_def_property_ui_text(prop,
- "Proportional Editing",
- "Proportional Editing mode, allows transforms with distance fall-off");
+ prop = RNA_def_property(srna, "use_proportional_edit", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "proportional_edit", PROP_EDIT_USE);
+ RNA_def_property_ui_text(prop, "Proportional Editing", "Proportional edit mode");
+ RNA_def_property_ui_icon(prop, ICON_PROP_ON, 0);
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
prop = RNA_def_property(srna, "use_proportional_edit_objects", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "proportional_objects", 0);
RNA_def_property_ui_text(
prop, "Proportional Editing Objects", "Proportional editing object mode");
- RNA_def_property_ui_icon(prop, ICON_PROP_OFF, 1);
+ RNA_def_property_ui_icon(prop, ICON_PROP_ON, 0);
+ RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
+
+ prop = RNA_def_property(srna, "use_proportional_projected", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "proportional_edit", PROP_EDIT_PROJECTED);
+ RNA_def_property_ui_text(
+ prop, "Projected from View", "Proportional Editing using screen space locations");
+ RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
+
+ prop = RNA_def_property(srna, "use_proportional_connected", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "proportional_edit", PROP_EDIT_CONNECTED);
+ RNA_def_property_ui_text(
+ prop, "Connected Only", "Proportional Editing using connected geometry only");
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
prop = RNA_def_property(srna, "use_proportional_edit_mask", PROP_BOOLEAN, PROP_NONE);