diff options
author | Jeroen Bakker <jeroen@blender.org> | 2020-12-15 13:15:01 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-12-15 13:15:01 +0300 |
commit | 35368e8bfc5f9811f3a519b2262124ebe9ccf9e0 (patch) | |
tree | a09ef8e16fb9fd39ffbec8a450331a2cb99972b1 /source/blender/blenkernel/intern/node.c | |
parent | 12792ee70cd87ce4495a62cb89fd37b95be11917 (diff) |
Fix: mattes of cryptomatte node lost after write
Fix an issue introduced by {f4df036bc497} where the read/write
code missed to store and read the mattes from its new location.
Diffstat (limited to 'source/blender/blenkernel/intern/node.c')
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index a9a1740f4a8..75f2fca1096 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -494,6 +494,9 @@ void ntreeBlendWrite(BlendWriter *writer, bNodeTree *ntree) if (nc->matte_id) { BLO_write_string(writer, nc->matte_id); } + LISTBASE_FOREACH (CryptomatteEntry *, entry, &nc->entries) { + BLO_write_struct(writer, CryptomatteEntry, entry); + } BLO_write_struct_by_name(writer, node->typeinfo->storagename, node->storage); } else if (node->typeinfo != &NodeTypeUndefined) { @@ -646,6 +649,7 @@ void ntreeBlendReadData(BlendDataReader *reader, bNodeTree *ntree) case CMP_NODE_CRYPTOMATTE: { NodeCryptomatte *nc = (NodeCryptomatte *)node->storage; BLO_read_data_address(reader, &nc->matte_id); + BLO_read_list(reader, &nc->entries); break; } case TEX_NODE_IMAGE: { |