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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-06-22 15:42:03 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-06-25 14:35:41 +0300
commita99dcab148ed209409f3b2479ada12d869ae84b6 (patch)
tree2b7fc55752cbe3538fc05c8f77fd86b18a0d6df7 /source/blender/blenkernel/intern/effect.c
parent5b3ff9f7d890554ae87e63095f24ac6d31a36d3c (diff)
Depsgraph: cache collision relations, for performance and stability.
Same reasoning as effector relations in earlier commit.
Diffstat (limited to 'source/blender/blenkernel/intern/effect.c')
-rw-r--r--source/blender/blenkernel/intern/effect.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index adf5b5da35e..2894ff4f1e7 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -267,11 +267,11 @@ void BKE_effector_relations_free(ListBase *lb)
/* Create effective list of effectors from relations built beforehand. */
ListBase *BKE_effectors_create(
Depsgraph *depsgraph,
- Scene *scene,
Object *ob_src,
ParticleSystem *psys_src,
EffectorWeights *weights)
{
+ Scene *scene = DEG_get_evaluated_scene(depsgraph);
ListBase *relations = DEG_get_effector_relations(depsgraph, weights->group);
ListBase *effectors = NULL;
@@ -420,7 +420,7 @@ static float eff_calc_visibility(ListBase *colliders, EffectorCache *eff, Effect
return visibility;
if (!colls)
- colls = get_collider_cache(eff->scene, eff->ob, NULL);
+ colls = BKE_collider_cache_create(eff->depsgraph, eff->ob, NULL);
if (!colls)
return visibility;
@@ -458,7 +458,7 @@ static float eff_calc_visibility(ListBase *colliders, EffectorCache *eff, Effect
}
if (!colliders)
- free_collider_cache(&colls);
+ BKE_collider_cache_free(&colls);
return visibility;
}