Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2018-04-22 20:58:27 +0300
committerJulian Eisel <eiseljulian@gmail.com>2018-04-23 00:23:20 +0300
commit9db492de6dd07dca93f0de7dbfa92f811fe50765 (patch)
treef7050e660a9d6deedfe6873875d042c90fa5cea2 /source/blender/makesdna/DNA_screen_types.h
parent9eaf00616ba60df92cfab2837dd175b8e7eb4c44 (diff)
Cleanup: Get rid of ScrArea.butspacetype syncing with ScrArea.spacetype
The only real reason we need `butspacetype` is while switching areas, where we need to delay the actual switch to the RNA _update callback since only there we can access context. So instead of trying to sync it with `spacetype`, only set while needed and unset it afterwards (as in set to `SPACE_EMPTY`). This should also allow us to re-use `butspacetype` in versioning code when trying to read removed editors. It'll store the space type value of the removed editor which we can then use on versioning. For backwards compatibility, we store `butspacetype` with the value of `spacetype`.
Diffstat (limited to 'source/blender/makesdna/DNA_screen_types.h')
-rw-r--r--source/blender/makesdna/DNA_screen_types.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index 6d4494ca2d2..1d0fbf36912 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -251,7 +251,11 @@ typedef struct ScrArea {
rcti totrct; /* rect bound by v1 v2 v3 v4 */
- char spacetype, butspacetype; /* SPACE_..., butspacetype is button arg */
+ char spacetype; /* eSpace_Type (SPACE_FOO) */
+ /* Temporarily used while switching area type, otherwise this should be
+ * SPACE_EMPTY. It's been there for ages, name doesn't fit any more. */
+ char butspacetype; /* eSpace_Type (SPACE_FOO) */
+
short winx, winy; /* size */
short headertype; /* OLD! 0=no header, 1= down, 2= up */