Fix for cloth/smoke: Collision and flow objects always had to be on the same layer.

Reported and patch by MiikaH
This commit is contained in:
Daniel Genrich 2012-12-11 20:39:54 +00:00
parent 892d21631b
commit b5ce1b1a23

View File

@ -567,7 +567,9 @@ Object **get_collisionobjects(Scene *scene, Object *self, Group *group, unsigned
Scene *sce_iter; Scene *sce_iter;
/* add objects in same layer in scene */ /* add objects in same layer in scene */
for (SETLOOPER(scene, sce_iter, base)) { for (SETLOOPER(scene, sce_iter, base)) {
if (base->lay & self->lay) /* Need to check for active layers, too.
Otherwise this check fails if the objects are not on the same layer - DG */
if ((base->lay & self->lay) || (base->lay & scene->lay))
add_collision_object(&objs, &numobj, &maxobj, base->object, self, 0, modifier_type); add_collision_object(&objs, &numobj, &maxobj, base->object, self, 0, modifier_type);
} }