Blender  V3.3
Namespaces | Classes | Typedefs | Functions
blender::bke::cryptomatte Namespace Reference

Namespaces

 manifest
 
 tests
 

Classes

struct  CryptomatteHash
 
struct  CryptomatteLayer
 
struct  CryptomatteStampDataCallbackData
 
struct  CryptomatteSessionDeleter
 

Typedefs

using CryptomatteSessionPtr = std::unique_ptr< CryptomatteSession, CryptomatteSessionDeleter >
 

Functions

std::string BKE_cryptomatte_meta_data_key (const StringRef layer_name, const StringRefNull key_name)
 
StringRef BKE_cryptomatte_extract_layer_name (const StringRef render_pass_name)
 
const blender::Vector< std::string > & BKE_cryptomatte_layer_names_get (const CryptomatteSession &session)
 
static std::string cryptomatte_layer_name_hash (const StringRef layer_name)
 

Typedef Documentation

◆ CryptomatteSessionPtr

Definition at line 118 of file BKE_cryptomatte.hh.

Function Documentation

◆ BKE_cryptomatte_extract_layer_name()

StringRef blender::bke::cryptomatte::BKE_cryptomatte_extract_layer_name ( const StringRef  render_pass_name)

Extract the cryptomatte layer name from the given render_pass_name.

Cryptomatte passes are formatted with a trailing number for storing multiple samples that belong to the same cryptomatte layer. This function would remove the trailing numbers to determine the cryptomatte layer name.

Example

A render_pass_name could be 'View Layer.CryptoMaterial02'. The cryptomatte layer would be 'View Layer.CryptoMaterial'.

Note
The return type is a sub-string of render_pass_name and therefore cannot outlive the render_pass_name internal data.

Definition at line 475 of file cryptomatte.cc.

References blender::StringRefBase::size(), and blender::StringRefBase::substr().

Referenced by blender::compositor::OutputOpenExrMultiLayerOperation::create_stamp_data(), blender::compositor::MultilayerColorOperation::get_meta_data(), blender::compositor::RenderLayersProg::get_meta_data(), and blender::bke::cryptomatte::tests::TEST().

◆ BKE_cryptomatte_layer_names_get()

const blender::Vector< std::string > & blender::bke::cryptomatte::BKE_cryptomatte_layer_names_get ( const CryptomatteSession session)

◆ BKE_cryptomatte_meta_data_key()

std::string blender::bke::cryptomatte::BKE_cryptomatte_meta_data_key ( const StringRef  layer_name,
const StringRefNull  key_name 
)

Format to a cryptomatte meta data key.

Cryptomatte stores meta data. The keys are formatted containing a hash that is generated from its layer name.

The output of this function is: 'cryptomatte/{hash of layer_name}/{key_name}'.

Definition at line 470 of file cryptomatte.cc.

References cryptomatte_layer_name_hash().

Referenced by add_render_result_meta_data(), blender::compositor::MetaDataExtractCallbackData::set_cryptomatte_keys(), and blender::bke::cryptomatte::tests::TEST().

◆ cryptomatte_layer_name_hash()

static std::string blender::bke::cryptomatte::cryptomatte_layer_name_hash ( const StringRef  layer_name)
static

Definition at line 461 of file cryptomatte.cc.

References cryptomatte_determine_identifier(), and hex.

Referenced by BKE_cryptomatte_meta_data_key().