Blender V4.3
cryptomatte.cc File Reference
#include "BKE_cryptomatte.h"
#include "BKE_cryptomatte.hh"
#include "BKE_image.hh"
#include "BKE_layer.hh"
#include "BKE_main.hh"
#include "BKE_material.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.hh"
#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

namespace  blender
 
namespace  blender::bke
 
namespace  blender::bke::cryptomatte
 
namespace  blender::bke::cryptomatte::manifest
 

Functions

CryptomatteSessionBKE_cryptomatte_init ()
 
CryptomatteSessionBKE_cryptomatte_init_from_render_result (const RenderResult *render_result)
 
CryptomatteSessionBKE_cryptomatte_init_from_scene (const Scene *scene, bool build_meta_data)
 
CryptomatteSessionBKE_cryptomatte_init_from_view_layer (const ViewLayer *view_layer)
 
void BKE_cryptomatte_add_layer (CryptomatteSession *session, const char *layer_name)
 
void BKE_cryptomatte_free (CryptomatteSession *session)
 
uint32_t BKE_cryptomatte_hash (const char *name, const int name_len)
 
uint32_t BKE_cryptomatte_object_hash (CryptomatteSession *session, const char *layer_name, const Object *object)
 
uint32_t BKE_cryptomatte_material_hash (CryptomatteSession *session, const char *layer_name, const Material *material)
 
uint32_t BKE_cryptomatte_asset_hash (CryptomatteSession *session, const char *layer_name, const Object *object)
 
float BKE_cryptomatte_hash_to_float (uint32_t cryptomatte_hash)
 
bool BKE_cryptomatte_find_name (const CryptomatteSession *session, const float encoded_hash, char *r_name, int name_maxncpy)
 
char * BKE_cryptomatte_entries_to_matte_id (NodeCryptomatte *node_storage)
 
void BKE_cryptomatte_matte_id_to_entries (NodeCryptomatte *node_storage, const char *matte_id)
 
static uint32_t cryptomatte_determine_identifier (const blender::StringRef name)
 
static void add_render_result_meta_data (RenderResult *render_result, const blender::StringRef layer_name, const blender::StringRefNull key_name, const blender::StringRefNull value)
 
void BKE_cryptomatte_store_metadata (const CryptomatteSession *session, RenderResult *render_result)
 
static constexpr blender::StringRef blender::bke::cryptomatte::manifest::skip_whitespaces_ (blender::StringRef ref)
 
static constexpr int blender::bke::cryptomatte::manifest::quoted_string_len_ (blender::StringRef ref)
 
static std::string blender::bke::cryptomatte::manifest::unquote_ (const blender::StringRef ref)
 
static bool blender::bke::cryptomatte::manifest::from_manifest (CryptomatteLayer &layer, blender::StringRefNull manifest)
 
static std::string blender::bke::cryptomatte::manifest::to_manifest (const CryptomatteLayer *layer)
 
static std::string blender::bke::cryptomatte::cryptomatte_layer_name_hash (const StringRef layer_name)
 
std::string blender::bke::cryptomatte::BKE_cryptomatte_meta_data_key (const StringRef layer_name, const StringRefNull key_name)
 
StringRef blender::bke::cryptomatte::BKE_cryptomatte_extract_layer_name (const StringRef render_pass_name)
 
const blender::Vector< std::string > & blender::bke::cryptomatte::BKE_cryptomatte_layer_names_get (const CryptomatteSession &session)
 
CryptomatteLayerblender::bke::cryptomatte::BKE_cryptomatte_layer_get (CryptomatteSession &session, const StringRef layer_name)
 

Variables

constexpr StringRef blender::bke::cryptomatte::manifest::WHITESPACES = " \t\n\v\f\r"
 

Function Documentation

◆ add_render_result_meta_data()

static void add_render_result_meta_data ( RenderResult * render_result,
const blender::StringRef layer_name,
const blender::StringRefNull key_name,
const blender::StringRefNull value )
static

◆ BKE_cryptomatte_add_layer()

void BKE_cryptomatte_add_layer ( CryptomatteSession * session,
const char * layer_name )

Definition at line 195 of file cryptomatte.cc.

References CryptomatteSession::add_layer().

◆ BKE_cryptomatte_asset_hash()

uint32_t BKE_cryptomatte_asset_hash ( CryptomatteSession * session,
const char * layer_name,
const Object * object )

Definition at line 233 of file cryptomatte.cc.

References BKE_cryptomatte_object_hash(), and Object::parent.

◆ BKE_cryptomatte_entries_to_matte_id()

◆ BKE_cryptomatte_find_name()

bool BKE_cryptomatte_find_name ( const CryptomatteSession * session,
const float encoded_hash,
char * r_name,
int name_maxncpy )

Definition at line 249 of file cryptomatte.cc.

References BLI_strncpy().

◆ BKE_cryptomatte_free()

void BKE_cryptomatte_free ( CryptomatteSession * session)

◆ BKE_cryptomatte_hash()

◆ BKE_cryptomatte_hash_to_float()

◆ BKE_cryptomatte_init()

CryptomatteSession * BKE_cryptomatte_init ( void )

Definition at line 171 of file cryptomatte.cc.

◆ BKE_cryptomatte_init_from_render_result()

CryptomatteSession * BKE_cryptomatte_init_from_render_result ( const RenderResult * render_result)

Definition at line 177 of file cryptomatte.cc.

References RenderResult::stamp_data.

◆ BKE_cryptomatte_init_from_scene()

CryptomatteSession * BKE_cryptomatte_init_from_scene ( const Scene * scene,
bool build_meta_data )

Definition at line 183 of file cryptomatte.cc.

◆ BKE_cryptomatte_init_from_view_layer()

CryptomatteSession * BKE_cryptomatte_init_from_view_layer ( const ViewLayer * view_layer)

Definition at line 189 of file cryptomatte.cc.

◆ BKE_cryptomatte_material_hash()

uint32_t BKE_cryptomatte_material_hash ( CryptomatteSession * session,
const char * layer_name,
const Material * material )

◆ BKE_cryptomatte_matte_id_to_entries()

◆ BKE_cryptomatte_object_hash()

uint32_t BKE_cryptomatte_object_hash ( CryptomatteSession * session,
const char * layer_name,
const Object * object )

◆ BKE_cryptomatte_store_metadata()

◆ cryptomatte_determine_identifier()

static uint32_t cryptomatte_determine_identifier ( const blender::StringRef name)
static

Definition at line 334 of file cryptomatte.cc.

References BLI_hash_mm3().

Referenced by blender::bke::cryptomatte::cryptomatte_layer_name_hash().