diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-02-28 20:03:48 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-02-28 22:47:50 +0300 |
commit | 7d0fcaa69a64eed8a37598213b120582f12fb437 (patch) | |
tree | c41d26ad89de03e2916f518f663ca9f16cc1f814 /source/blender/makesrna/intern/rna_modifier.c | |
parent | f95f1a47b4dcf3ce2a41362eb1f1655b9e6f545a (diff) |
'Fix' T61942: Triangulate modifier breaks custom normals.
Not a bug, but supporting preservation of custom normals in that
specific modifier makes sense, in game pipeline contexts.
Could also ease work of IO add-ons that want to export
triangulated geometry...
Diffstat (limited to 'source/blender/makesrna/intern/rna_modifier.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index ae22fbd5e54..31c78533151 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -4353,6 +4353,13 @@ static void rna_def_modifier_triangulate(BlenderRNA *brna) RNA_def_property_enum_items(prop, rna_enum_modifier_triangulate_ngon_method_items); RNA_def_property_ui_text(prop, "Polygon Method", "Method for splitting the polygons into triangles"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop = RNA_def_property(srna, "keep_custom_normals", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_TRIANGULATE_KEEP_CUSTOMLOOP_NORMALS); + RNA_def_property_ui_text(prop, "Keep Normals", + "Try to preserve custom normals (WARNING: depending on chosen triangulation method, " + "shading may not be fully preserved, 'Fixed' method usually gives the best result here)"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); } static void rna_def_modifier_meshcache(BlenderRNA *brna) |