[#17707] Slow Cloth Baking
authorDaniel Genrich <daniel.genrich@gmx.net>
Mon, 29 Sep 2008 14:20:27 +0000 (14:20 +0000)
committerDaniel Genrich <daniel.genrich@gmx.net>
Mon, 29 Sep 2008 14:20:27 +0000 (14:20 +0000)
source/blender/blenkernel/intern/collision.c

index b5e09d551f038f371d2a6e180e9beef136cf1112..b8f5b467c11ca3e972342920b8ce77f1cd6dd589 100644 (file)
@@ -1307,6 +1307,10 @@ CollisionModifierData **get_collisionobjects(Object *self, int *numcollobj)
        // check all collision objects
        for ( base = G.scene->base.first; base; base = base->next )
        {
+               /*Only proceed for mesh object in same layer */
+               if(!(base->object->type==OB_MESH && (base->lay & self->lay))) 
+                       continue;
+               
                coll_ob = base->object;
                
                if(coll_ob->pd && coll_ob->pd->deflect)