diff options
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index fdaa8f5e193..6cc81218a6b 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5288,6 +5288,14 @@ static void lib_link_screen(FileData *fd, Main *main) */ sima->gpd = newlibadr_us(fd, sc->id.lib, sima->gpd); } + else if (sl->spacetype == SPACE_SEQ) { + SpaceSeq *sseq = (SpaceSeq *)sl; + + /* NOTE: pre-2.5, this was local data not lib data, but now we need this as lib data + * so fingers crossed this works fine! + */ + sseq->gpd = newlibadr_us(fd, sc->id.lib, sseq->gpd); + } else if (sl->spacetype == SPACE_NLA) { SpaceNla *snla= (SpaceNla *)sl; bDopeSheet *ads= snla->ads; @@ -5358,15 +5366,20 @@ static void lib_link_screen(FileData *fd, Main *main) } else if (sl->spacetype == SPACE_CLIP) { SpaceClip *sclip = (SpaceClip *)sl; - + sclip->clip = newlibadr_us(fd, sc->id.lib, sclip->clip); sclip->mask = newlibadr_us(fd, sc->id.lib, sclip->mask); - + sclip->scopes.track_search = NULL; sclip->scopes.track_preview = NULL; sclip->draw_context = NULL; sclip->scopes.ok = 0; } + else if (sl->spacetype == SPACE_LOGIC) { + SpaceLogic *slogic = (SpaceLogic *)sl; + + slogic->gpd = newlibadr_us(fd, sc->id.lib, slogic->gpd); + } } } sc->id.flag -= LIB_NEEDLINK; @@ -5559,6 +5572,14 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene) */ sima->gpd = restore_pointer_by_name(newmain, (ID *)sima->gpd, 1); } + else if (sl->spacetype == SPACE_SEQ) { + SpaceSeq *sseq = (SpaceSeq *)sl; + + /* NOTE: pre-2.5, this was local data not lib data, but now we need this as lib data + * so assume that here we're doing for undo only... + */ + sseq->gpd = restore_pointer_by_name(newmain, (ID *)sseq->gpd, 1); + } else if (sl->spacetype == SPACE_NLA) { SpaceNla *snla = (SpaceNla *)sl; bDopeSheet *ads = snla->ads; @@ -5629,6 +5650,11 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene) sclip->scopes.ok = 0; } + else if (sl->spacetype == SPACE_LOGIC) { + SpaceLogic *slogic = (SpaceLogic *)sl; + + slogic->gpd = restore_pointer_by_name(newmain, (ID *)slogic->gpd, 1); + } } } } @@ -5869,7 +5895,8 @@ static void direct_link_screen(FileData *fd, bScreen *sc) } else if (sl->spacetype == SPACE_LOGIC) { SpaceLogic *slogic = (SpaceLogic *)sl; - + + /* XXX: this is new stuff, which shouldn't be directly linking to gpd... */ if (slogic->gpd) { slogic->gpd = newdataadr(fd, slogic->gpd); direct_link_gpencil(fd, slogic->gpd); |