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...
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user