[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32875] trunk/blender/source/blender: Bugfix #24535: File saved with NLA Strip in Tweakmode crashes on reload
Joshua Leung
aligorith at gmail.com
Fri Nov 5 01:09:46 CET 2010
Revision: 32875
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32875
Author: aligorith
Date: 2010-11-05 01:09:45 +0100 (Fri, 05 Nov 2010)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/anim_sys.c
trunk/blender/source/blender/blenloader/intern/readfile.c
Modified: trunk/blender/source/blender/blenkernel/intern/anim_sys.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/anim_sys.c 2010-11-04 20:17:38 UTC (rev 32874)
+++ trunk/blender/source/blender/blenkernel/intern/anim_sys.c 2010-11-05 00:09:45 UTC (rev 32875)
@@ -1641,11 +1641,6 @@
if ((nlt) && !(adt->flag & ADT_NLA_EDIT_NOMAP)) {
/* edit active action in-place according to its active strip, so copy the data */
-
- /* this is cleared on undo */
- if(adt->actstrip == NULL) {
- adt->actstrip= BKE_nlastrip_find_active(nlt);
- }
memcpy(&dummy_strip, adt->actstrip, sizeof(NlaStrip));
dummy_strip.next = dummy_strip.prev = NULL;
}
Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c 2010-11-04 20:17:38 UTC (rev 32874)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c 2010-11-05 00:09:45 UTC (rev 32875)
@@ -1976,9 +1976,13 @@
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 *************** */
More information about the Bf-blender-cvs
mailing list