diff options
author | Bastien Montagne <bastien@blender.org> | 2021-02-04 17:21:29 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-02-08 17:59:08 +0300 |
commit | 302625eb37e6df6a7a5a889c9dd7edbaa640e086 (patch) | |
tree | af03df3b555614a46e4134bebca0b9ac01eb8f81 /source/blender/freestyle | |
parent | f5c781af5643b4660c0ce27468221b37248d8372 (diff) |
Fix (studio-reported) crash in readfile code.
Essentially, `lib_link_all` would perform some post-processing over data
in given `bmain` that **may** fail when not all data from all libraries
has been properly loaded yet.
This happens when `lib_link_all` is called from `read_libraries`, where
the bmains are split by libraries.
Now those post-processing is put into its own utils function, which
asserts that it is only called on a merged bmain.
Bonus point, this will avoid re-runing those not-so-cheap operations
more than once on the same data.
Reproducible in r1442 of Sprite repository when opening
`pro/animation_test/rex/performance/rex_crowdcamping/rex_crowdcamping.lighting.blend`
NOTE: Not so sure why we have to call `lib_link_all` several times (once
for each library, and then once on the whole merged bmain, including
local IDs then). So that it can get called for libs while we still have
that specific .blend file handle around?
In any case, the overhead here is minimal since we do ensure a data-block is
never lib-linked more than once, so this is not a serious concern right now.
Differential Revision: https://developer.blender.org/D10307
Diffstat (limited to 'source/blender/freestyle')
0 files changed, 0 insertions, 0 deletions