Blender
V3.3
|
#include "BKE_cryptomatte.h"
#include "BKE_cryptomatte.hh"
#include "BKE_image.h"
#include "BKE_main.h"
#include "DNA_layer_types.h"
#include "DNA_material_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BLI_compiler_attrs.h"
#include "BLI_dynstr.h"
#include "BLI_hash_mm3.h"
#include "BLI_listbase.h"
#include "BLI_string.h"
#include "RE_pipeline.h"
#include "MEM_guardedalloc.h"
#include <cctype>
#include <cstring>
#include <iomanip>
#include <sstream>
#include <string>
#include <string_view>
Go to the source code of this file.
Classes | |
struct | CryptomatteSession |
Namespaces | |
blender | |
blender::bke | |
blender::bke::cryptomatte | |
blender::bke::cryptomatte::manifest | |
Variables | |
constexpr StringRef | blender::bke::cryptomatte::manifest::WHITESPACES = " \t\n\v\f\r" |
|
static |
Definition at line 297 of file cryptomatte.cc.
References blender::bke::cryptomatte::BKE_cryptomatte_meta_data_key(), BKE_render_result_stamp_data(), and blender::StringRefBase::data().
Referenced by BKE_cryptomatte_store_metadata().
void BKE_cryptomatte_add_layer | ( | struct CryptomatteSession * | session, |
const char * | layer_name | ||
) |
Definition at line 145 of file cryptomatte.cc.
References CryptomatteSession::add_layer().
Referenced by EEVEE_cryptomatte_renderpasses_init().
uint32_t BKE_cryptomatte_asset_hash | ( | CryptomatteSession * | session, |
const char * | layer_name, | ||
const Object * | object | ||
) |
Definition at line 183 of file cryptomatte.cc.
References BKE_cryptomatte_object_hash(), and Object::parent.
char* BKE_cryptomatte_entries_to_matte_id | ( | NodeCryptomatte * | node_storage | ) |
Definition at line 213 of file cryptomatte.cc.
References BLI_dynstr_append(), BLI_dynstr_appendf(), BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_nappend(), BLI_dynstr_new(), BLI_strnlen(), NodeCryptomatte::entries, LISTBASE_FOREACH, and result.
bool BKE_cryptomatte_find_name | ( | const CryptomatteSession * | session, |
const float | encoded_hash, | ||
char * | r_name, | ||
int | name_len | ||
) |
Definition at line 199 of file cryptomatte.cc.
References BLI_strncpy().
void BKE_cryptomatte_free | ( | CryptomatteSession * | session | ) |
Definition at line 150 of file cryptomatte.cc.
References BLI_assert.
Referenced by EEVEE_cryptomatte_free(), eyedropper_exit(), and blender::bke::cryptomatte::CryptomatteSessionDeleter::operator()().
uint32_t BKE_cryptomatte_hash | ( | const char * | name, |
const int | name_len | ||
) |
Definition at line 156 of file cryptomatte.cc.
References hash.
Referenced by blender::bke::cryptomatte::CryptomatteLayer::add_ID(), and BKE_cryptomatte_matte_id_to_entries().
Definition at line 194 of file cryptomatte.cc.
References blender::bke::cryptomatte::CryptomatteHash::float_encoded().
Referenced by BKE_cryptomatte_matte_id_to_entries(), eevee_cryptomatte_shading_group_create(), and blender::bke::cryptomatte::CryptomatteLayer::operator[]().
CryptomatteSession* BKE_cryptomatte_init | ( | void | ) |
Definition at line 126 of file cryptomatte.cc.
Referenced by EEVEE_cryptomatte_renderpasses_init().
struct CryptomatteSession* BKE_cryptomatte_init_from_render_result | ( | const struct RenderResult * | render_result | ) |
Definition at line 132 of file cryptomatte.cc.
References CryptomatteSession::CryptomatteSession(), and RenderResult::stamp_data.
Referenced by cryptomatte_init_from_node_image(), cryptomatte_init_from_node_render(), and blender::bke::cryptomatte::tests::TEST().
struct CryptomatteSession* BKE_cryptomatte_init_from_scene | ( | const struct Scene * | scene | ) |
Definition at line 139 of file cryptomatte.cc.
References CryptomatteSession::CryptomatteSession(), and scene.
Referenced by cryptomatte_init_from_node_render().
uint32_t BKE_cryptomatte_material_hash | ( | CryptomatteSession * | session, |
const char * | layer_name, | ||
const Material * | material | ||
) |
void BKE_cryptomatte_matte_id_to_entries | ( | NodeCryptomatte * | node_storage, |
const char * | matte_id | ||
) |
Definition at line 234 of file cryptomatte.cc.
References BKE_cryptomatte_hash(), BKE_cryptomatte_hash_to_float(), BLI_addtail(), BLI_freelistN(), CryptomatteEntry::encoded_hash, NodeCryptomatte::entries, hash, NodeCryptomatte::matte_id, MEM_dupallocN, MEM_SAFE_FREE, CryptomatteEntry::name, STREQ, and STRNCPY.
Referenced by blo_do_versions_290().
uint32_t BKE_cryptomatte_object_hash | ( | CryptomatteSession * | session, |
const char * | layer_name, | ||
const Object * | object | ||
) |
Definition at line 162 of file cryptomatte.cc.
References blender::bke::cryptomatte::CryptomatteLayer::add_ID(), BLI_assert, Object::id, CryptomatteSession::layers, and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr().
Referenced by BKE_cryptomatte_asset_hash().
void BKE_cryptomatte_store_metadata | ( | const struct CryptomatteSession * | session, |
RenderResult * | render_result, | ||
const ViewLayer * | view_layer | ||
) |
Definition at line 308 of file cryptomatte.cc.
References add_render_result_meta_data(), cryptomatte_determine_name(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), CryptomatteSession::layers, and blender::bke::cryptomatte::CryptomatteLayer::manifest().
Referenced by EEVEE_cryptomatte_store_metadata(), and blender::bke::cryptomatte::tests::TEST().
|
static |
Definition at line 292 of file cryptomatte.cc.
References BLI_hash_mm3(), blender::StringRefBase::data(), and blender::StringRefBase::size().
Referenced by blender::bke::cryptomatte::cryptomatte_layer_name_hash().
|
static |
Definition at line 283 of file cryptomatte.cc.
References BLI_strnlen(), and ViewLayer::name.
Referenced by BKE_cryptomatte_store_metadata().