Own TODO item: sculpting on constructive modifiers
[blender.git] / source / blender / editors / util / crazyspace.c
index a2b32ec7cf866164130953b1cc9d41d174910e26..9560924941dc65bd33bee2b3d90b7c71f03fdb03 100644 (file)
@@ -425,4 +425,15 @@ void crazyspace_build_sculpt(Scene *scene, Object *ob, float (**deformmats)[3][3
                MEM_freeN(origVerts);
                MEM_freeN(quats);
        }
+
+       if(!*deformmats) {
+               int a, numVerts;
+               Mesh *me= (Mesh*)ob->data;
+
+               *deformcos= mesh_getVertexCos(me, &numVerts);
+               *deformmats= MEM_callocN(sizeof(*(*deformmats))*numVerts, "defmats");
+
+               for(a=0; a<numVerts; a++)
+                       unit_m3((*deformmats)[a]);
+       }
 }