[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29957] trunk/blender/source/blender/ blenkernel/intern: Bugfix #19221: Layer animation not working
Joshua Leung
aligorith at gmail.com
Mon Jul 5 03:11:25 CEST 2010
Revision: 29957
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29957
Author: aligorith
Date: 2010-07-05 03:11:25 +0200 (Mon, 05 Jul 2010)
Log Message:
-----------
Bugfix #19221: Layer animation not working
Now object layers and scene-base layers are now always synced. In 2.4x, they were only synced if there was animation for layers, but it's probably not worth checking for this these days...
Finally we can close this bug report :)
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/ipo.c
trunk/blender/source/blender/blenkernel/intern/scene.c
Modified: trunk/blender/source/blender/blenkernel/intern/ipo.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/ipo.c 2010-07-05 01:04:52 UTC (rev 29956)
+++ trunk/blender/source/blender/blenkernel/intern/ipo.c 2010-07-05 01:11:25 UTC (rev 29957)
@@ -1068,7 +1068,7 @@
bActionGroup *agrp= NULL;
/* init the temp action */
- //memset(&tmp_act, 0, sizeof(bAction)); // XXX only enable this line if we get errors
+ memset(&tmp_act, 0, sizeof(bAction)); // XXX only enable this line if we get errors
tmp_act.groups.first= groups->first;
tmp_act.groups.last= groups->last;
tmp_act.curves.first= list->first;
@@ -1084,8 +1084,8 @@
agrp= MEM_callocN(sizeof(bActionGroup), "bActionGroup");
agrp->flag = AGRP_SELECTED;
- if(muteipo) agrp->flag |= AGRP_MUTED;
-
+ if (muteipo) agrp->flag |= AGRP_MUTED;
+
strncpy(agrp->name, grpname, sizeof(agrp->name));
BLI_addtail(&tmp_act.groups, agrp);
@@ -1097,9 +1097,9 @@
/* WARNING: this func should only need to look at the stuff we initialised, if not, things may crash */
action_groups_add_channel(&tmp_act, agrp, fcu);
- if(agrp->flag & AGRP_MUTED) /* flush down */
+ if (agrp->flag & AGRP_MUTED) /* flush down */
fcu->flag |= FCURVE_MUTED;
-
+
/* set the output lists based on the ones in the temp action */
groups->first= tmp_act.groups.first;
groups->last= tmp_act.groups.last;
@@ -1843,9 +1843,9 @@
Editing * ed = scene->ed;
if (ed && ed->seqbasep) {
Sequence * seq;
-
+
adt= BKE_id_add_animdata(id);
-
+
SEQ_BEGIN(ed, seq) {
IpoCurve *icu = (seq->ipo) ? seq->ipo->curve.first : NULL;
short adrcode = SEQ_FAC1;
@@ -1877,8 +1877,7 @@
icu->adrcode = adrcode;
/* convert IPO */
- ipo_to_animdata((ID *)scene, seq->ipo,
- NULL, NULL, seq);
+ ipo_to_animdata((ID *)scene, seq->ipo, NULL, NULL, seq);
seq->ipo->id.us--;
seq->ipo = NULL;
}
Modified: trunk/blender/source/blender/blenkernel/intern/scene.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/scene.c 2010-07-05 01:04:52 UTC (rev 29956)
+++ trunk/blender/source/blender/blenkernel/intern/scene.c 2010-07-05 01:11:25 UTC (rev 29957)
@@ -907,6 +907,9 @@
if(ob->dup_group && (ob->transflag & OB_DUPLIGROUP))
group_handle_recalc_and_update(scene_parent, ob, ob->dup_group);
+
+ /* always update layer, so that animating layers works */
+ base->lay= ob->lay;
}
}
More information about the Bf-blender-cvs
mailing list