[Bf-blender-cvs] [c306d66] opensubdiv-modifier: Fallback simple subdivisions to legacy code

Sergey Sharybin noreply at git.blender.org
Fri May 2 11:11:08 CEST 2014


Commit: c306d6627b946a2a7db3f6dccea41b521382e9b5
Author: Sergey Sharybin
Date:   Fri May 2 12:48:39 2014 +0600
https://developer.blender.org/rBc306d6627b946a2a7db3f6dccea41b521382e9b5

Fallback simple subdivisions to legacy code

For until OpenSubdiv case is capable of handling simple subsurf
let's fallback to legacy implementation rather than doing CC
subdivisions.

Not really sure we'll be able to have a single implementation
for bot of the cases, but bet simple subsurf might be re-done
real easy once we clean up the CCG structures for the osd.

===================================================================

M	source/blender/blenkernel/intern/CCGSubSurf.c

===================================================================

diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c
index 2d7070d..019e799 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf.c
@@ -2718,7 +2718,8 @@ static void ccgSubSurf__syncOpenSubdiv(CCGSubSurf *ss)
 }
 
 #  undef OSD_LOG
-#else  /* WITH_OPENSUBDIV */
+#endif  /* WITH_OPENSUBDIV */
+
 static void ccgSubSurf__syncLegacy(CCGSubSurf *ss)
 {
 	CCGVert **effectedV;
@@ -2999,12 +3000,17 @@ static void ccgSubSurf__syncLegacy(CCGSubSurf *ss)
 	MEM_freeN(effectedE);
 	MEM_freeN(effectedV);
 }
-#endif  /* WITH_OPENSUBDIV */
 
 static void ccgSubSurf__sync(CCGSubSurf *ss)
 {
 #ifdef WITH_OPENSUBDIV
-	ccgSubSurf__syncOpenSubdiv(ss);
+	if (ss->meshIFC.simpleSubdiv) {
+		/* Somple subdivisions we currently fallback to legacy code. */
+		ccgSubSurf__syncLegacy(ss);
+	}
+	else {
+		ccgSubSurf__syncOpenSubdiv(ss);
+	}
 #else
 	ccgSubSurf__syncLegacy(ss);
 #endif




More information about the Bf-blender-cvs mailing list