Compositor: Cryptomatte compositing node.

This patch adds a new matte node that implements the Cryptomatte specification.
It also incluces a custom eye dropper that works outside of a color picker.
Cryptomatte export for the Cycles render engine will be in a separate patch.

Reviewers: brecht

Reviewed By: brecht

Subscribers: brecht

Tags: #compositing

Differential Revision: https://developer.blender.org/D3531
This commit is contained in:
Stefan Werner
2018-07-18 13:03:09 +02:00
parent 41045478ab
commit bdda0964e0
30 changed files with 1067 additions and 43 deletions

View File

@@ -1077,6 +1077,13 @@ static void write_nodetree_nolib(WriteData *wd, bNodeTree *ntree)
}
writestruct_id(wd, DATA, node->typeinfo->storagename, 1, node->storage);
}
else if ((ntree->type == NTREE_COMPOSIT) && (node->type == CMP_NODE_CRYPTOMATTE)) {
NodeCryptomatte *nc = (NodeCryptomatte *)node->storage;
if (nc->matte_id) {
writedata(wd, DATA, strlen(nc->matte_id) + 1, nc->matte_id);
}
writestruct_id(wd, DATA, node->typeinfo->storagename, 1, node->storage);
}
else {
writestruct_id(wd, DATA, node->typeinfo->storagename, 1, node->storage);
}