diff options
author | Ton Roosendaal <ton@blender.org> | 2009-02-20 19:18:37 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-02-20 19:18:37 +0300 |
commit | 236adb4ef3740a7b445c533d53e18213bb0bb345 (patch) | |
tree | 1d228004e7be3a37316208942833e964b0523a3a /source/blender/blenkernel/intern/ipo.c | |
parent | b4287608747ae3590061b7383f780de734f16c59 (diff) |
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.
Diffstat (limited to 'source/blender/blenkernel/intern/ipo.c')
-rw-r--r-- | source/blender/blenkernel/intern/ipo.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 103e2f7edac..440f83e6a4f 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -1190,8 +1190,13 @@ static void ipo_to_animato (Ipo *ipo, char actname[], char constname[], ListBase /* 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 @@ void do_versions_ipos_to_animato(Main *main) /* 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 |