Blender  V3.3
Public Attributes | List of all members
IDTypeInfo Struct Reference

#include <BKE_idtype.h>

Public Attributes

short id_code
 
uint64_t id_filter
 
int main_listbase_index
 
size_t struct_size
 
const char * name
 
const char * name_plural
 
const char * translation_context
 
uint32_t flags
 
struct AssetTypeInfoasset_type_info
 
IDTypeInitDataFunction init_data
 
IDTypeCopyDataFunction copy_data
 
IDTypeFreeDataFunction free_data
 
IDTypeMakeLocalFunction make_local
 
IDTypeForeachIDFunction foreach_id
 
IDTypeForeachCacheFunction foreach_cache
 
IDTypeForeachPathFunction foreach_path
 
IDTypeEmbeddedOwnerGetFunction owner_get
 
IDTypeBlendWriteFunction blend_write
 
IDTypeBlendReadDataFunction blend_read_data
 
IDTypeBlendReadLibFunction blend_read_lib
 
IDTypeBlendReadExpandFunction blend_read_expand
 
IDTypeBlendReadUndoPreserve blend_read_undo_preserve
 
IDTypeLibOverrideApplyPost lib_override_apply_post
 

Detailed Description

Definition at line 107 of file BKE_idtype.h.

Member Data Documentation

◆ asset_type_info

struct AssetTypeInfo* IDTypeInfo::asset_type_info

Information and callbacks for assets, based on the type of asset.

Definition at line 144 of file BKE_idtype.h.

Referenced by direct_link_id_common(), and ED_asset_mark_id().

◆ blend_read_data

IDTypeBlendReadDataFunction IDTypeInfo::blend_read_data

Update pointers for all structs directly owned by this data block.

Definition at line 201 of file BKE_idtype.h.

Referenced by direct_link_id().

◆ blend_read_expand

IDTypeBlendReadExpandFunction IDTypeInfo::blend_read_expand

Specify which other id data blocks should be loaded when the current one is loaded.

Definition at line 211 of file BKE_idtype.h.

Referenced by BLO_expand_main().

◆ blend_read_lib

IDTypeBlendReadLibFunction IDTypeInfo::blend_read_lib

Update pointers to other id data blocks.

Definition at line 206 of file BKE_idtype.h.

Referenced by lib_link_all().

◆ blend_read_undo_preserve

IDTypeBlendReadUndoPreserve IDTypeInfo::blend_read_undo_preserve

Allow an ID type to preserve some of its data across (memfile) undo steps.

Note
Called from setup_app_data when undoing or redoing a memfile step.

Definition at line 218 of file BKE_idtype.h.

Referenced by lib_link_all().

◆ blend_write

IDTypeBlendWriteFunction IDTypeInfo::blend_write

Write all structs that should be saved in a .blend file.

Definition at line 196 of file BKE_idtype.h.

Referenced by write_file_handle().

◆ copy_data

IDTypeCopyDataFunction IDTypeInfo::copy_data

Copy the given data-block's data from source to destination. May be NULL if mere memcopy of the ID struct itself is enough.

Definition at line 157 of file BKE_idtype.h.

Referenced by BKE_id_copy_ex().

◆ flags

uint32_t IDTypeInfo::flags

◆ foreach_cache

IDTypeForeachCacheFunction IDTypeInfo::foreach_cache

Iterator over all cache pointers of given ID.

Definition at line 179 of file BKE_idtype.h.

Referenced by BKE_idtype_id_foreach_cache(), blo_cache_storage_init(), blo_cache_storage_old_bmain_clear(), and direct_link_id().

◆ foreach_id

IDTypeForeachIDFunction IDTypeInfo::foreach_id

Called by BKE_library_foreach_ID_link() to apply a callback over all other ID usages (ID pointers) of given data-block.

Definition at line 174 of file BKE_idtype.h.

Referenced by library_foreach_ID_link().

◆ foreach_path

IDTypeForeachPathFunction IDTypeInfo::foreach_path

Iterator over all file paths of given ID.

Definition at line 184 of file BKE_idtype.h.

Referenced by BKE_bpath_foreach_path_id().

◆ free_data

IDTypeFreeDataFunction IDTypeInfo::free_data

Free the data of the data-block (NOT the ID itself). May be NULL if there is nothing to do.

Definition at line 162 of file BKE_idtype.h.

Referenced by BKE_libblock_free_datablock(), blender::bke::tests::TEST(), and blender::bke::tests::test_lattice_deform_free().

◆ id_code

short IDTypeInfo::id_code

Unique identifier of this type, either as a short or an array of two chars, see DNA_ID_enums.h's ID_XX enums.

Definition at line 114 of file BKE_idtype.h.

Referenced by BKE_idtype_idcode_from_name(), and get_type_info().

◆ id_filter

uint64_t IDTypeInfo::id_filter

Bit-flag matching id_code, used for filtering (e.g. in file browser), see DNA_ID.h's FILTER_ID_XX enums.

Definition at line 119 of file BKE_idtype.h.

◆ init_data

IDTypeInitDataFunction IDTypeInfo::init_data

Initialize a new, empty calloc'ed data-block. May be NULL if there is nothing to do.

Definition at line 151 of file BKE_idtype.h.

Referenced by BKE_libblock_init_empty(), blender::bke::tests::TEST(), and blender::bke::tests::test_lattice_deform_init().

◆ lib_override_apply_post

IDTypeLibOverrideApplyPost IDTypeInfo::lib_override_apply_post

Called after library override operations have been applied.

Note
Currently needed for some update operation on point caches.

Definition at line 225 of file BKE_idtype.h.

Referenced by RNA_struct_override_apply().

◆ main_listbase_index

int IDTypeInfo::main_listbase_index

Define the position of this data-block type in the virtual list of all data in a Main that is returned by set_listbasepointers(). Very important, this has to be unique and below INDEX_ID_MAX, see DNA_ID.h.

Definition at line 126 of file BKE_idtype.h.

Referenced by id_type_init().

◆ make_local

IDTypeMakeLocalFunction IDTypeInfo::make_local

Make a linked data-block local. May be NULL if default behavior from BKE_lib_id_make_local_generic() is enough.

Definition at line 168 of file BKE_idtype.h.

Referenced by BKE_lib_id_make_local().

◆ name

const char* IDTypeInfo::name

The user visible name for this data-block, also used as default name for a new data-block.

Definition at line 132 of file BKE_idtype.h.

Referenced by BKE_idtype_idcode_to_name(), BKE_libblock_get_alloc_info(), and write_file_handle().

◆ name_plural

const char* IDTypeInfo::name_plural

Plural version of the user-visble name.

Definition at line 134 of file BKE_idtype.h.

Referenced by BKE_idtype_idcode_to_name_plural().

◆ owner_get

IDTypeEmbeddedOwnerGetFunction IDTypeInfo::owner_get

◆ struct_size

size_t IDTypeInfo::struct_size

Memory size of a data-block of that type.

Definition at line 129 of file BKE_idtype.h.

Referenced by BKE_libblock_get_alloc_info(), id_swap(), and write_file_handle().

◆ translation_context

const char* IDTypeInfo::translation_context

Translation context to use for UI messages related to that type of data-block.

Definition at line 136 of file BKE_idtype.h.

Referenced by BKE_idtype_idcode_to_translation_context().


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