Fix T73170: New Scene -> "Full Copy" Crashes Blender.
rBac723db57fd8ba5 makes proper remapping of all pointers in Scene... including the object pointers of bases in ViewLayers. Using `BKE_main_collection_sync_remap()` makes sense here anyway (compared to `BKE_main_collection_sync()`, it additionally clears caches in ViewLayers and Collections), this whole code makes a lot of remapping. Note that I do not really understand *why* that was working OK before rBac723db57fd8ba5. I.E. *why* not remapping at all ViewLayers' base object pointers seemed to be OK... This whole collection/viewlayer caching is very hard to follow, and really needs a full rework at some point (just as much as ID copying code in general, and scene copying code in particular, in fact).
This commit is contained in:
@@ -1802,7 +1802,7 @@ static void single_object_users(
|
||||
|
||||
/* Making single user may affect other scenes if they share
|
||||
* with current one some collections in their ViewLayer. */
|
||||
BKE_main_collection_sync(bmain);
|
||||
BKE_main_collection_sync_remap(bmain);
|
||||
}
|
||||
|
||||
/* not an especially efficient function, only added so the single user
|
||||
|
Reference in New Issue
Block a user