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:
authorJoshua Leung <aligorith@gmail.com>2009-06-06 09:06:46 +0400
committerJoshua Leung <aligorith@gmail.com>2009-06-06 09:06:46 +0400
commit9621d626a0484d19e2c18e57cbdd5f9c24c827f4 (patch)
treea248a862adbfc095c25bf94d407631ea1afb1244 /source/blender/blenkernel/intern/nla.c
parent964d44e6bcbc4f01e12de0ba097654564df252ab (diff)
NLA SoC: Various user-counts and file IO bugfixes for tweaking actions...
Diffstat (limited to 'source/blender/blenkernel/intern/nla.c')
-rw-r--r--source/blender/blenkernel/intern/nla.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index d3a01b6d610..9acbad32a42 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -675,11 +675,12 @@ short BKE_nla_tweakmode_enter (AnimData *adt)
/* handle AnimData level changes:
* - 'real' active action to temp storage (no need to change user-counts)
- * - action of active strip set to be the 'active action'
+ * - action of active strip set to be the 'active action', and have its usercount incremented
* - editing-flag for this AnimData block should also get turned on (for more efficient restoring)
*/
adt->tmpact= adt->action;
adt->action= activeStrip->act;
+ id_us_plus(&activeStrip->act->id);
adt->flag |= ADT_NLA_EDIT_ON;
/* done! */
@@ -706,10 +707,12 @@ void BKE_nla_tweakmode_exit (AnimData *adt)
nlt->flag &= ~NLATRACK_DISABLED;
/* handle AnimData level changes:
+ * - 'temporary' active action needs its usercount decreased, since we're removing this reference
* - 'real' active action is restored from storage
* - storage pointer gets cleared (to avoid having bad notes hanging around)
* - editing-flag for this AnimData block should also get turned off
*/
+ if (adt->action) adt->action->id.us--;
adt->action= adt->tmpact;
adt->tmpact= NULL;
adt->flag &= ~ADT_NLA_EDIT_ON;