Blender V4.3
blender::bke::bake::BakeDataBlockID Struct Reference

#include <BKE_bake_data_block_id.hh>

Public Member Functions

 BakeDataBlockID (ID_Type type, std::string id_name, std::string lib_name)
 
 BakeDataBlockID (const ID &id)
 
 BakeDataBlockID (const NodesModifierDataBlock &data_block)
 
uint64_t hash () const
 

Public Attributes

ID_Type type
 
std::string id_name
 
std::string lib_name
 

Friends

std::ostream & operator<< (std::ostream &stream, const BakeDataBlockID &id)
 

Detailed Description

Unique weak reference to a data block within a Main. It's used when caching/baking data-block references. Data-block pointers can't be used directly, because they are not stable over time and between Blender sessions.

Definition at line 27 of file BKE_bake_data_block_id.hh.

Constructor & Destructor Documentation

◆ BakeDataBlockID() [1/3]

blender::bke::bake::BakeDataBlockID::BakeDataBlockID ( ID_Type type,
std::string id_name,
std::string lib_name )

Definition at line 16 of file bake_data_block_map.cc.

◆ BakeDataBlockID() [2/3]

blender::bke::bake::BakeDataBlockID::BakeDataBlockID ( const ID & id)

Definition at line 21 of file bake_data_block_map.cc.

References GS, ID_IS_LINKED, id_name, and lib_name.

◆ BakeDataBlockID() [3/3]

blender::bke::bake::BakeDataBlockID::BakeDataBlockID ( const NodesModifierDataBlock & data_block)

Definition at line 30 of file bake_data_block_map.cc.

Member Function Documentation

◆ hash()

uint64_t blender::bke::bake::BakeDataBlockID::hash ( ) const

Definition at line 42 of file bake_data_block_map.cc.

References blender::get_default_hash(), id_name, and lib_name.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & stream,
const BakeDataBlockID & id )
friend

Definition at line 37 of file bake_data_block_map.cc.

Member Data Documentation

◆ id_name

std::string blender::bke::bake::BakeDataBlockID::id_name

Name of the data-block, without the type prefix.

Definition at line 32 of file BKE_bake_data_block_id.hh.

Referenced by blender::add_missing_data_block_mappings(), BakeDataBlockID(), and hash().

◆ lib_name

std::string blender::bke::bake::BakeDataBlockID::lib_name

Name of the library data-block that the data-block is in. This refers to Library.id.name and not the file path. The type prefix of the name is omitted. If this is empty, the data-block is expected to be local and not linked.

Definition at line 38 of file BKE_bake_data_block_id.hh.

Referenced by blender::add_missing_data_block_mappings(), BakeDataBlockID(), and hash().

◆ type

ID_Type blender::bke::bake::BakeDataBlockID::type

Definition at line 28 of file BKE_bake_data_block_id.hh.

Referenced by blender::add_missing_data_block_mappings().


The documentation for this struct was generated from the following files: