Fix #68436: External Particle Disk Cache Playback Is Broken #117401

Merged
Philipp Oeser merged 2 commits from lichtwerk/blender:68436_b into main 2024-01-23 09:37:52 +01:00

2 Commits

Author SHA1 Message Date
Philipp Oeser a7877988b6 address review from Brecht 2024-01-23 09:14:14 +01:00
Philipp Oeser b07950fe79 Fix #68436: External Particle Disk Cache Playback Is Broken
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
This has been broken since 2.8.

The highlevel reason for this is that the "info file" (saved as frame
zero) was not written anymore.
Reason for that in turn is that when calling BKE_ptcache_write outside
the bake job, the PTCacheID calldata (a psys in our case) is not the
evaluated particle system, causing a check for totpoint to fail (these
were always zero).

Deeper reasoning is unclear, no further investigations were done as to
why/when this happened.

The solution proposed here is using the evaluated psys when writing the
info frame (and this is isolated to just this spot and only to particle
systems). File then gets
written and can/will be read when using this as an external disk cache
in another file.
2024-01-22 11:44:42 +01:00