diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-12 03:43:33 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-16 01:32:29 +0300 |
commit | a2f345468c94e4b8a842ba9a9988237cd5c8194f (patch) | |
tree | b896eed5a54fa6063afe6e467876d47080d0349e /source/blender/makesdna/DNA_sdna_types.h | |
parent | bc657ef16eed438a1eb5156e5b46173044905dcc (diff) |
DNA: support DNA type & name aliases
This allows us to rename struct & struct members in the source code
without changing the file format.
This is useful because the code becomes increasingly confusing when
names such as oops, ipo & dupli aren't used anywhere except DNA headers.
dna_rename_defs.h is used to define renaming operations.
The renaming it's self will be done separately.
Diffstat (limited to 'source/blender/makesdna/DNA_sdna_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_sdna_types.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h index 36075d62002..b39b672e84c 100644 --- a/source/blender/makesdna/DNA_sdna_types.h +++ b/source/blender/makesdna/DNA_sdna_types.h @@ -64,6 +64,14 @@ typedef struct SDNA { /** Temporary memory currently only used for version patching DNA. */ struct MemArena *mem_arena; + /** Runtime versions of data stored in DNA, lazy initialized, + * only different when renaming is done. */ + struct { + /** Aligned with #SDNA.names, same pointers when unchanged. */ + const char **names; + /** Aligned with #SDNA.types, same pointers when unchanged. */ + const char **types; + } alias; } SDNA; # |