diff options
author | Bastien Montagne <bastien@blender.org> | 2020-04-16 17:19:44 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-04-16 17:21:11 +0300 |
commit | 81bb2a143c5e9cb5885717b7f1dca84fdba41c0b (patch) | |
tree | 05e24cdaf595788d7bb32f71ced61c2dbe01b73b /source/blender/makesdna | |
parent | dac609120785ad26a3ba56cb32019226c0f9762d (diff) |
Fix T75730: Properly remove unused override properties/operations.
While code is supposed to handle gracefully invalid override operations,
it is much cleaner to avoid those completely.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_ID.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index dd3964dfc15..d6d3628cc66 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -135,7 +135,10 @@ typedef struct IDOverrideLibraryPropertyOperation { /* Type of override. */ short operation; short flag; - char _pad0[4]; + + /** Runtime, tags are common to both IDOverrideProperty and IDOverridePropertyOperation. */ + short tag; + char _pad0[2]; /* Sub-item references, if needed (for arrays or collections only). * We need both reference and local values to allow e.g. insertion into collections @@ -189,8 +192,18 @@ typedef struct IDOverrideLibraryProperty { /** List of overriding operations (IDOverridePropertyOperation) applied to this property. */ ListBase operations; + + /** Runtime, tags are common to both IDOverrideProperty and IDOverridePropertyOperation. */ + short tag; + char _pad0[6]; } IDOverrideLibraryProperty; +/* IDOverrideProperty->tag and IDOverridePropertyOperation->tag. */ +enum { + /** This override property (operation) is unused and should be removed by cleanup process. */ + IDOVERRIDE_LIBRARY_TAG_UNUSED = 1 << 0, +}; + /* We do not need a full struct for that currently, just a GHash. */ typedef struct GHash IDOverrideLibraryRuntime; |