Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesdna/DNA_ID.h
| Show All 31 Lines | |||||
| # | # | ||||
| # | # | ||||
| typedef struct DrawData { | typedef struct DrawData { | ||||
| struct DrawData *next, *prev; | struct DrawData *next, *prev; | ||||
| struct DrawEngineType *engine_type; | struct DrawEngineType *engine_type; | ||||
| /* Only nested data, NOT the engine data itself. */ | /* Only nested data, NOT the engine data itself. */ | ||||
| DrawDataFreeCb free; | DrawDataFreeCb free; | ||||
| /* Accumulated recalc flags, which corresponds to ID->recalc flags. */ | /* Accumulated recalc flags, which corresponds to ID->recalc flags. */ | ||||
| int recalc; | unsigned int recalc; | ||||
| } DrawData; | } DrawData; | ||||
| typedef struct DrawDataList { | typedef struct DrawDataList { | ||||
| struct DrawData *first, *last; | struct DrawData *first, *last; | ||||
| } DrawDataList; | } DrawDataList; | ||||
| typedef struct IDPropertyUIData { | typedef struct IDPropertyUIData { | ||||
| /** Tooltip / property description pointer. Owned by the IDProperty. */ | /** Tooltip / property description pointer. Owned by the IDProperty. */ | ||||
| ▲ Show 20 Lines • Show All 333 Lines • ▼ Show 20 Lines | typedef struct ID { | ||||
| */ | */ | ||||
| short flag; | short flag; | ||||
| /** | /** | ||||
| * LIB_TAG_... tags (runtime only, cleared at read time). | * LIB_TAG_... tags (runtime only, cleared at read time). | ||||
| */ | */ | ||||
| int tag; | int tag; | ||||
| int us; | int us; | ||||
| int icon_id; | int icon_id; | ||||
| int recalc; | unsigned int recalc; | ||||
| /** | /** | ||||
| * Used by undo code. recalc_after_undo_push contains the changes between the | * Used by undo code. recalc_after_undo_push contains the changes between the | ||||
| * last undo push and the current state. This is accumulated as IDs are tagged | * last undo push and the current state. This is accumulated as IDs are tagged | ||||
| * for update in the depsgraph, and only cleared on undo push. | * for update in the depsgraph, and only cleared on undo push. | ||||
| * | * | ||||
| * recalc_up_to_undo_push is saved to undo memory, and is the value of | * recalc_up_to_undo_push is saved to undo memory, and is the value of | ||||
| * recalc_after_undo_push at the time of the undo push. This means it can be | * recalc_after_undo_push at the time of the undo push. This means it can be | ||||
| * used to find the changes between undo states. | * used to find the changes between undo states. | ||||
| */ | */ | ||||
| int recalc_up_to_undo_push; | unsigned int recalc_up_to_undo_push; | ||||
| int recalc_after_undo_push; | unsigned int recalc_after_undo_push; | ||||
| /** | /** | ||||
| * A session-wide unique identifier for a given ID, that remain the same across potential | * A session-wide unique identifier for a given ID, that remain the same across potential | ||||
| * re-allocations (e.g. due to undo/redo steps). | * re-allocations (e.g. due to undo/redo steps). | ||||
| */ | */ | ||||
| unsigned int session_uuid; | unsigned int session_uuid; | ||||
| IDProperty *properties; | IDProperty *properties; | ||||
| ▲ Show 20 Lines • Show All 348 Lines • ▼ Show 20 Lines | enum { | ||||
| /** | /** | ||||
| * The data-block is a library override that needs re-sync to its linked reference. | * The data-block is a library override that needs re-sync to its linked reference. | ||||
| */ | */ | ||||
| LIB_TAG_LIB_OVERRIDE_NEED_RESYNC = 1 << 21, | LIB_TAG_LIB_OVERRIDE_NEED_RESYNC = 1 << 21, | ||||
| }; | }; | ||||
| /* Tag given ID for an update in all the dependency graphs. */ | /* Tag given ID for an update in all the dependency graphs. */ | ||||
| typedef enum IDRecalcFlag { | typedef enum IDRecalcFlag : unsigned int { | ||||
| /*************************************************************************** | /*************************************************************************** | ||||
| * Individual update tags, this is what ID gets tagged for update with. */ | * Individual update tags, this is what ID gets tagged for update with. */ | ||||
| /* ** Object transformation changed. ** */ | /* ** Object transformation changed. ** */ | ||||
| ID_RECALC_TRANSFORM = (1 << 0), | ID_RECALC_TRANSFORM = (1 << 0), | ||||
| /* ** Geometry changed. ** | /* ** Geometry changed. ** | ||||
| * | * | ||||
| ▲ Show 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | typedef enum IDRecalcFlag : unsigned int { | ||||
| * require any update, they have actually been 'virtually' remapped from the linked ID to the | * require any update, they have actually been 'virtually' remapped from the linked ID to the | ||||
| * local one. | * local one. | ||||
| */ | */ | ||||
| ID_RECALC_TAG_FOR_UNDO = (1 << 24), | ID_RECALC_TAG_FOR_UNDO = (1 << 24), | ||||
| /* The node tree has changed in a way that affects its output nodes. */ | /* The node tree has changed in a way that affects its output nodes. */ | ||||
| ID_RECALC_NTREE_OUTPUT = (1 << 25), | ID_RECALC_NTREE_OUTPUT = (1 << 25), | ||||
| /* Provisioned flags. | |||||
| * | |||||
| * Not for actual use. The idea of them is to have all bits of the `IDRecalcFlag` defined to a | |||||
| * known value, silencing sanitizer warnings when checkign bits of the ID_RECALC_ALL. */ | |||||
| ID_RECALC_PROVISION_26 = (1 << 26), | |||||
| ID_RECALC_PROVISION_27 = (1 << 27), | |||||
| ID_RECALC_PROVISION_28 = (1 << 28), | |||||
| ID_RECALC_PROVISION_29 = (1 << 29), | |||||
| ID_RECALC_PROVISION_30 = (1 << 30), | |||||
| ID_RECALC_PROVISION_31 = (1u << 31), | |||||
| /*************************************************************************** | /*************************************************************************** | ||||
| * Pseudonyms, to have more semantic meaning in the actual code without | * Pseudonyms, to have more semantic meaning in the actual code without | ||||
| * using too much low-level and implementation specific tags. */ | * using too much low-level and implementation specific tags. */ | ||||
| /* Update animation data-block itself, without doing full re-evaluation of | /* Update animation data-block itself, without doing full re-evaluation of | ||||
| * all dependent objects. */ | * all dependent objects. */ | ||||
| ID_RECALC_ANIMATION_NO_FLUSH = ID_RECALC_COPY_ON_WRITE, | ID_RECALC_ANIMATION_NO_FLUSH = ID_RECALC_COPY_ON_WRITE, | ||||
| /* Ensure geometry of object and edit modes are both up-to-date in the evaluated data-block. | /* Ensure geometry of object and edit modes are both up-to-date in the evaluated data-block. | ||||
| * Example usage is when mesh validation modifies the non-edit-mode data, | * Example usage is when mesh validation modifies the non-edit-mode data, | ||||
| * which we want to be copied over to the evaluated data-block. */ | * which we want to be copied over to the evaluated data-block. */ | ||||
| ID_RECALC_GEOMETRY_ALL_MODES = ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE, | ID_RECALC_GEOMETRY_ALL_MODES = ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE, | ||||
| /*************************************************************************** | /*************************************************************************** | ||||
| * Aggregate flags, use only for checks on runtime. | * Aggregate flags, use only for checks on runtime. | ||||
| * Do NOT use those for tagging. */ | * Do NOT use those for tagging. */ | ||||
| /* Identifies that SOMETHING has been changed in this ID. */ | /* Identifies that SOMETHING has been changed in this ID. */ | ||||
| ID_RECALC_ALL = ~(0), | ID_RECALC_ALL = (0xffffffff), | ||||
| /* Identifies that something in particle system did change. */ | /* Identifies that something in particle system did change. */ | ||||
| ID_RECALC_PSYS_ALL = (ID_RECALC_PSYS_REDO | ID_RECALC_PSYS_RESET | ID_RECALC_PSYS_CHILD | | ID_RECALC_PSYS_ALL = (ID_RECALC_PSYS_REDO | ID_RECALC_PSYS_RESET | ID_RECALC_PSYS_CHILD | | ||||
| ID_RECALC_PSYS_PHYS), | ID_RECALC_PSYS_PHYS), | ||||
| } IDRecalcFlag; | } IDRecalcFlag; | ||||
| /* To filter ID types (filter_id). 64 bit to fit all types. */ | /* To filter ID types (filter_id). 64 bit to fit all types. */ | ||||
| #define FILTER_ID_AC (1ULL << 0) | #define FILTER_ID_AC (1ULL << 0) | ||||
| ▲ Show 20 Lines • Show All 164 Lines • Show Last 20 Lines | |||||