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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-04-05 15:13:05 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-04-05 15:50:24 +0300
commitd220a87b47e317996e58cf5c597c872bc8970925 (patch)
tree41e4f7d6d30e1421850cbaefb4cae4714ec141e0 /source/blender/makesrna/intern/rna_modifier.c
parent6de0da70de303d6510564bc745a72b7c8a04d929 (diff)
Fix T63283: Second subdivision modifier does not ignore crease
This is something where there is no single correct behavior, sometimes it's needed to ignore the crease to make mesh more smooth. But sometimes crease is to be considered after first subdivision surface: for example, when adding extra subdivisions for render-time displacement. Made it an option whether modifier needs to take crease into account or not. Existing files should be openable in the 2.7 compatible way, to re-create an old behavior the options is to be manually disabled in the modifier settings. Reviewers: brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D4652
Diffstat (limited to 'source/blender/makesrna/intern/rna_modifier.c')
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 6dca81415f3..18ab5565d22 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -1278,6 +1278,11 @@ static void rna_def_modifier_subsurf(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flags", eSubsurfModifierFlag_ControlEdges);
RNA_def_property_ui_text(prop, "Optimal Display", "Skip drawing/rendering of interior subdivided edges");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop = RNA_def_property(srna, "use_creases", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", eSubsurfModifierFlag_UseCrease);
+ RNA_def_property_ui_text(prop, "Use Creases", "Use mesh edge crease information to sharpen edges");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_generic_map_info(StructRNA *srna)
@@ -1423,6 +1428,11 @@ static void rna_def_modifier_multires(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flags", eMultiresModifierFlag_ControlEdges);
RNA_def_property_ui_text(prop, "Optimal Display", "Skip drawing/rendering of interior subdivided edges");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop = RNA_def_property(srna, "use_creases", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", eMultiresModifierFlag_UseCrease);
+ RNA_def_property_ui_text(prop, "Use Creases", "Use mesh edge crease information to sharpen edges");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_lattice(BlenderRNA *brna)