diff options
author | Bastien Montagne <bastien@blender.org> | 2021-09-27 12:09:48 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-09-27 12:11:43 +0300 |
commit | 8dcddbcc0778b6ac737e63ba7751a4441876e03c (patch) | |
tree | 6814f8b5d4ab7551acf047119baf36578b9fe997 | |
parent | 30ef197c7b57e2763f66abf21a4a148826c365f7 (diff) |
Fix T91711: Blender 3.0 - The Rain demo scene breaks (Proxy to Override auto conversion).
Proxy conversion is a fairly particular case of liboverride creation, in
which remapping all local usages of linked data probably makes more
sense, rather than only doing so whitin the overridden 'group' of IDs.
-rw-r--r-- | source/blender/blenkernel/intern/lib_override.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/lib_override.c b/source/blender/blenkernel/intern/lib_override.c index f382fc0614b..e6ce6734e64 100644 --- a/source/blender/blenkernel/intern/lib_override.c +++ b/source/blender/blenkernel/intern/lib_override.c @@ -1000,6 +1000,18 @@ bool BKE_lib_override_library_proxy_convert(Main *bmain, DEG_id_tag_update(&ob_proxy->id, ID_RECALC_COPY_ON_WRITE); + /* In case of proxy conversion, remap all local ID usages to linked IDs to their newly created + * overrides. + * While this might not be 100% the desired behavior, it is likely to be the case most of the + * time. Ref: T91711. */ + ID *id_iter; + FOREACH_MAIN_ID_BEGIN (bmain, id_iter) { + if (!ID_IS_LINKED(id_iter)) { + id_iter->tag |= LIB_TAG_DOIT; + } + } + FOREACH_MAIN_ID_END; + return BKE_lib_override_library_create(bmain, scene, view_layer, id_root, id_reference, NULL); } |