Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2020-11-04 20:14:27 +0300
committerBastien Montagne <bastien@blender.org>2020-11-04 20:16:07 +0300
commit331614e09be27335475ae1543f11b3d509c3c20a (patch)
treefe05d5134a1145a67e832b301fb11b3d9d9b55ce
parentafe5345a3fd1676eebe8b64157133d787d21669d (diff)
Fix T82384: Custom Properties for ShaderNodeTree do not save in blend files.
Not sure why those were excluded, there is no reason not to write ID data itself for embedded IDs...
-rw-r--r--source/blender/blenkernel/intern/collection.c3
-rw-r--r--source/blender/blenkernel/intern/node.c5
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index c4640f33591..7ab63810719 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -174,6 +174,8 @@ static void collection_foreach_id(ID *id, LibraryForeachIDData *data)
void BKE_collection_blend_write_nolib(BlendWriter *writer, Collection *collection)
{
+ BKE_id_blend_write(writer, &collection->id);
+
/* Shared function for collection data-blocks and scene master collection. */
BKE_previewimg_blend_write(writer, collection->preview);
@@ -198,7 +200,6 @@ static void collection_blend_write(BlendWriter *writer, ID *id, const void *id_a
/* write LibData */
BLO_write_id_struct(writer, Collection, id_address, &collection->id);
- BKE_id_blend_write(writer, &collection->id);
BKE_collection_blend_write_nolib(writer, collection);
}
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index c32e2230ee0..c0d50189938 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -404,6 +404,8 @@ static void write_node_socket_interface(BlendWriter *writer, bNodeSocket *sock)
/* this is only direct data, tree itself should have been written */
void ntreeBlendWrite(BlendWriter *writer, bNodeTree *ntree)
{
+ BKE_id_blend_write(writer, &ntree->id);
+
/* for link_list() speed, we write per list */
if (ntree->adt) {
@@ -525,9 +527,6 @@ static void ntree_blend_write(BlendWriter *writer, ID *id, const void *id_addres
ntree->execdata = NULL;
BLO_write_id_struct(writer, bNodeTree, id_address, &ntree->id);
- /* Note that trees directly used by other IDs (materials etc.) are not 'real' ID, they cannot
- * be linked, etc., so we write actual id data here only, for 'real' ID trees. */
- BKE_id_blend_write(writer, &ntree->id);
ntreeBlendWrite(writer, ntree);
}