Blender  V3.3
BKE_cryptomatte.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2020 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 #include "BLI_sys_types.h"
11 #include "DNA_layer_types.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 /* Forward declarations. */
18 struct CryptomatteSession;
19 struct Material;
20 struct Object;
21 struct RenderResult;
22 struct Scene;
23 
26  const struct RenderResult *render_result);
28 void BKE_cryptomatte_free(struct CryptomatteSession *session);
29 void BKE_cryptomatte_add_layer(struct CryptomatteSession *session, const char *layer_name);
30 
31 uint32_t BKE_cryptomatte_hash(const char *name, int name_len);
33  const char *layer_name,
34  const struct Object *object);
36  const char *layer_name,
37  const struct Material *material);
39  const char *layer_name,
40  const struct Object *object);
41 float BKE_cryptomatte_hash_to_float(uint32_t cryptomatte_hash);
45 bool BKE_cryptomatte_find_name(const struct CryptomatteSession *session,
46  float encoded_hash,
47  char *r_name,
48  int name_len);
49 
50 char *BKE_cryptomatte_entries_to_matte_id(struct NodeCryptomatte *node_storage);
52  const char *matte_id);
53 
54 void BKE_cryptomatte_store_metadata(const struct CryptomatteSession *session,
55  struct RenderResult *render_result,
56  const ViewLayer *view_layer);
57 
58 #ifdef __cplusplus
59 }
60 #endif
void BKE_cryptomatte_add_layer(struct CryptomatteSession *session, const char *layer_name)
Definition: cryptomatte.cc:145
uint32_t BKE_cryptomatte_asset_hash(struct CryptomatteSession *session, const char *layer_name, const struct Object *object)
struct CryptomatteSession * BKE_cryptomatte_init_from_render_result(const struct RenderResult *render_result)
Definition: cryptomatte.cc:132
void BKE_cryptomatte_matte_id_to_entries(struct NodeCryptomatte *node_storage, const char *matte_id)
Definition: cryptomatte.cc:234
void BKE_cryptomatte_store_metadata(const struct CryptomatteSession *session, struct RenderResult *render_result, const ViewLayer *view_layer)
Definition: cryptomatte.cc:308
float BKE_cryptomatte_hash_to_float(uint32_t cryptomatte_hash)
Definition: cryptomatte.cc:194
struct CryptomatteSession * BKE_cryptomatte_init_from_scene(const struct Scene *scene)
Definition: cryptomatte.cc:139
uint32_t BKE_cryptomatte_object_hash(struct CryptomatteSession *session, const char *layer_name, const struct Object *object)
bool BKE_cryptomatte_find_name(const struct CryptomatteSession *session, float encoded_hash, char *r_name, int name_len)
char * BKE_cryptomatte_entries_to_matte_id(struct NodeCryptomatte *node_storage)
Definition: cryptomatte.cc:213
uint32_t BKE_cryptomatte_material_hash(struct CryptomatteSession *session, const char *layer_name, const struct Material *material)
uint32_t BKE_cryptomatte_hash(const char *name, int name_len)
Definition: cryptomatte.cc:156
struct CryptomatteSession * BKE_cryptomatte_init(void)
Definition: cryptomatte.cc:126
void BKE_cryptomatte_free(struct CryptomatteSession *session)
Definition: cryptomatte.cc:150
Scene scene
Material material
unsigned int uint32_t
Definition: stdint.h:80