|
Blender V4.5
|
Go to the source code of this file.
Functions | |
| void | do_versions_ipos_to_layered_actions (struct Main *bmain) |
| void do_versions_ipos_to_layered_actions | ( | struct Main * | bmain | ) |
Called from do_versions() in readfile.cc to convert the old IPO/adrcode system to the new Layered Action system.
Note: this only deals with animation data that is pre-Animato, and upgrades it all the way past Animato to modern Layered Actions and drivers. Actions that are already Animato actions are ignored, as they are versioned elsewhere (see animrig::versioning::convert_legacy_actions()). This is admittedly weird, but it's due to the fact that versioning pre-Animato data requires creating new datablocks, which must happen at a stage after the standard versioning where the simpler Animato-to-Layered upgrades are done.
The basic method used here, is to loop over data-blocks which have IPO-data, and add those IPO's to new AnimData blocks as Actions. Action/NLA data only works well for Objects, so these only need to be checked for there.
Data that has been converted should be freed immediately, which means that it is immediately clear which data-blocks have yet to be converted, and also prevent freeing errors when we exit.
Definition at line 2147 of file ipo.cc.
References AnimData::action, blender::animrig::versioning::action_is_layered(), action_to_animdata(), Main::actions, BKE_action_add(), BKE_animdata_ensure_id(), BKE_animdata_from_id(), BKE_fcurves_free(), BLI_freelinkN(), BLI_listbase_is_empty(), Ipo::blocktype, Main::cameras, bPose::chanbase, CLOG_ERROR, Object::constraints, blender::animrig::versioning::convert_legacy_animato_action(), Ipo::curve, bAction::curves, Main::curves, Scene::ed, ensure_action_is_layered(), ListBase::first, ID::flag, blender::seq::for_each_callback(), G, G_DEBUG, bAction::groups, Camera::id, Curve::id, Ipo::id, Key::id, Light::id, Material::id, Object::id, Tex::id, World::id, ID_FLAG_FAKEUSER, ID_OB, id_us_min(), bAction::idroot, bConstraintChannel::ipo, Main::ipo, ipo_to_animato(), ipo_to_animdata(), Main::lights, LISTBASE_FOREACH, LOG, Main::materials, bConstraintChannel::name, ID::name, bConstraintChannel::next, ID::next, nlastrips_to_animdata(), Main::objects, Object::pose, printf, Main::scenes, Main::shapekeys, strip_convert_callback(), blender::animrig::versioning::tag_action_user_for_slotted_actions_conversion(), Main::textures, ID::us, Main::versionfile, and Main::worlds.
Referenced by do_versions_after_setup().