diff options
author | Bastien Montagne <bastien@blender.org> | 2020-12-17 14:03:34 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-12-17 14:05:30 +0300 |
commit | cf2ebaf27c78b3f8f79d9d014ca2261228f87e70 (patch) | |
tree | 760a0598385dbeae24c764f3d79fb9338312d21a /source/blender/blenkernel | |
parent | 0eedba328df3cbc326900c34cdfc39b8554ad5ec (diff) |
Fix T83875: Converting Proxy to override crashes blender.
Some weird proxies apparently can have a local collection instancing...
Not sure this is even really valid for proxies, but in any case we
cannot override that, just detect and properly cancel the operation
then.
Should be backported to 2.91.1 should we do it.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/lib_override.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/lib_override.c b/source/blender/blenkernel/intern/lib_override.c index 11544d83ba9..cabc80d4024 100644 --- a/source/blender/blenkernel/intern/lib_override.c +++ b/source/blender/blenkernel/intern/lib_override.c @@ -702,6 +702,12 @@ bool BKE_lib_override_library_proxy_convert(Main *bmain, &ob_proxy->proxy->id; ID *id_reference = is_override_instancing_object ? &ob_proxy_group->id : &ob_proxy->id; + /* In some cases the instance collection of a proxy object may be local (see e.g. T83875). Not + * sure this is a valid state, but for now just abort the overriding process. */ + if (!ID_IS_OVERRIDABLE_LIBRARY(id_root)) { + return false; + } + /* We manually convert the proxy object into a library override, further override handling will * then be handled by `BKE_lib_override_library_create()` just as for a regular override * creation. |