[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48754] trunk/blender/intern/cycles/bvh/ bvh.cpp: fix/workaround for cycles crash packing bvh

Campbell Barton ideasman42 at gmail.com
Mon Jul 9 14:55:17 CEST 2012


Revision: 48754
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48754
Author:   campbellbarton
Date:     2012-07-09 12:55:16 +0000 (Mon, 09 Jul 2012)
Log Message:
-----------
fix/workaround for cycles crash packing bvh

brecht - when you get time please look into this to see if the fix is ok.

Modified Paths:
--------------
    trunk/blender/intern/cycles/bvh/bvh.cpp

Modified: trunk/blender/intern/cycles/bvh/bvh.cpp
===================================================================
--- trunk/blender/intern/cycles/bvh/bvh.cpp	2012-07-09 11:45:07 UTC (rev 48753)
+++ trunk/blender/intern/cycles/bvh/bvh.cpp	2012-07-09 12:55:16 UTC (rev 48754)
@@ -378,10 +378,19 @@
 		int mesh_tri_offset = mesh->tri_offset;
 
 		/* fill in node indexes for instances */
-		if(bvh->pack.is_leaf[0])
+		if(
+		   /* XXX, brecht. check this is needed!. it could be a bug elsewhere
+		    * /mango/pro/scenes/04_2e/04_2e.blend r2158. on Ian's system 192.168.3.27  - campbell */
+		   (bvh->pack.is_leaf.size() != 0) &&
+
+		   /* previously only checked this */
+		   bvh->pack.is_leaf[0])
+		{
 			pack.object_node[object_offset++] = -noffset-1;
-		else
+		}
+		else {
 			pack.object_node[object_offset++] = noffset;
+		}
 
 		mesh_map[mesh] = pack.object_node[object_offset-1];
 




More information about the Bf-blender-cvs mailing list