diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2014-02-14 15:54:42 +0400 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2014-02-14 15:58:43 +0400 |
commit | 30c9fe19a31f6f92be4de2abacb9fd96179a9a04 (patch) | |
tree | 98334e36b5bc88b731eafa463055bad8768d46d3 /source/blender/blenkernel/BKE_effect.h | |
parent | 32b45cb4a7adeae637e02c3a8da87e28844e587f (diff) |
Fix for crash caused by effectors doing precalculation //during// DAG
updates.
This file crashes on loading with NULL pointer access to curve_cache:
{F77132}
The pdInitEffectors function was amalgamating the simple
collection of effector objects with an automatic precalculation for
curve guides and the like. This precalculation requires object data
that may not be available until the DAG has finished.
Since for DAG dependencies only the list of effectors is required,
added an argument to disable precalculation when collecting effectors.
Diffstat (limited to 'source/blender/blenkernel/BKE_effect.h')
-rw-r--r-- | source/blender/blenkernel/BKE_effect.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_effect.h b/source/blender/blenkernel/BKE_effect.h index 562a67f14f5..d5e54d849cd 100644 --- a/source/blender/blenkernel/BKE_effect.h +++ b/source/blender/blenkernel/BKE_effect.h @@ -110,8 +110,9 @@ typedef struct EffectorCache { } EffectorCache; void free_partdeflect(struct PartDeflect *pd); -struct ListBase *pdInitEffectors(struct Scene *scene, struct Object *ob_src, struct ParticleSystem *psys_src, struct EffectorWeights *weights); +struct ListBase *pdInitEffectors(struct Scene *scene, struct Object *ob_src, struct ParticleSystem *psys_src, struct EffectorWeights *weights, bool precalc); void pdEndEffectors(struct ListBase **effectors); +void pdPrecalculateEffectors(struct ListBase *effectors); void pdDoEffectors(struct ListBase *effectors, struct ListBase *colliders, struct EffectorWeights *weights, struct EffectedPoint *point, float *force, float *impulse); void pd_point_from_particle(struct ParticleSimulationData *sim, struct ParticleData *pa, struct ParticleKey *state, struct EffectedPoint *point); |