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:
authorHoward Trickey <howard.trickey@gmail.com>2019-05-07 15:45:01 +0300
committerHoward Trickey <howard.trickey@gmail.com>2019-05-07 15:45:01 +0300
commite4669199bf9c819d82072f7dd93ff7156e9e72aa (patch)
tree91cf4166cef1631b6a7d0cce3b257b718ffe8cfc /source/blender/editors/mesh
parentc041e10c9a94864537e78c4a36e3f03838889655 (diff)
Normals menu for face strength improved.
Now cascading menus in Mesh > Normals set and select face strength with explicit choices of Weak / Medium / Strong.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 40d64f06f7b..9dae42508db 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -8973,7 +8973,7 @@ static int edbm_mod_weighted_strength_exec(bContext *C, wmOperator *op)
const int cd_prop_int_offset = CustomData_get_n_offset(
&bm->pdata, CD_PROP_INT, cd_prop_int_index);
- const int face_strength = scene->toolsettings->face_strength;
+ const int face_strength = RNA_enum_get(op->ptr, "face_strength");
const bool set = RNA_boolean_get(op->ptr, "set");
BM_mesh_elem_index_ensure(bm, BM_FACE);
@@ -9002,6 +9002,13 @@ static int edbm_mod_weighted_strength_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
+static const EnumPropertyItem prop_mesh_face_strength_types[] = {
+ {FACE_STRENGTH_WEAK, "WEAK", 0, "Weak", ""},
+ {FACE_STRENGTH_MEDIUM, "MEDIUM", 0, "Medium", ""},
+ {FACE_STRENGTH_STRONG, "STRONG", 0, "Strong", ""},
+ {0, NULL, 0, NULL, NULL},
+};
+
void MESH_OT_mod_weighted_strength(struct wmOperatorType *ot)
{
/* identifiers */
@@ -9017,5 +9024,12 @@ void MESH_OT_mod_weighted_strength(struct wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ot->prop = RNA_def_boolean(ot->srna, "set", 0, "Set value", "Set Value of faces");
- RNA_def_property_flag(ot->prop, PROP_HIDDEN);
+
+ ot->prop = RNA_def_enum(
+ ot->srna,
+ "face_strength",
+ prop_mesh_face_strength_types,
+ FACE_STRENGTH_MEDIUM,
+ "Face Strength",
+ "Strength to use for assigning or selecting face influence for weighted normal modifier");
}