Blender  V3.3
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  IDPropertyUIData
 
struct  IDPropertyUIDataInt
 
struct  IDPropertyUIDataFloat
 
struct  IDPropertyUIDataString
 
struct  IDPropertyUIDataID
 
struct  IDPropertyData
 
struct  IDProperty
 
struct  IDOverrideLibraryPropertyOperation
 
struct  IDOverrideLibraryProperty
 
struct  IDOverrideLibraryRuntime
 
struct  IDOverrideLibrary
 
struct  ID_Runtime_Remap
 
struct  ID_Runtime
 
struct  ID
 
struct  Library_Runtime
 
struct  Library
 
struct  LibraryWeakReference
 
struct  PreviewImage
 

Macros

#define MAX_IDPROP_NAME   64
 
#define DEFAULT_ALLOC_FOR_NULL_STRINGS   64
 
#define IDP_NUMTYPES   10
 
#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_HIERARCHY(_id)
 
#define ID_IS_OVERRIDABLE_LIBRARY(_id)    (ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY((_id)) && (((const ID *)(_id))->tag & LIB_TAG_EXTERN) != 0)
 
#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_HIERARCHY_ROOT(_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 ID_TYPE_SUPPORTS_PARAMS_WITHOUT_COW(id_type)   ELEM(id_type, ID_ME)
 
#define ID_TYPE_IS_DEPRECATED(id_type)   ELEM(id_type, ID_IP)
 
#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_LEGACY   (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_CV   (1ULL << 32)
 
#define FILTER_ID_PT   (1ULL << 33)
 
#define FILTER_ID_VO   (1ULL << 34)
 
#define FILTER_ID_SIM   (1ULL << 35)
 
#define FILTER_ID_KE   (1ULL << 36)
 
#define FILTER_ID_SCR   (1ULL << 37)
 
#define FILTER_ID_WM   (1ULL << 38)
 
#define FILTER_ID_LI   (1ULL << 39)
 
#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 IDPropertyUIData IDPropertyUIData
 
typedef struct IDPropertyUIDataInt IDPropertyUIDataInt
 
typedef struct IDPropertyUIDataFloat IDPropertyUIDataFloat
 
typedef struct IDPropertyUIDataString IDPropertyUIDataString
 
typedef struct IDPropertyUIDataID IDPropertyUIDataID
 
typedef struct IDPropertyData IDPropertyData
 
typedef struct IDProperty IDProperty
 
typedef enum eIDPropertyType eIDPropertyType
 
typedef struct IDOverrideLibraryPropertyOperation IDOverrideLibraryPropertyOperation
 
typedef struct IDOverrideLibraryProperty IDOverrideLibraryProperty
 
typedef struct IDOverrideLibraryRuntime IDOverrideLibraryRuntime
 
typedef struct IDOverrideLibrary IDOverrideLibrary
 
typedef struct ID_Runtime_Remap ID_Runtime_Remap
 
typedef struct ID_Runtime ID_Runtime
 
typedef struct ID ID
 
typedef struct Library_Runtime Library_Runtime
 
typedef struct Library Library
 
typedef struct LibraryWeakReference LibraryWeakReference
 
typedef struct PreviewImage PreviewImage
 
typedef enum IDRecalcFlag IDRecalcFlag
 

Enumerations

enum  eIDPropertyType {
  IDP_STRING = 0 , IDP_INT = 1 , IDP_FLOAT = 2 , IDP_ARRAY = 5 ,
  IDP_GROUP = 6 , IDP_ID = 7 , IDP_DOUBLE = 8 , IDP_IDPARRAY = 9
}
 
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  { IDOVERRIDE_LIBRARY_FLAG_NO_HIERARCHY = 1 << 0 , IDOVERRIDE_LIBRARY_FLAG_SYSTEM_DEFINED = 1 << 1 }
 
enum  { ID_REMAP_IS_LINKED_DIRECT = 1 << 0 , ID_REMAP_IS_USER_ONE_SKIPPED = 1 << 1 }
 
enum  eLibrary_Tag { LIBRARY_TAG_RESYNC_REQUIRED = 1 << 0 }
 
enum  ePreviewImage_Flag { PRV_CHANGED = (1 << 0) , PRV_USER_EDITED = (1 << 1) , PRV_RENDERING = (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_FRAME_CHANGE = (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_NTREE_OUTPUT = (1 << 25) ,
  ID_RECALC_ANIMATION_NO_FLUSH = ID_RECALC_COPY_ON_WRITE , ID_RECALC_GEOMETRY_ALL_MODES = ID_RECALC_GEOMETRY | 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_LEGACY , INDEX_ID_MB , INDEX_ID_CV ,
  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 132 of file DNA_ID.h.

◆ FILTER_ID_AC

#define FILTER_ID_AC   (1ULL << 0)

Definition at line 899 of file DNA_ID.h.

◆ FILTER_ID_ALL

#define FILTER_ID_ALL
Value:
#define FILTER_ID_SCR
Definition: DNA_ID.h:935
#define FILTER_ID_MC
Definition: DNA_ID.h:912
#define FILTER_ID_SPK
Definition: DNA_ID.h:920
#define FILTER_ID_WM
Definition: DNA_ID.h:936
#define FILTER_ID_CF
Definition: DNA_ID.h:927
#define FILTER_ID_AC
Definition: DNA_ID.h:899
#define FILTER_ID_CA
Definition: DNA_ID.h:902
#define FILTER_ID_PT
Definition: DNA_ID.h:931
#define FILTER_ID_CU_LEGACY
Definition: DNA_ID.h:903
#define FILTER_ID_BR
Definition: DNA_ID.h:901
#define FILTER_ID_MB
Definition: DNA_ID.h:911
#define FILTER_ID_VF
Definition: DNA_ID.h:924
#define FILTER_ID_LA
Definition: DNA_ID.h:907
#define FILTER_ID_GR
Definition: DNA_ID.h:905
#define FILTER_ID_TE
Definition: DNA_ID.h:922
#define FILTER_ID_LT
Definition: DNA_ID.h:909
#define FILTER_ID_LS
Definition: DNA_ID.h:908
#define FILTER_ID_PA
Definition: DNA_ID.h:926
#define FILTER_ID_CV
Definition: DNA_ID.h:930
#define FILTER_ID_ME
Definition: DNA_ID.h:913
#define FILTER_ID_AR
Definition: DNA_ID.h:900
#define FILTER_ID_SIM
Definition: DNA_ID.h:933
#define FILTER_ID_MSK
Definition: DNA_ID.h:914
#define FILTER_ID_PC
Definition: DNA_ID.h:918
#define FILTER_ID_PAL
Definition: DNA_ID.h:917
#define FILTER_ID_IM
Definition: DNA_ID.h:906
#define FILTER_ID_SCE
Definition: DNA_ID.h:919
#define FILTER_ID_LI
Definition: DNA_ID.h:937
#define FILTER_ID_LP
Definition: DNA_ID.h:929
#define FILTER_ID_VO
Definition: DNA_ID.h:932
#define FILTER_ID_WO
Definition: DNA_ID.h:925
#define FILTER_ID_NT
Definition: DNA_ID.h:915
#define FILTER_ID_TXT
Definition: DNA_ID.h:923

Definition at line 939 of file DNA_ID.h.

◆ FILTER_ID_AR

#define FILTER_ID_AR   (1ULL << 1)

Definition at line 900 of file DNA_ID.h.

◆ FILTER_ID_BR

#define FILTER_ID_BR   (1ULL << 2)

Definition at line 901 of file DNA_ID.h.

◆ FILTER_ID_CA

#define FILTER_ID_CA   (1ULL << 3)

Definition at line 902 of file DNA_ID.h.

◆ FILTER_ID_CF

#define FILTER_ID_CF   (1ULL << 28)

Definition at line 927 of file DNA_ID.h.

◆ FILTER_ID_CU_LEGACY

#define FILTER_ID_CU_LEGACY   (1ULL << 4)

Definition at line 903 of file DNA_ID.h.

◆ FILTER_ID_CV

#define FILTER_ID_CV   (1ULL << 32)

Definition at line 930 of file DNA_ID.h.

◆ FILTER_ID_GD

#define FILTER_ID_GD   (1ULL << 5)

Definition at line 904 of file DNA_ID.h.

◆ FILTER_ID_GR

#define FILTER_ID_GR   (1ULL << 6)

Definition at line 905 of file DNA_ID.h.

◆ FILTER_ID_IM

#define FILTER_ID_IM   (1ULL << 7)

Definition at line 906 of file DNA_ID.h.

◆ FILTER_ID_KE

#define FILTER_ID_KE   (1ULL << 36)

Definition at line 934 of file DNA_ID.h.

◆ FILTER_ID_LA

#define FILTER_ID_LA   (1ULL << 8)

Definition at line 907 of file DNA_ID.h.

◆ FILTER_ID_LI

#define FILTER_ID_LI   (1ULL << 39)

Definition at line 937 of file DNA_ID.h.

◆ FILTER_ID_LP

#define FILTER_ID_LP   (1ULL << 31)

Definition at line 929 of file DNA_ID.h.

◆ FILTER_ID_LS

#define FILTER_ID_LS   (1ULL << 9)

Definition at line 908 of file DNA_ID.h.

◆ FILTER_ID_LT

#define FILTER_ID_LT   (1ULL << 10)

Definition at line 909 of file DNA_ID.h.

◆ FILTER_ID_MA

#define FILTER_ID_MA   (1ULL << 11)

Definition at line 910 of file DNA_ID.h.

◆ FILTER_ID_MB

#define FILTER_ID_MB   (1ULL << 12)

Definition at line 911 of file DNA_ID.h.

◆ FILTER_ID_MC

#define FILTER_ID_MC   (1ULL << 13)

Definition at line 912 of file DNA_ID.h.

◆ FILTER_ID_ME

#define FILTER_ID_ME   (1ULL << 14)

Definition at line 913 of file DNA_ID.h.

◆ FILTER_ID_MSK

#define FILTER_ID_MSK   (1ULL << 15)

Definition at line 914 of file DNA_ID.h.

◆ FILTER_ID_NT

#define FILTER_ID_NT   (1ULL << 16)

Definition at line 915 of file DNA_ID.h.

◆ FILTER_ID_OB

#define FILTER_ID_OB   (1ULL << 17)

Definition at line 916 of file DNA_ID.h.

◆ FILTER_ID_PA

#define FILTER_ID_PA   (1ULL << 27)

Definition at line 926 of file DNA_ID.h.

◆ FILTER_ID_PAL

#define FILTER_ID_PAL   (1ULL << 18)

Definition at line 917 of file DNA_ID.h.

◆ FILTER_ID_PC

#define FILTER_ID_PC   (1ULL << 19)

Definition at line 918 of file DNA_ID.h.

◆ FILTER_ID_PT

#define FILTER_ID_PT   (1ULL << 33)

Definition at line 931 of file DNA_ID.h.

◆ FILTER_ID_SCE

#define FILTER_ID_SCE   (1ULL << 20)

Definition at line 919 of file DNA_ID.h.

◆ FILTER_ID_SCR

#define FILTER_ID_SCR   (1ULL << 37)

Definition at line 935 of file DNA_ID.h.

◆ FILTER_ID_SIM

#define FILTER_ID_SIM   (1ULL << 35)

Definition at line 933 of file DNA_ID.h.

◆ FILTER_ID_SO

#define FILTER_ID_SO   (1ULL << 22)

Definition at line 921 of file DNA_ID.h.

◆ FILTER_ID_SPK

#define FILTER_ID_SPK   (1ULL << 21)

Definition at line 920 of file DNA_ID.h.

◆ FILTER_ID_TE

#define FILTER_ID_TE   (1ULL << 23)

Definition at line 922 of file DNA_ID.h.

◆ FILTER_ID_TXT

#define FILTER_ID_TXT   (1ULL << 24)

Definition at line 923 of file DNA_ID.h.

◆ FILTER_ID_VF

#define FILTER_ID_VF   (1ULL << 25)

Definition at line 924 of file DNA_ID.h.

◆ FILTER_ID_VO

#define FILTER_ID_VO   (1ULL << 34)

Definition at line 932 of file DNA_ID.h.

◆ FILTER_ID_WM

#define FILTER_ID_WM   (1ULL << 38)

Definition at line 936 of file DNA_ID.h.

◆ FILTER_ID_WO

#define FILTER_ID_WO   (1ULL << 26)

Definition at line 925 of file DNA_ID.h.

◆ FILTER_ID_WS

#define FILTER_ID_WS   (1ULL << 29)

Definition at line 928 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:44
static unsigned a[3]
Definition: RandGen.cpp:78

Definition at line 613 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 559 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 561 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 556 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 554 of file DNA_ID.h.

◆ ID_FAKE_USERS

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

Definition at line 552 of file DNA_ID.h.

◆ ID_IS_ASSET

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

Definition at line 598 of file DNA_ID.h.

◆ ID_IS_LINKED

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

Definition at line 566 of file DNA_ID.h.

◆ ID_IS_OVERRIDABLE_LIBRARY

#define ID_IS_OVERRIDABLE_LIBRARY (   _id)     (ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY((_id)) && (((const ID *)(_id))->tag & LIB_TAG_EXTERN) != 0)

Definition at line 574 of file DNA_ID.h.

◆ ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY

#define ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY (   _id)
Value:
(ID_IS_LINKED(_id) && !ID_MISSING(_id) && \
!ELEM(GS(((ID *)(_id))->name), ID_SCE))
@ IDTYPE_FLAGS_NO_LIBLINKING
Definition: BKE_idtype.h:32
const struct IDTypeInfo * BKE_idtype_get_info_from_id(const struct ID *id)
#define ELEM(...)
#define ID_IS_LINKED(_id)
Definition: DNA_ID.h:566
#define GS(a)
Definition: DNA_ID.h:613
#define ID_MISSING(_id)
Definition: DNA_ID.h:564
@ ID_SCE
Definition: DNA_ID_enums.h:45
uint32_t flags
Definition: BKE_idtype.h:139
Definition: DNA_ID.h:368

Definition at line 570 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 588 of file DNA_ID.h.

◆ ID_IS_OVERRIDE_LIBRARY_HIERARCHY_ROOT

#define ID_IS_OVERRIDE_LIBRARY_HIERARCHY_ROOT (   _id)
Value:
((ID *)(_id))->override_library->hierarchy_root == ((ID *)(_id)))
#define ID_IS_OVERRIDE_LIBRARY_REAL(_id)
Definition: DNA_ID.h:581

Definition at line 591 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 581 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 595 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 585 of file DNA_ID.h.

◆ ID_MISSING

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

Definition at line 564 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)
SyclQueue void void size_t num_bytes void

Definition at line 621 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:704

Definition at line 617 of file DNA_ID.h.

◆ ID_REAL_USERS

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

Definition at line 553 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 601 of file DNA_ID.h.

◆ ID_TYPE_IS_DEPRECATED

#define ID_TYPE_IS_DEPRECATED (   id_type)    ELEM(id_type, ID_IP)

Definition at line 608 of file DNA_ID.h.

◆ ID_TYPE_SUPPORTS_PARAMS_WITHOUT_COW

#define ID_TYPE_SUPPORTS_PARAMS_WITHOUT_COW (   id_type)    ELEM(id_type, ID_ME)

Definition at line 606 of file DNA_ID.h.

◆ IDP_NUMTYPES

#define IDP_NUMTYPES   10

Definition at line 146 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 337 of file DNA_ID.h.

◆ MAX_IDPROP_NAME

#define MAX_IDPROP_NAME   64

Definition at line 131 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:524

Definition at line 547 of file DNA_ID.h.

Typedef Documentation

◆ DrawData

typedef struct DrawData DrawData

◆ DrawDataFreeCb

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

Definition at line 30 of file DNA_ID.h.

◆ DrawDataInitCb

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

Definition at line 29 of file DNA_ID.h.

◆ DrawDataList

typedef struct DrawDataList DrawDataList

◆ eIDPropertyType

◆ ID

typedef struct ID ID

◆ ID_Runtime

typedef struct ID_Runtime ID_Runtime

◆ ID_Runtime_Remap

Status used and counters created during id-remapping.

◆ IDOverrideLibrary

◆ IDOverrideLibraryProperty

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

◆ IDOverrideLibraryPropertyOperation

◆ IDOverrideLibraryRuntime

◆ IDProperty

typedef struct IDProperty IDProperty

◆ IDPropertyData

◆ IDPropertyUIData

◆ IDPropertyUIDataFloat

◆ IDPropertyUIDataID

◆ IDPropertyUIDataInt

◆ IDPropertyUIDataString

◆ 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!

◆ Library_Runtime

◆ LibraryWeakReference

A weak library/ID reference for local data that has been appended, to allow re-using that local data instead of creating a new copy of it in future appends.

NOTE: This is by design a week reference, in other words code should be totally fine and perform a regular append if it cannot find a valid matching local ID.

NOTE: There should always be only one single ID in current Main matching a given linked reference.

◆ PreviewImage

typedef struct PreviewImage PreviewImage

Enumeration Type Documentation

◆ 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 149 of file DNA_ID.h.

◆ anonymous enum

anonymous enum
Enumerator
IDP_STRING_SUB_UTF8 
IDP_STRING_SUB_BYTE 

Definition at line 163 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 169 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 216 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 236 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 273 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 286 of file DNA_ID.h.

◆ anonymous enum

anonymous enum
Enumerator
IDOVERRIDE_LIBRARY_FLAG_NO_HIERARCHY 

The override data-block should not be considered as part of an override hierarchy (generally because it was created as an single override, outside of any hierarchy consideration).

IDOVERRIDE_LIBRARY_FLAG_SYSTEM_DEFINED 

The override ID is required for the system to work (because of ID dependencies), but is not seen as editable by the user.

Definition at line 317 of file DNA_ID.h.

◆ anonymous enum

anonymous enum

ID_Runtime_Remap.status

Enumerator
ID_REMAP_IS_LINKED_DIRECT 

new_id is directly linked in current .blend.

ID_REMAP_IS_USER_ONE_SKIPPED 

There was some skipped 'user_one' usages of old_id.

Definition at line 340 of file DNA_ID.h.

◆ anonymous enum

anonymous enum
Enumerator
PRV_TAG_DEFFERED 
PRV_TAG_DEFFERED_RENDERING 
PRV_TAG_DEFFERED_DELETE 

Definition at line 523 of file DNA_ID.h.

◆ anonymous enum

anonymous enum

id->flag (persistent).

Enumerator
LIB_FAKEUSER 

Don't delete the data-block 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 

Data-block 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 shape-keys, 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 628 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.

RESET_NEVER

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 

The data-block is not the original COW ID created by the depsgraph, but has be re-allocated during the evaluation process of another ID.

RESET_NEVER

Typical example is object data, when evaluating the object's modifier stack the final obdata can be different than the COW initial obdata ID.

LIB_TAG_LOCALIZED 

The data-block is fully outside of any ID management area, and should be considered as a purely independent data.

RESET_NEVER

NOTE: Only used by node-groups currently.

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 669 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_LEGACY 
INDEX_ID_MB 
INDEX_ID_CV 
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 978 of file DNA_ID.h.

◆ eIDPropertyType

Enumerator
IDP_STRING 
IDP_INT 
IDP_FLOAT 
IDP_ARRAY 

Array containing int, floats, doubles or groups.

IDP_GROUP 
IDP_ID 
IDP_DOUBLE 
IDP_IDPARRAY 

Definition at line 135 of file DNA_ID.h.

◆ eLibrary_Tag

Library.tag

Enumerator
LIBRARY_TAG_RESYNC_REQUIRED 

Definition at line 490 of file DNA_ID.h.

◆ ePreviewImage_Flag

Enumerator
PRV_CHANGED 
PRV_USER_EDITED 
PRV_RENDERING 

Definition at line 516 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_FRAME_CHANGE 
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_NTREE_OUTPUT 
ID_RECALC_ANIMATION_NO_FLUSH 
ID_RECALC_GEOMETRY_ALL_MODES 
ID_RECALC_ALL 
ID_RECALC_PSYS_ALL 

Definition at line 766 of file DNA_ID.h.