diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-08-03 21:35:43 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-08-03 21:39:00 +0300 |
commit | 73522e1157eba1f475454c153f7c027f5dd097ea (patch) | |
tree | 3fb4b619f0a94c17ed28d7e929daeac15d72c7bd /source/blender/blenkernel | |
parent | 0951ea2c6d6f013c79fb82337f9e75b64cd32f06 (diff) |
OpenSubdiv: Fix/workaround for missing generated coordinates in viewport
This actually requires some bigger work to make it fully supported but
for now at least avoid breaking shading with OpenSundiv option disabled.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 25f409b037c..fd98fcac2f3 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -76,6 +76,10 @@ static DerivedMesh *navmesh_dm_createNavMeshForVisualization(DerivedMesh *dm); #include "GPU_extensions.h" #include "GPU_glew.h" +#ifdef WITH_OPENSUBDIV +# include "DNA_userdef_types.h" +#endif + /* very slow! enable for testing only! */ //#define USE_MODIFIER_VALIDATE @@ -2543,7 +2547,9 @@ static bool calc_modifiers_skip_orco(const Object *ob) if (last_md != NULL && last_md->type == eModifierType_Subsurf) { - return true; + SubsurfModifierData *smd = (SubsurfModifierData *)last_md; + /* TODO(sergey): Deduplicate this with checks from subsurf_ccg.c. */ + return smd->use_opensubdiv && U.opensubdiv_compute_type != USER_OPENSUBDIV_COMPUTE_NONE; } return false; } |