Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2009-01-04 17:14:06 +0300
committerTon Roosendaal <ton@blender.org>2009-01-04 17:14:06 +0300
commitf7cb86df3a9ceccc4d649e42735732a608169157 (patch)
tree558a9ba43708a2213b1afa8f46d79f5daa140bc6 /source/blender/blenkernel/intern/collision.c
parent74f9e98c828c17910405092785633373d4ae88e8 (diff)
2.5
Think global, act local! The old favorite G.scene gone! Man... that took almost 2 days. Also removed G.curscreen and G.edbo. Not everything could get solved; here's some notes. - modifiers now store current scene in ModifierData. This is not meant for permanent, but it can probably stick there until we cleaned the anim system and depsgraph to cope better with timing issues. - Game engine G.scene should become an argument for staring it. Didn't solve this yet. - Texture nodes should get scene cfra, but the current implementation is too tightly wrapped to do it easily.
Diffstat (limited to 'source/blender/blenkernel/intern/collision.c')
-rw-r--r--source/blender/blenkernel/intern/collision.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c
index 4f8068ac252..9e57fef41f7 100644
--- a/source/blender/blenkernel/intern/collision.c
+++ b/source/blender/blenkernel/intern/collision.c
@@ -1296,7 +1296,7 @@ int cloth_collision_moving ( ClothModifierData *clmd, CollisionModifierData *col
// return all collision objects in scene
// collision object will exclude self
-CollisionModifierData **get_collisionobjects(Object *self, int *numcollobj)
+CollisionModifierData **get_collisionobjects(Scene *scene, Object *self, int *numcollobj)
{
Base *base=NULL;
CollisionModifierData **objs = NULL;
@@ -1306,7 +1306,7 @@ CollisionModifierData **get_collisionobjects(Object *self, int *numcollobj)
objs = MEM_callocN(sizeof(CollisionModifierData *)*maxobj, "CollisionObjectsArray");
// check all collision objects
- for ( base = G.scene->base.first; base; base = base->next )
+ for ( base = 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)))
@@ -1451,7 +1451,7 @@ int cloth_bvh_objcollisions_resolve ( ClothModifierData * clmd, CollisionModifie
}
// cloth - object collisions
-int cloth_bvh_objcollision ( Object *ob, ClothModifierData * clmd, float step, float dt )
+int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, float dt )
{
Cloth *cloth=NULL;
BVHTree *cloth_bvh=NULL;
@@ -1481,7 +1481,7 @@ int cloth_bvh_objcollision ( Object *ob, ClothModifierData * clmd, float step, f
bvhtree_update_from_cloth ( clmd, 1 ); // 0 means STATIC, 1 means MOVING (see later in this function)
bvhselftree_update_from_cloth ( clmd, 0 ); // 0 means STATIC, 1 means MOVING (see later in this function)
- collobjs = get_collisionobjects(ob, &numcollobj);
+ collobjs = get_collisionobjects(clmd->scene, ob, &numcollobj);
if(!collobjs)
return 0;