Blender  V2.93
Classes | Macros | Typedefs | Enumerations

ID and Library types, which are fundamental for sdna. More...

#include "DNA_ID_enums.h"
#include "DNA_defs.h"
#include "DNA_listBase.h"

Go to the source code of this file.

Classes

struct  DrawData
 
struct  DrawDataList
 
struct  IDPropertyData
 
struct  IDProperty
 
struct  IDOverrideLibraryPropertyOperation
 
struct  IDOverrideLibraryProperty
 
struct  IDOverrideLibraryRuntime
 
struct  IDOverrideLibrary
 
struct  ID
 
struct  Library
 
struct  PreviewImage
 

Macros

#define MAX_IDPROP_NAME   64
 
#define DEFAULT_ALLOC_FOR_NULL_STRINGS   64
 
#define MAX_ID_NAME   66
 
#define PRV_DEFERRED_DATA(prv)
 
#define ID_FAKE_USERS(id)   ((((const ID *)id)->flag & LIB_FAKEUSER) ? 1 : 0)
 
#define ID_REAL_USERS(id)   (((const ID *)id)->us - ID_FAKE_USERS(id))
 
#define ID_EXTRA_USERS(id)   (((const ID *)id)->tag & LIB_TAG_EXTRAUSER ? 1 : 0)
 
#define ID_CHECK_UNDO(id)    ((GS((id)->name) != ID_SCR) && (GS((id)->name) != ID_WM) && (GS((id)->name) != ID_WS))
 
#define ID_BLEND_PATH(_bmain, _id)    ((_id)->lib ? (_id)->lib->filepath_abs : BKE_main_blendfile_path((_bmain)))
 
#define ID_BLEND_PATH_FROM_GLOBAL(_id)    ((_id)->lib ? (_id)->lib->filepath_abs : BKE_main_blendfile_path_from_global())
 
#define ID_MISSING(_id)   ((((const ID *)(_id))->tag & LIB_TAG_MISSING) != 0)
 
#define ID_IS_LINKED(_id)   (((const ID *)(_id))->lib != NULL)
 
#define ID_IS_OVERRIDABLE_LIBRARY(_id)
 
#define ID_IS_OVERRIDE_LIBRARY_REAL(_id)
 
#define ID_IS_OVERRIDE_LIBRARY_VIRTUAL(_id)    ((((const ID *)(_id))->flag & LIB_EMBEDDED_DATA_LIB_OVERRIDE) != 0)
 
#define ID_IS_OVERRIDE_LIBRARY(_id)    (ID_IS_OVERRIDE_LIBRARY_REAL(_id) || ID_IS_OVERRIDE_LIBRARY_VIRTUAL(_id))
 
#define ID_IS_OVERRIDE_LIBRARY_TEMPLATE(_id)    (((ID *)(_id))->override_library != NULL && ((ID *)(_id))->override_library->reference == NULL)
 
#define ID_IS_ASSET(_id)   (((const ID *)(_id))->asset_data != NULL)
 
#define ID_TYPE_IS_COW(_id_type)    (!ELEM(_id_type, ID_LI, ID_IP, ID_SCR, ID_VF, ID_BR, ID_WM, ID_PAL, ID_PC, ID_WS, ID_IM))
 
#define GS(a)
 
#define ID_NEW_SET(_id, _idn)
 
#define ID_NEW_REMAP(a)
 
#define FILTER_ID_AC   (1ULL << 0)
 
#define FILTER_ID_AR   (1ULL << 1)
 
#define FILTER_ID_BR   (1ULL << 2)
 
#define FILTER_ID_CA   (1ULL << 3)
 
#define FILTER_ID_CU   (1ULL << 4)
 
#define FILTER_ID_GD   (1ULL << 5)
 
#define FILTER_ID_GR   (1ULL << 6)
 
#define FILTER_ID_IM   (1ULL << 7)
 
#define FILTER_ID_LA   (1ULL << 8)
 
#define FILTER_ID_LS   (1ULL << 9)
 
#define FILTER_ID_LT   (1ULL << 10)
 
#define FILTER_ID_MA   (1ULL << 11)
 
#define FILTER_ID_MB   (1ULL << 12)
 
#define FILTER_ID_MC   (1ULL << 13)
 
#define FILTER_ID_ME   (1ULL << 14)
 
#define FILTER_ID_MSK   (1ULL << 15)
 
#define FILTER_ID_NT   (1ULL << 16)
 
#define FILTER_ID_OB   (1ULL << 17)
 
#define FILTER_ID_PAL   (1ULL << 18)
 
#define FILTER_ID_PC   (1ULL << 19)
 
#define FILTER_ID_SCE   (1ULL << 20)
 
#define FILTER_ID_SPK   (1ULL << 21)
 
#define FILTER_ID_SO   (1ULL << 22)
 
#define FILTER_ID_TE   (1ULL << 23)
 
#define FILTER_ID_TXT   (1ULL << 24)
 
#define FILTER_ID_VF   (1ULL << 25)
 
#define FILTER_ID_WO   (1ULL << 26)
 
#define FILTER_ID_PA   (1ULL << 27)
 
#define FILTER_ID_CF   (1ULL << 28)
 
#define FILTER_ID_WS   (1ULL << 29)
 
#define FILTER_ID_LP   (1ULL << 31)
 
#define FILTER_ID_HA   (1ULL << 32)
 
#define FILTER_ID_PT   (1ULL << 33)
 
#define FILTER_ID_VO   (1ULL << 34)
 
#define FILTER_ID_SIM   (1ULL << 35)
 
#define FILTER_ID_ALL
 

Typedefs

typedef void(* DrawDataInitCb) (struct DrawData *engine_data)
 
typedef void(* DrawDataFreeCb) (struct DrawData *engine_data)
 
typedef struct DrawData DrawData
 
typedef struct DrawDataList DrawDataList
 
typedef struct IDPropertyData IDPropertyData
 
typedef struct IDProperty IDProperty
 
typedef struct IDOverrideLibraryPropertyOperation IDOverrideLibraryPropertyOperation
 
typedef struct IDOverrideLibraryProperty IDOverrideLibraryProperty
 
typedef struct IDOverrideLibraryRuntime IDOverrideLibraryRuntime
 
typedef struct IDOverrideLibrary IDOverrideLibrary
 
typedef struct ID ID
 
typedef struct Library Library
 
typedef struct PreviewImage PreviewImage
 
typedef enum IDRecalcFlag IDRecalcFlag
 

Enumerations

enum  {
  IDP_STRING = 0 , IDP_INT = 1 , IDP_FLOAT = 2 , IDP_ARRAY = 5 ,
  IDP_GROUP = 6 , IDP_ID = 7 , IDP_DOUBLE = 8 , IDP_IDPARRAY = 9 ,
  IDP_NUMTYPES = 10
}
 
enum  {
  IDP_TYPE_FILTER_STRING = 1 << 0 , IDP_TYPE_FILTER_INT = 1 << 1 , IDP_TYPE_FILTER_FLOAT = 1 << 2 , IDP_TYPE_FILTER_ARRAY = 1 << 5 ,
  IDP_TYPE_FILTER_GROUP = 1 << 6 , IDP_TYPE_FILTER_ID = 1 << 7 , IDP_TYPE_FILTER_DOUBLE = 1 << 8 , IDP_TYPE_FILTER_IDPARRAY = 1 << 9
}
 
enum  { IDP_STRING_SUB_UTF8 = 0 , IDP_STRING_SUB_BYTE = 1 }
 
enum  { IDP_FLAG_OVERRIDABLE_LIBRARY = 1 << 0 , IDP_FLAG_OVERRIDELIBRARY_LOCAL = 1 << 1 , IDP_FLAG_GHOST = 1 << 7 }
 
enum  {
  IDOVERRIDE_LIBRARY_OP_NOOP = 0 , IDOVERRIDE_LIBRARY_OP_REPLACE = 1 , IDOVERRIDE_LIBRARY_OP_ADD = 101 , IDOVERRIDE_LIBRARY_OP_SUBTRACT = 102 ,
  IDOVERRIDE_LIBRARY_OP_MULTIPLY = 103 , IDOVERRIDE_LIBRARY_OP_INSERT_AFTER = 201 , IDOVERRIDE_LIBRARY_OP_INSERT_BEFORE = 202
}
 
enum  { IDOVERRIDE_LIBRARY_FLAG_MANDATORY = 1 << 0 , IDOVERRIDE_LIBRARY_FLAG_LOCKED = 1 << 1 , IDOVERRIDE_LIBRARY_FLAG_IDPOINTER_MATCH_REFERENCE = 1 << 8 }
 
enum  { IDOVERRIDE_LIBRARY_TAG_UNUSED = 1 << 0 }
 
enum  { IDOVERRIDE_LIBRARY_RUNTIME_TAG_NEEDS_RELOAD = 1 << 0 }
 
enum  ePreviewImage_Flag { PRV_CHANGED = (1 << 0) , PRV_USER_EDITED = (1 << 1) , PRV_UNFINISHED = (1 << 2) }
 
enum  { PRV_TAG_DEFFERED = (1 << 0) , PRV_TAG_DEFFERED_RENDERING = (1 << 1) , PRV_TAG_DEFFERED_DELETE = (1 << 2) }
 
enum  {
  LIB_FAKEUSER = 1 << 9 , LIB_EMBEDDED_DATA = 1 << 10 , LIB_INDIRECT_WEAK_LINK = 1 << 11 , LIB_EMBEDDED_DATA_LIB_OVERRIDE = 1 << 12 ,
  LIB_LIB_OVERRIDE_RESYNC_LEFTOVER = 1 << 13
}
 
enum  {
  LIB_TAG_LOCAL = 0 , LIB_TAG_EXTERN = 1 << 0 , LIB_TAG_INDIRECT = 1 << 1 , LIB_TAG_NEED_EXPAND = 1 << 3 ,
  LIB_TAG_ID_LINK_PLACEHOLDER = 1 << 4 , LIB_TAG_NEED_LINK = 1 << 5 , LIB_TAG_MISSING = 1 << 6 , LIB_TAG_OVERRIDE_LIBRARY_REFOK = 1 << 9 ,
  LIB_TAG_OVERRIDE_LIBRARY_AUTOREFRESH = 1 << 17 , LIB_TAG_EXTRAUSER = 1 << 2 , LIB_TAG_EXTRAUSER_SET = 1 << 7 , LIB_TAG_NEW = 1 << 8 ,
  LIB_TAG_DOIT = 1 << 10 , LIB_TAG_PRE_EXISTING = 1 << 11 , LIB_TAG_COPIED_ON_WRITE = 1 << 12 , LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT = 1 << 13 ,
  LIB_TAG_LOCALIZED = 1 << 14 , LIB_TAG_NO_MAIN = 1 << 15 , LIB_TAG_NO_USER_REFCOUNT = 1 << 16 , LIB_TAG_NOT_ALLOCATED = 1 << 18 ,
  LIB_TAG_UNDO_OLD_ID_REUSED = 1 << 19 , LIB_TAG_TEMP_MAIN = 1 << 20 , LIB_TAG_LIB_OVERRIDE_NEED_RESYNC = 1 << 21
}
 
enum  IDRecalcFlag {
  ID_RECALC_TRANSFORM = (1 << 0) , ID_RECALC_GEOMETRY = (1 << 1) , ID_RECALC_ANIMATION = (1 << 2) , ID_RECALC_PSYS_REDO = (1 << 3) ,
  ID_RECALC_PSYS_RESET = (1 << 4) , ID_RECALC_PSYS_CHILD = (1 << 5) , ID_RECALC_PSYS_PHYS = (1 << 6) , ID_RECALC_SHADING = (1 << 7) ,
  ID_RECALC_SELECT = (1 << 9) , ID_RECALC_BASE_FLAGS = (1 << 10) , ID_RECALC_POINT_CACHE = (1 << 11) , ID_RECALC_EDITORS = (1 << 12) ,
  ID_RECALC_COPY_ON_WRITE = (1 << 13) , ID_RECALC_SEQUENCER_STRIPS = (1 << 14) , ID_RECALC_AUDIO_SEEK = (1 << 15) , ID_RECALC_AUDIO_FPS = (1 << 16) ,
  ID_RECALC_AUDIO_VOLUME = (1 << 17) , ID_RECALC_AUDIO_MUTE = (1 << 18) , ID_RECALC_AUDIO_LISTENER = (1 << 19) , ID_RECALC_AUDIO = (1 << 20) ,
  ID_RECALC_PARAMETERS = (1 << 21) , ID_RECALC_SOURCE = (1 << 23) , ID_RECALC_TAG_FOR_UNDO = (1 << 24) , ID_RECALC_ANIMATION_NO_FLUSH = ID_RECALC_COPY_ON_WRITE ,
  ID_RECALC_ALL = ~(0) , ID_RECALC_PSYS_ALL
}
 
enum  {
  INDEX_ID_LI = 0 , INDEX_ID_IP , INDEX_ID_AC , INDEX_ID_GD ,
  INDEX_ID_NT , INDEX_ID_VF , INDEX_ID_TXT , INDEX_ID_SO ,
  INDEX_ID_MSK , INDEX_ID_IM , INDEX_ID_MC , INDEX_ID_TE ,
  INDEX_ID_MA , INDEX_ID_LS , INDEX_ID_WO , INDEX_ID_CF ,
  INDEX_ID_SIM , INDEX_ID_PA , INDEX_ID_KE , INDEX_ID_AR ,
  INDEX_ID_ME , INDEX_ID_CU , INDEX_ID_MB , INDEX_ID_HA ,
  INDEX_ID_PT , INDEX_ID_VO , INDEX_ID_LT , INDEX_ID_LA ,
  INDEX_ID_CA , INDEX_ID_SPK , INDEX_ID_LP , INDEX_ID_OB ,
  INDEX_ID_GR , INDEX_ID_PAL , INDEX_ID_PC , INDEX_ID_BR ,
  INDEX_ID_SCE , INDEX_ID_SCR , INDEX_ID_WS , INDEX_ID_WM ,
  INDEX_ID_NULL , INDEX_ID_MAX
}
 

Detailed Description

ID and Library types, which are fundamental for sdna.

Definition in file DNA_ID.h.

Macro Definition Documentation

◆ DEFAULT_ALLOC_FOR_NULL_STRINGS

#define DEFAULT_ALLOC_FOR_NULL_STRINGS   64

Definition at line 93 of file DNA_ID.h.

◆ FILTER_ID_AC

#define FILTER_ID_AC   (1ULL << 0)

Definition at line 705 of file DNA_ID.h.

◆ FILTER_ID_ALL

#define FILTER_ID_ALL
Value:
#define FILTER_ID_OB
Definition: DNA_ID.h:722
#define FILTER_ID_MC
Definition: DNA_ID.h:718
#define FILTER_ID_SPK
Definition: DNA_ID.h:726
#define FILTER_ID_CF
Definition: DNA_ID.h:733
#define FILTER_ID_AC
Definition: DNA_ID.h:705
#define FILTER_ID_MA
Definition: DNA_ID.h:716
#define FILTER_ID_CA
Definition: DNA_ID.h:708
#define FILTER_ID_SO
Definition: DNA_ID.h:727
#define FILTER_ID_PT
Definition: DNA_ID.h:737
#define FILTER_ID_BR
Definition: DNA_ID.h:707
#define FILTER_ID_WS
Definition: DNA_ID.h:734
#define FILTER_ID_VF
Definition: DNA_ID.h:730
#define FILTER_ID_LA
Definition: DNA_ID.h:713
#define FILTER_ID_LT
Definition: DNA_ID.h:715
#define FILTER_ID_LS
Definition: DNA_ID.h:714
#define FILTER_ID_ME
Definition: DNA_ID.h:719
#define FILTER_ID_AR
Definition: DNA_ID.h:706
#define FILTER_ID_SIM
Definition: DNA_ID.h:739
#define FILTER_ID_MSK
Definition: DNA_ID.h:720
#define FILTER_ID_GD
Definition: DNA_ID.h:710
#define FILTER_ID_HA
Definition: DNA_ID.h:736
#define FILTER_ID_PC
Definition: DNA_ID.h:724
#define FILTER_ID_PAL
Definition: DNA_ID.h:723
#define FILTER_ID_IM
Definition: DNA_ID.h:712
#define FILTER_ID_SCE
Definition: DNA_ID.h:725
#define FILTER_ID_CU
Definition: DNA_ID.h:709
#define FILTER_ID_VO
Definition: DNA_ID.h:738
#define FILTER_ID_WO
Definition: DNA_ID.h:731
#define FILTER_ID_NT
Definition: DNA_ID.h:721
#define FILTER_ID_TXT
Definition: DNA_ID.h:729

Definition at line 741 of file DNA_ID.h.

◆ FILTER_ID_AR

#define FILTER_ID_AR   (1ULL << 1)

Definition at line 706 of file DNA_ID.h.

◆ FILTER_ID_BR

#define FILTER_ID_BR   (1ULL << 2)

Definition at line 707 of file DNA_ID.h.

◆ FILTER_ID_CA

#define FILTER_ID_CA   (1ULL << 3)

Definition at line 708 of file DNA_ID.h.

◆ FILTER_ID_CF

#define FILTER_ID_CF   (1ULL << 28)

Definition at line 733 of file DNA_ID.h.

◆ FILTER_ID_CU

#define FILTER_ID_CU   (1ULL << 4)

Definition at line 709 of file DNA_ID.h.

◆ FILTER_ID_GD

#define FILTER_ID_GD   (1ULL << 5)

Definition at line 710 of file DNA_ID.h.

◆ FILTER_ID_GR

#define FILTER_ID_GR   (1ULL << 6)

Definition at line 711 of file DNA_ID.h.

◆ FILTER_ID_HA

#define FILTER_ID_HA   (1ULL << 32)

Definition at line 736 of file DNA_ID.h.

◆ FILTER_ID_IM

#define FILTER_ID_IM   (1ULL << 7)

Definition at line 712 of file DNA_ID.h.

◆ FILTER_ID_LA

#define FILTER_ID_LA   (1ULL << 8)

Definition at line 713 of file DNA_ID.h.

◆ FILTER_ID_LP

#define FILTER_ID_LP   (1ULL << 31)

Definition at line 735 of file DNA_ID.h.

◆ FILTER_ID_LS

#define FILTER_ID_LS   (1ULL << 9)

Definition at line 714 of file DNA_ID.h.

◆ FILTER_ID_LT

#define FILTER_ID_LT   (1ULL << 10)

Definition at line 715 of file DNA_ID.h.

◆ FILTER_ID_MA

#define FILTER_ID_MA   (1ULL << 11)

Definition at line 716 of file DNA_ID.h.

◆ FILTER_ID_MB

#define FILTER_ID_MB   (1ULL << 12)

Definition at line 717 of file DNA_ID.h.

◆ FILTER_ID_MC

#define FILTER_ID_MC   (1ULL << 13)

Definition at line 718 of file DNA_ID.h.

◆ FILTER_ID_ME

#define FILTER_ID_ME   (1ULL << 14)

Definition at line 719 of file DNA_ID.h.

◆ FILTER_ID_MSK

#define FILTER_ID_MSK   (1ULL << 15)

Definition at line 720 of file DNA_ID.h.

◆ FILTER_ID_NT

#define FILTER_ID_NT   (1ULL << 16)

Definition at line 721 of file DNA_ID.h.

◆ FILTER_ID_OB

#define FILTER_ID_OB   (1ULL << 17)

Definition at line 722 of file DNA_ID.h.

◆ FILTER_ID_PA

#define FILTER_ID_PA   (1ULL << 27)

Definition at line 732 of file DNA_ID.h.

◆ FILTER_ID_PAL

#define FILTER_ID_PAL   (1ULL << 18)

Definition at line 723 of file DNA_ID.h.

◆ FILTER_ID_PC

#define FILTER_ID_PC   (1ULL << 19)

Definition at line 724 of file DNA_ID.h.

◆ FILTER_ID_PT

#define FILTER_ID_PT   (1ULL << 33)

Definition at line 737 of file DNA_ID.h.

◆ FILTER_ID_SCE

#define FILTER_ID_SCE   (1ULL << 20)

Definition at line 725 of file DNA_ID.h.

◆ FILTER_ID_SIM

#define FILTER_ID_SIM   (1ULL << 35)

Definition at line 739 of file DNA_ID.h.

◆ FILTER_ID_SO

#define FILTER_ID_SO   (1ULL << 22)

Definition at line 727 of file DNA_ID.h.

◆ FILTER_ID_SPK

#define FILTER_ID_SPK   (1ULL << 21)

Definition at line 726 of file DNA_ID.h.

◆ FILTER_ID_TE

#define FILTER_ID_TE   (1ULL << 23)

Definition at line 728 of file DNA_ID.h.

◆ FILTER_ID_TXT

#define FILTER_ID_TXT   (1ULL << 24)

Definition at line 729 of file DNA_ID.h.

◆ FILTER_ID_VF

#define FILTER_ID_VF   (1ULL << 25)

Definition at line 730 of file DNA_ID.h.

◆ FILTER_ID_VO

#define FILTER_ID_VO   (1ULL << 34)

Definition at line 738 of file DNA_ID.h.

◆ FILTER_ID_WO

#define FILTER_ID_WO   (1ULL << 26)

Definition at line 731 of file DNA_ID.h.

◆ FILTER_ID_WS

#define FILTER_ID_WS   (1ULL << 29)

Definition at line 734 of file DNA_ID.h.

◆ GS

#define GS (   a)
Value:
(CHECK_TYPE_ANY(a, char *, const char *, char[66], const char[66]), \
(ID_Type)(*((const short *)(a))))
#define CHECK_TYPE_ANY(...)
ID_Type
Definition: DNA_ID_enums.h:56
static unsigned a[3]
Definition: RandGen.cpp:92

Definition at line 460 of file DNA_ID.h.

◆ ID_BLEND_PATH

#define ID_BLEND_PATH (   _bmain,
  _id 
)     ((_id)->lib ? (_id)->lib->filepath_abs : BKE_main_blendfile_path((_bmain)))

Definition at line 419 of file DNA_ID.h.

◆ ID_BLEND_PATH_FROM_GLOBAL

#define ID_BLEND_PATH_FROM_GLOBAL (   _id)     ((_id)->lib ? (_id)->lib->filepath_abs : BKE_main_blendfile_path_from_global())

Definition at line 421 of file DNA_ID.h.

◆ ID_CHECK_UNDO

#define ID_CHECK_UNDO (   id)     ((GS((id)->name) != ID_SCR) && (GS((id)->name) != ID_WM) && (GS((id)->name) != ID_WS))

Definition at line 416 of file DNA_ID.h.

◆ ID_EXTRA_USERS

#define ID_EXTRA_USERS (   id)    (((const ID *)id)->tag & LIB_TAG_EXTRAUSER ? 1 : 0)

Definition at line 414 of file DNA_ID.h.

◆ ID_FAKE_USERS

#define ID_FAKE_USERS (   id)    ((((const ID *)id)->flag & LIB_FAKEUSER) ? 1 : 0)

Definition at line 412 of file DNA_ID.h.

◆ ID_IS_ASSET

#define ID_IS_ASSET (   _id)    (((const ID *)(_id))->asset_data != NULL)

Definition at line 451 of file DNA_ID.h.

◆ ID_IS_LINKED

#define ID_IS_LINKED (   _id)    (((const ID *)(_id))->lib != NULL)

Definition at line 426 of file DNA_ID.h.

◆ ID_IS_OVERRIDABLE_LIBRARY

#define ID_IS_OVERRIDABLE_LIBRARY (   _id)
Value:
(ID_IS_LINKED(_id) && !ID_MISSING(_id) && (((const ID *)(_id))->tag & LIB_TAG_EXTERN) != 0 && \
@ IDTYPE_FLAGS_NO_LIBLINKING
Definition: BKE_idtype.h:47
const struct IDTypeInfo * BKE_idtype_get_info_from_id(const struct ID *id)
@ LIB_TAG_EXTERN
Definition: DNA_ID.h:521
#define ID_IS_LINKED(_id)
Definition: DNA_ID.h:426
#define ID_MISSING(_id)
Definition: DNA_ID.h:424
uint32_t flags
Definition: BKE_idtype.h:145
Definition: DNA_ID.h:273

Definition at line 430 of file DNA_ID.h.

◆ ID_IS_OVERRIDE_LIBRARY

#define ID_IS_OVERRIDE_LIBRARY (   _id)     (ID_IS_OVERRIDE_LIBRARY_REAL(_id) || ID_IS_OVERRIDE_LIBRARY_VIRTUAL(_id))

Definition at line 445 of file DNA_ID.h.

◆ ID_IS_OVERRIDE_LIBRARY_REAL

#define ID_IS_OVERRIDE_LIBRARY_REAL (   _id)
Value:
(((const ID *)(_id))->override_library != NULL && \
((const ID *)(_id))->override_library->reference != NULL)

Definition at line 438 of file DNA_ID.h.

◆ ID_IS_OVERRIDE_LIBRARY_TEMPLATE

#define ID_IS_OVERRIDE_LIBRARY_TEMPLATE (   _id)     (((ID *)(_id))->override_library != NULL && ((ID *)(_id))->override_library->reference == NULL)

Definition at line 448 of file DNA_ID.h.

◆ ID_IS_OVERRIDE_LIBRARY_VIRTUAL

#define ID_IS_OVERRIDE_LIBRARY_VIRTUAL (   _id)     ((((const ID *)(_id))->flag & LIB_EMBEDDED_DATA_LIB_OVERRIDE) != 0)

Definition at line 442 of file DNA_ID.h.

◆ ID_MISSING

#define ID_MISSING (   _id)    ((((const ID *)(_id))->tag & LIB_TAG_MISSING) != 0)

Definition at line 424 of file DNA_ID.h.

◆ ID_NEW_REMAP

#define ID_NEW_REMAP (   a)
Value:
if ((a) && (a)->id.newid) { \
(a) = (void *)(a)->id.newid; \
} \
((void)0)

Definition at line 468 of file DNA_ID.h.

◆ ID_NEW_SET

#define ID_NEW_SET (   _id,
  _idn 
)
Value:
(((ID *)(_id))->newid = (ID *)(_idn), \
((ID *)(_id))->newid->tag |= LIB_TAG_NEW, \
(void *)((ID *)(_id))->newid)
@ LIB_TAG_NEW
Definition: DNA_ID.h:551

Definition at line 464 of file DNA_ID.h.

◆ ID_REAL_USERS

#define ID_REAL_USERS (   id)    (((const ID *)id)->us - ID_FAKE_USERS(id))

Definition at line 413 of file DNA_ID.h.

◆ ID_TYPE_IS_COW

#define ID_TYPE_IS_COW (   _id_type)     (!ELEM(_id_type, ID_LI, ID_IP, ID_SCR, ID_VF, ID_BR, ID_WM, ID_PAL, ID_PC, ID_WS, ID_IM))

Definition at line 454 of file DNA_ID.h.

◆ MAX_ID_NAME

#define MAX_ID_NAME   66

ID is the first thing included in all serializable types. It provides a common handle to place all data in double-linked lists.

Definition at line 269 of file DNA_ID.h.

◆ MAX_IDPROP_NAME

#define MAX_IDPROP_NAME   64

Definition at line 92 of file DNA_ID.h.

◆ PRV_DEFERRED_DATA

#define PRV_DEFERRED_DATA (   prv)
Value:
BLI_assert((prv)->tag & PRV_TAG_DEFFERED), \
(void *)((prv) + 1))
#define CHECK_TYPE_INLINE(val, type)
@ PRV_TAG_DEFFERED
Definition: DNA_ID.h:384

Definition at line 407 of file DNA_ID.h.

Typedef Documentation

◆ DrawData

typedef struct DrawData DrawData

◆ DrawDataFreeCb

typedef void(* DrawDataFreeCb) (struct DrawData *engine_data)

Definition at line 45 of file DNA_ID.h.

◆ DrawDataInitCb

typedef void(* DrawDataInitCb) (struct DrawData *engine_data)

Definition at line 44 of file DNA_ID.h.

◆ DrawDataList

typedef struct DrawDataList DrawDataList

◆ ID

typedef struct ID ID

◆ IDOverrideLibrary

◆ IDOverrideLibraryProperty

A single overridden property, contain all operations on this one.

◆ IDOverrideLibraryPropertyOperation

◆ IDOverrideLibraryRuntime

◆ IDProperty

typedef struct IDProperty IDProperty

◆ IDPropertyData

◆ IDRecalcFlag

typedef enum IDRecalcFlag IDRecalcFlag

◆ Library

typedef struct Library Library

For each library file used, a Library struct is added to Main WARNING: readfile.c, expand_doit() reads this struct without DNA check!

◆ PreviewImage

typedef struct PreviewImage PreviewImage

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
IDP_STRING 
IDP_INT 
IDP_FLOAT 
IDP_ARRAY 
IDP_GROUP 
IDP_ID 
IDP_DOUBLE 
IDP_IDPARRAY 
IDP_NUMTYPES 

Definition at line 96 of file DNA_ID.h.

◆ anonymous enum

anonymous enum

Used by some IDP utils, keep values in sync with type enum above.

Enumerator
IDP_TYPE_FILTER_STRING 
IDP_TYPE_FILTER_INT 
IDP_TYPE_FILTER_FLOAT 
IDP_TYPE_FILTER_ARRAY 
IDP_TYPE_FILTER_GROUP 
IDP_TYPE_FILTER_ID 
IDP_TYPE_FILTER_DOUBLE 
IDP_TYPE_FILTER_IDPARRAY 

Definition at line 109 of file DNA_ID.h.

◆ anonymous enum

anonymous enum
Enumerator
IDP_STRING_SUB_UTF8 
IDP_STRING_SUB_BYTE 

Definition at line 123 of file DNA_ID.h.

◆ anonymous enum

anonymous enum
Enumerator
IDP_FLAG_OVERRIDABLE_LIBRARY 

This IDProp may be statically overridden. Should only be used/be relevant for custom properties.

IDP_FLAG_OVERRIDELIBRARY_LOCAL 

This collection item IDProp has been inserted in a local override. This is used by internal code to distinguish between library-originated items and local-inserted ones, as many operations are not allowed on the former.

IDP_FLAG_GHOST 

This means the property is set but RNA will return false when checking 'RNA_property_is_set', currently this is a runtime flag

Definition at line 129 of file DNA_ID.h.

◆ anonymous enum

anonymous enum
Enumerator
IDOVERRIDE_LIBRARY_OP_NOOP 
IDOVERRIDE_LIBRARY_OP_REPLACE 
IDOVERRIDE_LIBRARY_OP_ADD 
IDOVERRIDE_LIBRARY_OP_SUBTRACT 
IDOVERRIDE_LIBRARY_OP_MULTIPLY 
IDOVERRIDE_LIBRARY_OP_INSERT_AFTER 
IDOVERRIDE_LIBRARY_OP_INSERT_BEFORE 

Definition at line 172 of file DNA_ID.h.

◆ anonymous enum

anonymous enum
Enumerator
IDOVERRIDE_LIBRARY_FLAG_MANDATORY 

User cannot remove that override operation.

IDOVERRIDE_LIBRARY_FLAG_LOCKED 

User cannot change that override operation.

IDOVERRIDE_LIBRARY_FLAG_IDPOINTER_MATCH_REFERENCE 

For overrides of ID pointers: this override still matches (follows) the hierarchy of the reference linked data.

Definition at line 192 of file DNA_ID.h.

◆ anonymous enum

anonymous enum
Enumerator
IDOVERRIDE_LIBRARY_TAG_UNUSED 

This override property (operation) is unused and should be removed by cleanup process.

Definition at line 229 of file DNA_ID.h.

◆ anonymous enum

anonymous enum
Enumerator
IDOVERRIDE_LIBRARY_RUNTIME_TAG_NEEDS_RELOAD 

This override needs to be reloaded.

Definition at line 242 of file DNA_ID.h.

◆ anonymous enum

anonymous enum
Enumerator
PRV_TAG_DEFFERED 
PRV_TAG_DEFFERED_RENDERING 
PRV_TAG_DEFFERED_DELETE 

Definition at line 383 of file DNA_ID.h.

◆ anonymous enum

anonymous enum

id->flag (persistent).

Enumerator
LIB_FAKEUSER 

Don't delete the datablock even if unused.

LIB_EMBEDDED_DATA 

The data-block is a sub-data of another one. Direct persistent references are not allowed.

LIB_INDIRECT_WEAK_LINK 

Datablock is from a library and linked indirectly, with LIB_TAG_INDIRECT tag set. But the current .blend file also has a weak pointer to it that we want to restore if possible, and silently drop if it's missing.

LIB_EMBEDDED_DATA_LIB_OVERRIDE 

The data-block is a sub-data of another one, which is an override. Note that this also applies to shapekeys, even though they are not 100% embedded data...

LIB_LIB_OVERRIDE_RESYNC_LEFTOVER 

The override data-block appears to not be needed anymore after resync with linked data, but it was kept around (because e.g. detected as user-edited).

Definition at line 475 of file DNA_ID.h.

◆ anonymous enum

anonymous enum

id->tag (runtime-only).

Those flags belong to three different categories, which have different expected handling in code:

  • RESET_BEFORE_USE: piece of code that wants to use such flag has to ensure they are properly 'reset' first.
  • RESET_AFTER_USE: piece of code that wants to use such flag has to ensure they are properly 'reset' after usage (though 'lifetime' of those flags is a bit fuzzy, e.g. _RECALC ones are reset on depsgraph evaluation...).
  • RESET_NEVER: those flags are 'status' one, and never actually need any reset (except on initialization during .blend file reading).
Enumerator
LIB_TAG_LOCAL 
LIB_TAG_EXTERN 
LIB_TAG_INDIRECT 
LIB_TAG_NEED_EXPAND 
LIB_TAG_ID_LINK_PLACEHOLDER 
LIB_TAG_NEED_LINK 
LIB_TAG_MISSING 
LIB_TAG_OVERRIDE_LIBRARY_REFOK 
LIB_TAG_OVERRIDE_LIBRARY_AUTOREFRESH 
LIB_TAG_EXTRAUSER 
LIB_TAG_EXTRAUSER_SET 
LIB_TAG_NEW 
LIB_TAG_DOIT 
LIB_TAG_PRE_EXISTING 
LIB_TAG_COPIED_ON_WRITE 

The data-block is a copy-on-write/localized version.

Warning
This should not be cleared on existing data. If support for this is needed, see T88026 as this flag controls memory ownership of physics shared pointers.
LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT 
LIB_TAG_LOCALIZED 
LIB_TAG_NO_MAIN 
LIB_TAG_NO_USER_REFCOUNT 
LIB_TAG_NOT_ALLOCATED 
LIB_TAG_UNDO_OLD_ID_REUSED 
LIB_TAG_TEMP_MAIN 
LIB_TAG_LIB_OVERRIDE_NEED_RESYNC 

The data-block is a library override that needs re-sync to its linked reference.

Definition at line 516 of file DNA_ID.h.

◆ anonymous enum

anonymous enum

This enum defines the index assigned to each type of IDs in the array returned by set_listbasepointers, and by extension, controls the default order in which each ID type is processed during standard 'foreach' looping over all IDs of a Main data-base.

About Order:

This is (loosely) defined with a relationship order in mind, from lowest level (ID types using, referencing almost no other ID types) to highest level (ID types potentially using many other ID types).

So e.g. it ensures that this dependency chain is respected: Material <- Mesh <- Object <- Collection <- Scene

Default order of processing of IDs in 'foreach' macros (FOREACH_MAIN_ID_BEGIN and the like), built on top of set_listbasepointers, is actually reversed compared to the order defined here, since processing usually needs to happen on users before it happens on used IDs (when freeing e.g.).

DO NOT rely on this order as being full-proofed dependency order, there are many cases were it can be violated (most obvious cases being custom properties and drivers, which can reference any other ID types).

However, this order can be considered as an optimization heuristic, especially when processing relationships in a non-recursive pattern: in typical cases, a vast majority of those relationships can be processed fine in the first pass, and only few additional passes are required to address all remaining relationship cases. See e.g. how BKE_library_unused_linked_data_set_tag is doing this.

Enumerator
INDEX_ID_LI 
INDEX_ID_IP 
INDEX_ID_AC 
INDEX_ID_GD 
INDEX_ID_NT 
INDEX_ID_VF 
INDEX_ID_TXT 
INDEX_ID_SO 
INDEX_ID_MSK 
INDEX_ID_IM 
INDEX_ID_MC 
INDEX_ID_TE 
INDEX_ID_MA 
INDEX_ID_LS 
INDEX_ID_WO 
INDEX_ID_CF 
INDEX_ID_SIM 
INDEX_ID_PA 
INDEX_ID_KE 
INDEX_ID_AR 
INDEX_ID_ME 
INDEX_ID_CU 
INDEX_ID_MB 
INDEX_ID_HA 
INDEX_ID_PT 
INDEX_ID_VO 
INDEX_ID_LT 
INDEX_ID_LA 
INDEX_ID_CA 
INDEX_ID_SPK 
INDEX_ID_LP 
INDEX_ID_OB 
INDEX_ID_GR 
INDEX_ID_PAL 
INDEX_ID_PC 
INDEX_ID_BR 
INDEX_ID_SCE 
INDEX_ID_SCR 
INDEX_ID_WS 
INDEX_ID_WM 
INDEX_ID_NULL 
INDEX_ID_MAX 

Definition at line 779 of file DNA_ID.h.

◆ ePreviewImage_Flag

Enumerator
PRV_CHANGED 
PRV_USER_EDITED 
PRV_UNFINISHED 

Definition at line 376 of file DNA_ID.h.

◆ IDRecalcFlag

Enumerator
ID_RECALC_TRANSFORM 
ID_RECALC_GEOMETRY 
ID_RECALC_ANIMATION 
ID_RECALC_PSYS_REDO 
ID_RECALC_PSYS_RESET 
ID_RECALC_PSYS_CHILD 
ID_RECALC_PSYS_PHYS 
ID_RECALC_SHADING 
ID_RECALC_SELECT 
ID_RECALC_BASE_FLAGS 
ID_RECALC_POINT_CACHE 
ID_RECALC_EDITORS 
ID_RECALC_COPY_ON_WRITE 
ID_RECALC_SEQUENCER_STRIPS 
ID_RECALC_AUDIO_SEEK 
ID_RECALC_AUDIO_FPS 
ID_RECALC_AUDIO_VOLUME 
ID_RECALC_AUDIO_MUTE 
ID_RECALC_AUDIO_LISTENER 
ID_RECALC_AUDIO 
ID_RECALC_PARAMETERS 
ID_RECALC_SOURCE 
ID_RECALC_TAG_FOR_UNDO 
ID_RECALC_ANIMATION_NO_FLUSH 
ID_RECALC_ALL 
ID_RECALC_PSYS_ALL 

Definition at line 594 of file DNA_ID.h.