[Bf-blender-cvs] [413e87b6b7e] blender-v3.1-release: Fix T96048: Crash on appending with driver variables loop in shapekeys.
Bastien Montagne
noreply at git.blender.org
Mon Feb 28 15:03:06 CET 2022
Commit: 413e87b6b7edf8cc1569818de3d26fccc391d235
Author: Bastien Montagne
Date: Mon Feb 28 15:02:17 2022 +0100
Branches: blender-v3.1-release
https://developer.blender.org/rB413e87b6b7edf8cc1569818de3d26fccc391d235
Fix T96048: Crash on appending with driver variables loop in shapekeys.
The usual 'shape keys snowflake' nightmare again...
===================================================================
M source/blender/blenkernel/intern/blendfile_link_append.c
===================================================================
diff --git a/source/blender/blenkernel/intern/blendfile_link_append.c b/source/blender/blenkernel/intern/blendfile_link_append.c
index 9b3f4c2fae8..f0da1b68821 100644
--- a/source/blender/blenkernel/intern/blendfile_link_append.c
+++ b/source/blender/blenkernel/intern/blendfile_link_append.c
@@ -941,8 +941,13 @@ static int foreach_libblock_link_append_callback(LibraryIDLinkCallbackData *cb_d
* processed, so we need to recursively deal with them here. */
/* NOTE: Since we are by-passing checks in `BKE_library_foreach_ID_link` by manually calling it
* recursively, we need to take care of potential recursion cases ourselves (e.g.animdata of
- * shape-key referencing the shape-key itself). */
- if (id != cb_data->id_self) {
+ * shape-key referencing the shape-key itself).
+ * NOTE: in case both IDs (owner and 'used' ones) are non-linkable, we can assume we can break
+ * the dependency here. Indeed, either they are both linked in another way (through their own
+ * meshes for shape keys e.g.), or this is an unsupported case (two shapekeys depending on
+ * each-other need to be also 'linked' in by their respective meshes, independant shapekeys are
+ * not allowed). ref T96048. */
+ if (id != cb_data->id_self && BKE_idtype_idcode_is_linkable(GS(cb_data->id_self->name))) {
BKE_library_foreach_ID_link(
cb_data->bmain, id, foreach_libblock_link_append_callback, data, IDWALK_NOP);
}
More information about the Bf-blender-cvs
mailing list