diff options
author | Bastien Montagne <bastien@blender.org> | 2021-02-05 00:03:39 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-02-05 00:03:39 +0300 |
commit | 94cf74afbb1329a9ff099e2ebd7f43ed8313f9ec (patch) | |
tree | 6859715425521345f93993ecdcf7182b060ac236 /source/blender/blenloader/BLO_readfile.h | |
parent | 7d5640ee101e6b9ddbd9f534539ae939f68bfd9b (diff) |
Cleanup/refactor: Undosys: Get rid of the magic values for undo direction.
Move `eUndoStepDir` to `BKE_undo_system.h` and use its values
everywhere.
Note that this also introduce the `STEP_INVALID` value in that enum.
Finally, kept the matching struct members in some lower-level readfile
code as an `int` to avoid having to include `BKE_undo_system.h` in a lot
of unrelated files.
Diffstat (limited to 'source/blender/blenloader/BLO_readfile.h')
-rw-r--r-- | source/blender/blenloader/BLO_readfile.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h index 7dbe73cbd6a..237294a6017 100644 --- a/source/blender/blenloader/BLO_readfile.h +++ b/source/blender/blenloader/BLO_readfile.h @@ -84,8 +84,8 @@ struct BlendFileReadParams { uint skip_flags : 3; /* eBLOReadSkip */ uint is_startup : 1; - /** Whether we are reading the memfile for an undo (< 0) or a redo (> 0). */ - int undo_direction : 2; + /** Whether we are reading the memfile for an undo or a redo. */ + int undo_direction; /* eUndoStepDir */ }; /* skip reading some data-block types (may want to skip screen data too). */ |