Blender
V3.3
|
ID and Library types, which are fundamental for sdna. More...
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 |
#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 | ) | (ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY((_id)) && (((const ID *)(_id))->tag & LIB_TAG_EXTERN) != 0) |
#define ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY | ( | _id | ) |
#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_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 MAX_ID_NAME 66 |
#define PRV_DEFERRED_DATA | ( | prv | ) |
typedef struct DrawDataList DrawDataList |
typedef enum eIDPropertyType eIDPropertyType |
typedef struct ID_Runtime ID_Runtime |
typedef struct ID_Runtime_Remap ID_Runtime_Remap |
Status used and counters created during id-remapping.
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 struct IDPropertyUIData IDPropertyUIData |
typedef struct IDPropertyUIDataFloat IDPropertyUIDataFloat |
typedef struct IDPropertyUIDataID IDPropertyUIDataID |
typedef struct IDPropertyUIDataInt IDPropertyUIDataInt |
typedef struct IDPropertyUIDataString IDPropertyUIDataString |
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 Library_Runtime Library_Runtime |
typedef struct LibraryWeakReference 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.
typedef struct PreviewImage PreviewImage |
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 |
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. |
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:
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
|
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. |
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 eIDPropertyType |
enum eLibrary_Tag |
enum ePreviewImage_Flag |
enum IDRecalcFlag |