diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-11-05 03:09:45 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-11-05 03:09:45 +0300 |
commit | 52865a51408fba9c871caff82ca0acb71a37d2d7 (patch) | |
tree | 8b2902cd0f9405d7990e44ab11cbde19611c59c3 /source/blender/blenloader | |
parent | 8bbf27dfbd8c3831541653f14de4e8b0bdf83259 (diff) |
Bugfix #24535: File saved with NLA Strip in Tweakmode crashes on reload
Now the active strip doesn't just get cleared on fileload, but is relinked properly.
I had originally intended that files shouldn't be able to be saved with NLA data still in Tweakmode, but this turns out to be a bit more troublesome to get working as that would make undo keep popping out of this mode too.
Also reverting 32743 (bugfix for 24418), which was a hack around this.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 4f9954b4156..7861eb08ea4 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -1976,9 +1976,13 @@ static void direct_link_animdata(FileData *fd, AnimData *adt) link_list(fd, &adt->nla_tracks); direct_link_nladata(fd, &adt->nla_tracks); - /* clear temp pointers that may have been set... */ - // TODO: it's probably only a small cost to reload this anyway... - adt->actstrip= NULL; + /* relink active strip - even though strictly speaking this should only be used + * if we're in 'tweaking mode', we need to be able to have this loaded back for + * undo, but also since users may not exit tweakmode before saving (#24535) + */ + // TODO: it's not really nice that anyone should be able to save the file in this + // state, but it's going to be too hard to enforce this single case... + adt->actstrip= newdataadr(fd, adt->actstrip); } /* ************ READ MOTION PATHS *************** */ |