Cleanup: Get rid of ScrArea.butspacetype syncing with ScrArea.spacetype
authorJulian Eisel <eiseljulian@gmail.com>
Sun, 22 Apr 2018 17:58:27 +0000 (19:58 +0200)
committerJulian Eisel <eiseljulian@gmail.com>
Sun, 22 Apr 2018 21:23:20 +0000 (23:23 +0200)
commit9db492de6dd07dca93f0de7dbfa92f811fe50765
treef7050e660a9d6deedfe6873875d042c90fa5cea2
parent9eaf00616ba60df92cfab2837dd175b8e7eb4c44
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`.
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/versioning_250.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/screen/area.c
source/blender/editors/screen/screen_edit.c
source/blender/makesdna/DNA_screen_types.h
source/blender/makesrna/intern/rna_screen.c