[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19056] branches/blender2.5/blender/source /blender/blenkernel/intern: 2.5
Ton Roosendaal
ton at blender.org
Fri Feb 20 17:18:40 CET 2009
Revision: 19056
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19056
Author: ton
Date: 2009-02-20 17:18:37 +0100 (Fri, 20 Feb 2009)
Log Message:
-----------
2.5
Small fixes for animsys:
- Blender 2.4x allowed drivers to exist without object target, these
got converted resulting in error prints. Now they get skipped.
- Animdata struct was not created for objects with poses, but without
action/nla linked.
- An action-channel-constraint-ipo gets inserted in drivers differently
than a pose-bone-constraint-ipo. Not sure yet how... but it makes a
different depsgraph relation.
Error is of course in depsgraph, that'll get tackled. For correct
driver eval I've made 'object update ob' also been called for
the 'object update data' tag.
Modified Paths:
--------------
branches/blender2.5/blender/source/blender/blenkernel/intern/ipo.c
branches/blender2.5/blender/source/blender/blenkernel/intern/object.c
Modified: branches/blender2.5/blender/source/blender/blenkernel/intern/ipo.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenkernel/intern/ipo.c 2009-02-20 11:17:33 UTC (rev 19055)
+++ branches/blender2.5/blender/source/blender/blenkernel/intern/ipo.c 2009-02-20 16:18:37 UTC (rev 19056)
@@ -1190,8 +1190,13 @@
/* Since an IPO-Curve may end up being made into many F-Curves (i.e. bitflag curves),
* we figure out the best place to put the channel, then tell the curve-converter to just dump there
*/
- if (icu->driver)
- icu_to_fcurves(drivers, icu, actname, constname);
+ if (icu->driver) {
+ /* Blender 2.4x allowed empty drivers */
+ if(icu->driver->ob || icu->driver->type == IPO_DRIVER_TYPE_PYTHON)
+ icu_to_fcurves(drivers, icu, actname, constname);
+ else
+ MEM_freeN(icu->driver);
+ }
else
icu_to_fcurves(anim, icu, actname, constname);
@@ -1401,6 +1406,10 @@
/* check PoseChannels for constraints with local data */
if (ob->pose) {
+
+ /* Verify if there's AnimData block */
+ BKE_id_add_animdata(id);
+
for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
for (con= pchan->constraints.first; con; con= con->next) {
/* if constraint has own IPO, convert add these to Object
Modified: branches/blender2.5/blender/source/blender/blenkernel/intern/object.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenkernel/intern/object.c 2009-02-20 11:17:33 UTC (rev 19055)
+++ branches/blender2.5/blender/source/blender/blenkernel/intern/object.c 2009-02-20 16:18:37 UTC (rev 19056)
@@ -2268,7 +2268,9 @@
{
if(ob->recalc & OB_RECALC) {
- if(ob->recalc & OB_RECALC_OB) {
+ /* XXX new animsys warning: depsgraph tag OB_RECALC_DATA should not skip drivers,
+ which is only in where_is_object now */
+ if(ob->recalc & OB_RECALC) {
if (G.f & G_DEBUG)
printf("recalcob %s\n", ob->id.name+2);
More information about the Bf-blender-cvs
mailing list