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:
authorCampbell Barton <campbell@blender.org>2022-04-14 09:58:15 +0300
committerCampbell Barton <campbell@blender.org>2022-04-14 09:58:15 +0300
commit405bff7fd8ed5df8d44a1362763fac7c00e2060b (patch)
tree8293e05a1ebb0774bba60157a985f3a2de9bff62 /source/blender/makesdna/DNA_particle_types.h
parentbc8dcf6db7698505d61d9bd2c010b187b909704c (diff)
Fix T68290: Baked particles don't render in final frame
Particles baked into memory would never load the final frame because of an off-by-one error calculating the particles `dietime`. This value indicates the frame which the particle ceases to exist but was being set to the end-frame which caused this bug as the scenes end-frame is inclusive. While the last frame was properly written and read from memory, the `dietime` was set to the last frame causing all the particles to be considered dead when calculating the cached particle system.
Diffstat (limited to 'source/blender/makesdna/DNA_particle_types.h')
-rw-r--r--source/blender/makesdna/DNA_particle_types.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index f3d342e4849..268e1412eef 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -109,7 +109,12 @@ typedef struct ParticleData {
/** Die-time is not necessarily time+lifetime as. */
float time, lifetime;
- /** Particles can die unnaturally (collision). */
+ /**
+ * Particles can die unnaturally (collision).
+ *
+ * \note Particles die on this frame, be sure to add 1 when clamping the lifetime of particles
+ * to inclusive ranges such as the scenes end frame. See: T68290.
+ */
float dietime;
/**