diff options
author | Jeroen Bakker <jeroen@blender.org> | 2020-12-14 18:14:21 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-12-14 18:14:38 +0300 |
commit | f4df036bc497b134789b624efd9008c6f4b9c6c8 (patch) | |
tree | fd9537758878f679087ff6854b1913b129b3ded8 /source/blender/blenkernel/BKE_cryptomatte.h | |
parent | 07ce9910f7ccaa48ae28c35049dec598b6214b36 (diff) |
Cryptomatte: Data structure in compositor node
This changes the way how the mattes are stored in the compositor node. This used to
be a single string what was decoded/encoded when needed. The new data structure
stores all entries in `CryptomatteEntry` and is converted to the old `matte_id`
property on the fly.
This is done for some future changes in the workflow where a more structured
approach leads to less confusing and easier to read code.
Diffstat (limited to 'source/blender/blenkernel/BKE_cryptomatte.h')
-rw-r--r-- | source/blender/blenkernel/BKE_cryptomatte.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_cryptomatte.h b/source/blender/blenkernel/BKE_cryptomatte.h index 929266d1b89..c3c17f72cae 100644 --- a/source/blender/blenkernel/BKE_cryptomatte.h +++ b/source/blender/blenkernel/BKE_cryptomatte.h @@ -25,18 +25,28 @@ #include "BLI_sys_types.h" +#include "DNA_layer_types.h" + #ifdef __cplusplus extern "C" { #endif struct Object; struct Material; +struct ID; +struct Main; +uint32_t BKE_cryptomatte_hash(const char *name, int name_len); uint32_t BKE_cryptomatte_object_hash(const struct Object *object); uint32_t BKE_cryptomatte_material_hash(const struct Material *material); uint32_t BKE_cryptomatte_asset_hash(const struct Object *object); float BKE_cryptomatte_hash_to_float(uint32_t cryptomatte_hash); +char *BKE_cryptomatte_entries_to_matte_id(struct NodeCryptomatte *node_storage); +void BKE_cryptomatte_matte_id_to_entries(const struct Main *bmain, + struct NodeCryptomatte *node_storage, + const char *matte_id); + #ifdef __cplusplus } #endif |