Blender V5.3
blender::BlendfileLinkAppendContext Struct Reference

#include <BKE_blendfile_link_append.hh>

Public Types

enum class  ProcessStage {
  Init = 0 , Linking , Appending , Instantiating ,
  Done
}
using items_iterator_t = std::list<BlendfileLinkAppendContextItem>::iterator

Public Attributes

Vector< BlendfileLinkAppendContextLibrary > libraries
std::list< BlendfileLinkAppendContextItem > items
LibraryLink_Params * params = nullptr
Collection * target_collection = nullptr
ProcessStage process_stage
Map< ID *, BlendfileLinkAppendContextItem * > new_id_to_item
MainLibraryWeakReferenceMap * library_weak_reference_mapping = nullptr
const void * blendfile_mem = nullptr
size_t blendfile_memsize = 0

Detailed Description

General container for all relevant data for a library/linked-data related operation (linking, appending, library relocating, etc.).

Definition at line 134 of file BKE_blendfile_link_append.hh.

Member Typedef Documentation

◆ items_iterator_t

Member Enumeration Documentation

◆ ProcessStage

What is the current stage of the link/append process. Used mainly by the RNA wrappers for the pre/post handlers currently.

Enumerator
Init 

The context data is being filled with data (Libraries and IDs) to process. Nothing has been linked yet.

Linking 

The context data is being used to linked IDs.

Appending 

The context data is being used to append IDs (i.e. make local linked ones, or re-use already existing local ones).

Instantiating 

The context data is being used to instantiate (loose) IDs (i.e. ensure that Collections, Objects and/or ObjectData IDs are added to the current scene).

Done 

All data has been linked or appended. The context state represents the final result of the process.

Definition at line 156 of file BKE_blendfile_link_append.hh.

Member Data Documentation

◆ blendfile_mem

const void* blender::BlendfileLinkAppendContext::blendfile_mem = nullptr

◆ blendfile_memsize

◆ items

◆ libraries

◆ library_weak_reference_mapping

MainLibraryWeakReferenceMap* blender::BlendfileLinkAppendContext::library_weak_reference_mapping = nullptr

Runtime info used by append code to manage re-use of already appended matching IDs.

Definition at line 189 of file BKE_blendfile_link_append.hh.

Referenced by blender::BKE_blendfile_append(), blender::BKE_blendfile_link_append_context_free(), and blender::blendfile_append_define_actions().

◆ new_id_to_item

Map<ID *, BlendfileLinkAppendContextItem *> blender::BlendfileLinkAppendContext::new_id_to_item

◆ params

LibraryLink_Params* blender::BlendfileLinkAppendContext::params = nullptr

◆ process_stage

◆ target_collection

Collection* blender::BlendfileLinkAppendContext::target_collection = nullptr

Target collection to link/append into. This is only used for instantiating collections, and is not mandatory for linking/appending objects or other data-blocks.

Definition at line 150 of file BKE_blendfile_link_append.hh.

Referenced by blender::BKE_blendfile_link_append_instantiate_loose(), and blender::BKE_blendfile_link_append_instantiate_loose_from_bmain().


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