diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-07-02 12:30:29 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-07-02 12:30:29 +0400 |
commit | ccf8c835ba5bb8aaaa044aff3dab5e8519f8fb36 (patch) | |
tree | 7f0e8c44d20bc9f6812be169b14d17c23a868659 /source/blender/blenloader | |
parent | 4a33d7f210ab4007d3c590548cae74708cee11fc (diff) |
Fix #31961: Grease Pencil in VSE don't save the data
Issue was caused by linking to grease pencil from direct_link* function
which lead to NULL GP data because it's being read a way later.
Link to GP data in lib_link* instead.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index cb87ee7eb14..836f723327e 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5909,11 +5909,20 @@ static void direct_link_screen(FileData *fd, bScreen *sc) } } else if (sl->spacetype == SPACE_SEQ) { + /* grease pencil data is not a direct data and can't be linked from direct_link* + * functions, it should be linked from lib_link* funcrions instead + * + * otherwise it'll lead to lost grease data on open because it'll likely be + * read from file after all other users of grease pencil and newdataadr would + * simple return NULL here (sergey) + */ +#if 0 SpaceSeq *sseq = (SpaceSeq *)sl; if (sseq->gpd) { sseq->gpd = newdataadr(fd, sseq->gpd); direct_link_gpencil(fd, sseq->gpd); } +#endif } else if (sl->spacetype == SPACE_BUTS) { SpaceButs *sbuts = (SpaceButs *)sl; |