[Bf-blender-cvs] [a3b151f] master: Fix for accessing looptri's from subsurf

Campbell Barton noreply at git.blender.org
Wed Aug 19 09:32:03 CEST 2015


Commit: a3b151f341cd415ac48adb96c5b3d448ea2617fc
Author: Campbell Barton
Date:   Wed Aug 19 17:24:08 2015 +1000
Branches: master
https://developer.blender.org/rBa3b151f341cd415ac48adb96c5b3d448ea2617fc

Fix for accessing looptri's from subsurf

Use poly count since tessfaces may be zero

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

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

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

diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index bd5a2f7..e1b18d5 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -4016,7 +4016,7 @@ static const MLoopTri *ccgDM_getLoopTriArray(DerivedMesh *dm)
 	}
 	else {
 		MLoopTri *mlooptri;
-		const int tottri = dm->numTessFaceData * 2;
+		const int tottri = dm->numPolyData * 2;
 		int i, poly_index;
 
 		DM_ensure_looptri_data(dm);




More information about the Bf-blender-cvs mailing list