Page MenuHome

Fix T82439: Crash moving collections between scenes
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Nov 14 2020, 8:28 PM.

Details

Summary

The original code for viewlayer collection flag syncing across moves
from D9158 didn't consider the case where the collection could no longer
be found in its original view layer (moving a collections betwen scenes).

The fix is to just check if the collection starts in the same scene as
it will be moved to before trying to do the flag syncing.

I thought about this for a while and tried a couple other solutions, but
I couldn't come up with a proper way to support syncing the layer
collection flags across scenes without making too many changes.
P1769 seems to work, but I couldn't figure out exactly why, which
scares me a bit, so instead this patch just disables the flag syncing
in this case.

Diff Detail

Repository
rB Blender

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Nov 14 2020, 8:28 PM
Bastien Montagne (mont29) added inline comments.
source/blender/blenkernel/intern/collection.c
1693–1694

Would be nice to have a comment explaining why this is needed.

This revision is now accepted and ready to land.Nov 14 2020, 11:42 PM
Hans Goudey (HooglyBoogly) marked an inline comment as done.Nov 16 2020, 5:17 PM