merge multires changes into trunk
authorJoseph Eagar <joeedh@gmail.com>
Mon, 3 May 2010 16:06:36 +0000 (16:06 +0000)
committerJoseph Eagar <joeedh@gmail.com>
Mon, 3 May 2010 16:06:36 +0000 (16:06 +0000)
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenlib/intern/pbvh.c

index 9d6086edb8cdd08c9518751c03cc0cd0a0f95873..85791d5024d9c5e02a79b107003d4b99d2d230db 100644 (file)
@@ -1741,7 +1741,6 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
                 */
 
                if(mti->type == eModifierTypeType_OnlyDeform) {
-                       
                        /* No existing verts to deform, need to build them. */
                        if(!deformedVerts) {
                                if(dm) {
@@ -1867,10 +1866,14 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
                                }
                        }
                }
-               
+
                /* grab modifiers until index i */
                if((index >= 0) && (modifiers_indexInObject(ob, md) >= index))
                        break;
+
+               /*don't allow other modifiers past multires if in sculpt mode*/
+               if (!useRenderParams && ((ob->mode & OB_MODE_SCULPT) && ob->sculpt))
+                       break;
        }
 
        for(md=firstmd; md; md=md->next)
index 67b75e95cf44893687114cb4409707a4d9d6939b..a189e9fbaf20b66a21739b8beb3d7732850d85c1 100644 (file)
@@ -1214,6 +1214,8 @@ int BLI_pbvh_node_raycast(PBVH *bvh, PBVHNode *node, float (*origco)[3],
 
                for(i = 0; i < totgrid; ++i) {
                        DMGridData *grid= bvh->grids[node->prim_indices[i]];
+                       if (!grid)
+                               continue;
 
                        for(y = 0; y < gridsize-1; ++y) {
                                for(x = 0; x < gridsize-1; ++x) {