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:
authorCampbell Barton <ideasman42@gmail.com>2018-06-15 11:23:03 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-15 11:24:53 +0300
commitcbc7ee28d7fe145564ca6c398a99e0519d97010d (patch)
tree9d2b4fed13dab24be2b43bb55509d83df803769b /source/blender/blenloader/intern
parent3ee606621cf53a2a4897e534e7e04d3632f419f8 (diff)
WM: 2.8 screen compatibility
Without these minor changes loading files from 2.8 will crash. Manually applied edits from 26786a2b87a08
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r--source/blender/blenloader/intern/readfile.c15
-rw-r--r--source/blender/blenloader/intern/writefile.c4
2 files changed, 14 insertions, 5 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 937853463a2..7d3d417bf33 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6817,11 +6817,12 @@ void blo_lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *cursc
/* free render engines for now */
for (ar = sa->regionbase.first; ar; ar = ar->next) {
- RegionView3D *rv3d= ar->regiondata;
-
- if (rv3d && rv3d->render_engine) {
- RE_engine_free(rv3d->render_engine);
- rv3d->render_engine = NULL;
+ if (ar->regiontype == RGN_TYPE_WINDOW) {
+ RegionView3D *rv3d = ar->regiondata;
+ if (rv3d && rv3d->render_engine) {
+ RE_engine_free(rv3d->render_engine);
+ rv3d->render_engine = NULL;
+ }
}
}
}
@@ -7051,6 +7052,10 @@ static void direct_link_region(FileData *fd, ARegion *ar, int spacetype)
/* unkown space type, don't leak regiondata */
ar->regiondata = NULL;
}
+ else if (ar->flag & RGN_FLAG_TEMP_REGIONDATA) {
+ /* Runtime data, don't use. */
+ ar->regiondata = NULL;
+ }
else {
ar->regiondata = newdataadr(fd, ar->regiondata);
if (ar->regiondata) {
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 88e6cbc8d24..0e67bde6883 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2825,6 +2825,10 @@ static void write_region(WriteData *wd, ARegion *ar, int spacetype)
writestruct(wd, DATA, ARegion, 1, ar);
if (ar->regiondata) {
+ if (ar->flag & RGN_FLAG_TEMP_REGIONDATA) {
+ return;
+ }
+
switch (spacetype) {
case SPACE_VIEW3D:
if (ar->regiontype == RGN_TYPE_WINDOW) {