diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-08-03 18:30:44 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-08-03 18:51:18 +0300 |
commit | 7667ad2d4e616ea0d412ac63e76c220a7106d065 (patch) | |
tree | ef6f86ffa9af39c52ba32346044957c743e33544 /source/blender/makesrna | |
parent | e90fea72c1430d270ccf4b5c3880f7e25e35947e (diff) |
OpenSubdiv: Made it a modifier option to enable OSD for viewport
The idea of this commit is to make it so we can enable OpenSubdiv by default
for the release builds but keep it limited to the viewport only for a specific
meshes. This is a temporary solution for until all the needed features are
supported on the OpenSubdiv side.
Flag itself is done as a dedicated field in modifier DNA so we can easily
remove it in the future without ending up with some temporary flag hanging
around forever.
Diffstat (limited to 'source/blender/makesrna')
-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 affaef3aa7b..6c595076fbd 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -1119,6 +1119,13 @@ static void rna_def_modifier_subsurf(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flags", eSubsurfModifierFlag_SubsurfUv); RNA_def_property_ui_text(prop, "Subdivide UVs", "Use subsurf to subdivide UVs"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); + +#ifdef WITH_OPENSUBDIV + prop = RNA_def_property(srna, "use_opensubdiv", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "use_opensubdiv", 1); + RNA_def_property_ui_text(prop, "Use OpenSubdiv", "Use OpenSubdiv for the subdivisions (viewport only)"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); +#endif } static void rna_def_modifier_generic_map_info(StructRNA *srna) |