Defines in this header are only used to define blend file storage. This allows us to rename variables & structs without breaking compatibility.
- When renaming the member of a struct which has itself been renamed refer to the newer name, not the original.
- Changes here only change generated code for
makesdna.cc and makesrna.cc without impacting Blender's run-time, besides allowing us to use the new names.
- Renaming something that has already been renamed can be done by editing the existing rename macro. All references to the previous destination name can be removed since they're never written to disk.
- Old names aren't sanity checked (since this file is the only place that knows about them) typos in the old names will break both backwards & forwards compatibility TAKE CARE.
- Old names may be referenced as strings in versioning code which uses: #DNA_struct_exists & #DNA_struct_member_exists. The names used for versioning checks must be updated too.
Before editing rename defines run:
sha1sum $BUILD_DIR/source/blender/makesdna/intern/dna.c
Compare the results before & after to ensure all changes are reversed by renaming and the DNA remains unchanged.
- See also
versioning_dna.cc for actual version patching.
Definition in file dna_rename_defs.h.