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:
authorJeroen Bakker <jbakker>2021-01-05 16:59:45 +0300
committerJeroen Bakker <jeroen@blender.org>2021-01-05 17:03:05 +0300
commit1f41bdc6f37fd091bb5649436f68335b10ade51f (patch)
tree699848cf8bff58bdf0e6d6b3cba54aa0d6a5e717 /source/blender/blenkernel/BKE_cryptomatte.h
parent7cd6f667e33e60f3d53e465023bb75f90f499b07 (diff)
Eevee Cryptomatte: Store hashes in render result meta data
Stores cryptomatte hashes as meta data to the render result. Compositors could use this for lookup on names in stead of hashes. Differential Revision: https://developer.blender.org/D9553
Diffstat (limited to 'source/blender/blenkernel/BKE_cryptomatte.h')
-rw-r--r--source/blender/blenkernel/BKE_cryptomatte.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/source/blender/blenkernel/BKE_cryptomatte.h b/source/blender/blenkernel/BKE_cryptomatte.h
index 433c25084ad..3abaf5256df 100644
--- a/source/blender/blenkernel/BKE_cryptomatte.h
+++ b/source/blender/blenkernel/BKE_cryptomatte.h
@@ -24,19 +24,30 @@
#pragma once
#include "BLI_sys_types.h"
+#include "DNA_layer_types.h"
#ifdef __cplusplus
extern "C" {
#endif
-struct Main;
+struct CryptomatteSession;
struct Material;
+struct ID;
+struct Main;
struct Object;
+struct RenderResult;
+
+struct CryptomatteSession *BKE_cryptomatte_init(void);
+void BKE_cryptomatte_finish(struct CryptomatteSession *session);
+void BKE_cryptomatte_free(struct CryptomatteSession *session);
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);
+uint32_t BKE_cryptomatte_object_hash(struct CryptomatteSession *session,
+ const struct Object *object);
+uint32_t BKE_cryptomatte_material_hash(struct CryptomatteSession *session,
+ const struct Material *material);
+uint32_t BKE_cryptomatte_asset_hash(struct CryptomatteSession *session,
+ 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);
@@ -44,6 +55,12 @@ void BKE_cryptomatte_matte_id_to_entries(const struct Main *bmain,
struct NodeCryptomatte *node_storage,
const char *matte_id);
+void BKE_cryptomatte_store_metadata(struct CryptomatteSession *session,
+ struct RenderResult *render_result,
+ const ViewLayer *view_layer,
+ eViewLayerCryptomatteFlags cryptomatte_layer,
+ const char *cryptomatte_layer_name);
+
#ifdef __cplusplus
}
-#endif
+#endif \ No newline at end of file