[Bf-blender-cvs] [73522e1] master: OpenSubdiv: Fix/workaround for missing generated coordinates in viewport
Sergey Sharybin
noreply at git.blender.org
Mon Aug 3 20:42:03 CEST 2015
Commit: 73522e1157eba1f475454c153f7c027f5dd097ea
Author: Sergey Sharybin
Date: Mon Aug 3 20:35:43 2015 +0200
Branches: master
https://developer.blender.org/rB73522e1157eba1f475454c153f7c027f5dd097ea
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.
===================================================================
M source/blender/blenkernel/intern/DerivedMesh.c
===================================================================
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 25f409b..fd98fca 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;
}
More information about the Bf-blender-cvs
mailing list