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-01-03 21:39:52 +0300
committerHoward Trickey <howard.trickey@gmail.com>2019-01-03 21:39:52 +0300
commitaef01c47e6334b214520f14c72b01de99387f122 (patch)
treef8edbb1bc5cce8c3ea5a2faaffd7462f14a69fa9 /source/blender/makesrna/intern/rna_modifier.c
parentbdfc10e482c4c6724a45259c4b2f2d7cde7d26d0 (diff)
Fix T58113 Multiple problems with bevel harden normals.
Move the bevel hardening code all into bmesh_bevel.c. Based on user feedback, rewrote the bevel hardening algorithm to be more what users want. Based on user feedback, changed the UI, removing some not-useful options. Now hardening normals while beveling is enabled by a simple checkbox. Now setting face strength gives options for which faces get their face strength set.
Diffstat (limited to 'source/blender/makesrna/intern/rna_modifier.c')
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c31
1 files changed, 13 insertions, 18 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 541e5c772f8..5bc925ea969 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -3049,10 +3049,11 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
};
static EnumPropertyItem prop_harden_normals_items[] = {
- { MOD_BEVEL_HN_NONE, "HN_NONE", 0, "Off", "Do not use Harden Normals" },
- { MOD_BEVEL_HN_FACE, "HN_FACE", 0, "Face Area", "Use faces as weight" },
- { MOD_BEVEL_HN_ADJ, "HN_ADJ", 0, "Vertex average", "Use adjacent vertices as weight" },
- { MOD_BEVEL_FIX_SHA, "FIX_SHA", 0, "Fix shading", "Fix normal shading continuity" },
+ { MOD_BEVEL_FACE_STRENGTH_NONE, "FSTR_NONE", 0, "None", "Do not set face strength" },
+ { MOD_BEVEL_FACE_STRENGTH_NEW, "FSTR_NEW", 0, "New", "Set face strength on new faces only" },
+ { MOD_BEVEL_FACE_STRENGTH_AFFECTED, "FSTR_AFFECTED", 0, "Affected",
+ "Set face strength on new and affected faces only" },
+ { MOD_BEVEL_FACE_STRENGTH_ALL, "FSTR_ALL", 0, "All", "Set face strength on all faces" },
{ 0, NULL, 0, NULL, NULL },
};
@@ -3143,22 +3144,16 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Mark Sharp", "Mark beveled edges as sharp");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop = RNA_def_property(srna, "hnmode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, prop_harden_normals_items);
- RNA_def_property_ui_text(prop, "Normal Mode", "Weighting mode for Harden Normals");
+ prop = RNA_def_property(srna, "harden_normals", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_BEVEL_HARDEN_NORMALS);
+ RNA_def_property_ui_text(prop, "Harden Normals",
+ "Match normals of new faces to adjacent faces");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop = RNA_def_property(srna, "hn_strength", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_default(prop, 0.5f);
- RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_range(prop, 0, 1, 1, 2);
- RNA_def_property_ui_text(prop, "Normal Strength", "Strength of calculated normal");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
-
- prop = RNA_def_property(srna, "set_wn_strength", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_BEVEL_SET_WN_STR);
- RNA_def_property_ui_text(prop, "Face Strength",
- "Set face strength of beveled faces for use in Weighted Normal modifier");
+ prop = RNA_def_property(srna, "face_strength_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "face_str_mode");
+ RNA_def_property_enum_items(prop, prop_harden_normals_items);
+ RNA_def_property_ui_text(prop, "Set Face Strength", "Whether to set face strength, and which faces to set it on");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
}