|
Blender
V2.93
|
ID and Library types, which are fundamental for sdna. More...
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 |
| #define FILTER_ID_ALL |
| #define GS | ( | a | ) |
| #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_EXTRA_USERS | ( | id | ) | (((const ID *)id)->tag & LIB_TAG_EXTRAUSER ? 1 : 0) |
| #define ID_FAKE_USERS | ( | id | ) | ((((const ID *)id)->flag & LIB_FAKEUSER) ? 1 : 0) |
| #define ID_IS_OVERRIDABLE_LIBRARY | ( | _id | ) |
| #define ID_IS_OVERRIDE_LIBRARY | ( | _id | ) | (ID_IS_OVERRIDE_LIBRARY_REAL(_id) || ID_IS_OVERRIDE_LIBRARY_VIRTUAL(_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_MISSING | ( | _id | ) | ((((const ID *)(_id))->tag & LIB_TAG_MISSING) != 0) |
| #define ID_NEW_REMAP | ( | a | ) |
| #define ID_NEW_SET | ( | _id, | |
| _idn | |||
| ) |
| #define ID_REAL_USERS | ( | id | ) | (((const ID *)id)->us - ID_FAKE_USERS(id)) |
| #define MAX_ID_NAME 66 |
| #define PRV_DEFERRED_DATA | ( | prv | ) |
| typedef void(* DrawDataFreeCb) (struct DrawData *engine_data) |
| typedef void(* DrawDataInitCb) (struct DrawData *engine_data) |
| typedef struct DrawDataList DrawDataList |
| typedef struct IDOverrideLibrary IDOverrideLibrary |
| typedef struct IDOverrideLibraryProperty IDOverrideLibraryProperty |
A single overridden property, contain all operations on this one.
| typedef struct IDOverrideLibraryRuntime IDOverrideLibraryRuntime |
| typedef struct IDProperty IDProperty |
| typedef struct IDPropertyData IDPropertyData |
| typedef enum IDRecalcFlag IDRecalcFlag |
For each library file used, a Library struct is added to Main WARNING: readfile.c, expand_doit() reads this struct without DNA check!
| typedef struct PreviewImage PreviewImage |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| 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. |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
id->flag (persistent).
| anonymous enum |
id->tag (runtime-only).
Those flags belong to three different categories, which have different expected handling in code:
| 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.
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.
| enum ePreviewImage_Flag |
| enum IDRecalcFlag |