|
Blender V4.3
|
#include <cmath>#include <cstddef>#include <cstdio>#include <cstring>#include "DNA_anim_types.h"#include "DNA_camera_types.h"#include "DNA_constraint_types.h"#include "DNA_ipo_types.h"#include "DNA_key_types.h"#include "DNA_light_types.h"#include "DNA_material_types.h"#include "DNA_nla_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "DNA_sequence_types.h"#include "DNA_world_types.h"#include "BLI_blenlib.h"#include "BLI_dynstr.h"#include "BLI_endian_switch.h"#include "BLI_string_utils.hh"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "BKE_action.hh"#include "BKE_anim_data.hh"#include "BKE_fcurve.hh"#include "BKE_fcurve_driver.h"#include "BKE_global.hh"#include "BKE_idtype.hh"#include "BKE_ipo.h"#include "BKE_key.hh"#include "BKE_lib_id.hh"#include "BKE_lib_query.hh"#include "BKE_main.hh"#include "BKE_nla.hh"#include "ANIM_action.hh"#include "CLG_log.h"#include "MEM_guardedalloc.h"#include "SEQ_iterator.hh"#include "BLO_read_write.hh"Go to the source code of this file.
Classes | |
| struct | AdrBit2Path |
| struct | Seq_callback_data |
Macros | |
| #define | DNA_DEPRECATED_ALLOW |
| #define | RET_ABP(items) |
Functions | |
| static void | ipo_free_data (ID *id) |
| static void | ipo_foreach_id (ID *id, LibraryForeachIDData *data) |
| static void | ipo_blend_read_data (BlendDataReader *reader, ID *id) |
| static AdrBit2Path * | adrcode_bitmaps_to_paths (int blocktype, int adrcode, int *tot) |
| static const char * | ob_adrcodes_to_paths (int adrcode, int *r_array_index) |
| static const char * | pchan_adrcodes_to_paths (int adrcode, int *r_array_index) |
| static const char * | constraint_adrcodes_to_paths (int adrcode, int *r_array_index) |
| static char * | shapekey_adrcodes_to_paths (ID *id, int adrcode, int *) |
| static const char * | mtex_adrcodes_to_paths (int adrcode, int *) |
| static const char * | texture_adrcodes_to_paths (int adrcode, int *r_array_index) |
| static const char * | material_adrcodes_to_paths (int adrcode, int *r_array_index) |
| static const char * | camera_adrcodes_to_paths (int adrcode, int *r_array_index) |
| static const char * | light_adrcodes_to_paths (int adrcode, int *r_array_index) |
| static const char * | sound_adrcodes_to_paths (int adrcode, int *r_array_index) |
| static const char * | world_adrcodes_to_paths (int adrcode, int *r_array_index) |
| static const char * | particle_adrcodes_to_paths (int adrcode, int *r_array_index) |
| static char * | get_rna_access (ID *id, int blocktype, int adrcode, const char actname[], const char constname[], Sequence *seq, int *r_array_index) |
| static short | adrcode_to_dtar_transchan (short adrcode) |
| static ChannelDriver * | idriver_to_cdriver (IpoDriver *idriver) |
| static void | fcurve_add_to_list (ListBase *groups, ListBase *list, FCurve *fcu, char *grpname, int muteipo) |
| static void | icu_to_fcurves (ID *id, ListBase *groups, ListBase *list, IpoCurve *icu, char *actname, char *constname, Sequence *seq, int muteipo) |
| static void | ipo_to_animato (ID *id, Ipo *ipo, char actname[], char constname[], Sequence *seq, ListBase *animgroups, ListBase *anim, ListBase *drivers) |
| static void | action_to_animato (ID *id, bAction *act, ListBase *groups, ListBase *curves, ListBase *drivers) |
| static void | ipo_to_animdata (Main *bmain, ID *id, Ipo *ipo, char actname[], char constname[], Sequence *seq) |
| static void | action_to_animdata (ID *id, bAction *act) |
| static void | nlastrips_to_animdata (ID *id, ListBase *strips) |
| static bool | seq_convert_callback (Sequence *seq, void *userdata) |
| void | do_versions_ipos_to_animato (Main *bmain) |
Variables | |
| static CLG_LogRef | LOG = {"bke.ipo"} |
| IDTypeInfo | IDType_ID_IP |
| static AdrBit2Path | ob_layer_bits [] |
| #define RET_ABP | ( | items | ) |
Definition at line 221 of file ipo.cc.
Referenced by adrcode_bitmaps_to_paths().
|
static |
Definition at line 1779 of file ipo.cc.
References BLI_assert_msg, BLI_freelinkN(), BLI_freelistN(), BLI_listbase_is_empty(), bActionChannel::constraintChannels, ListBase::first, bAction::groups, Ipo::id, id_us_min(), bActionChannel::ipo, bConstraintChannel::ipo, ipo_to_animato(), bActionChannel::name, bConstraintChannel::name, bActionChannel::next, and bConstraintChannel::next.
Referenced by action_to_animdata(), do_versions_ipos_to_animato(), and nlastrips_to_animdata().
Definition at line 1913 of file ipo.cc.
References AnimData::action, action_to_animato(), blender::animrig::assign_action(), BKE_animdata_from_id(), BLI_assert_msg, bAction::curves, AnimData::drivers, ELEM, G, G_DEBUG, bAction::groups, printf, and UNUSED_VARS_NDEBUG.
Referenced by do_versions_ipos_to_animato().
|
static |
Definition at line 229 of file ipo.cc.
References ID_OB, OB_LAY, ob_layer_bits, and RET_ABP.
Referenced by icu_to_fcurves().
|
static |
Definition at line 1218 of file ipo.cc.
References DTAR_TRANSCHAN_LOCX, DTAR_TRANSCHAN_LOCY, DTAR_TRANSCHAN_LOCZ, DTAR_TRANSCHAN_ROTX, DTAR_TRANSCHAN_ROTY, DTAR_TRANSCHAN_ROTZ, DTAR_TRANSCHAN_SCALEX, OB_LOC_X, OB_LOC_Y, OB_LOC_Z, OB_ROT_X, OB_ROT_Y, OB_ROT_Z, OB_SIZE_X, OB_SIZE_Y, and OB_SIZE_Z.
Referenced by idriver_to_cdriver().
Definition at line 769 of file ipo.cc.
References CAM_END, CAM_LENS, CAM_ORTHO, CAM_SHIFT_X, CAM_SHIFT_Y, CAM_STA, CAM_YF_APERT, and CAM_YF_FDIST.
Referenced by get_rna_access().
Definition at line 418 of file ipo.cc.
References CO_ENFORCE, and CO_HEADTAIL.
Referenced by get_rna_access().
| void do_versions_ipos_to_animato | ( | struct Main * | bmain | ) |
Called from do_versions() in readfile.cc to convert the old 'IPO/adrcode' system to the new 'Animato/RNA' system.
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 2091 of file ipo.cc.
References AnimData::action, action_to_animato(), action_to_animdata(), Main::actions, BKE_action_add(), BKE_animdata_ensure_id(), BKE_animdata_from_id(), BKE_fcurves_free(), BLI_freelinkN(), Ipo::blocktype, Main::cameras, bPose::chanbase, CLOG_ERROR, CLOG_WARN, Object::constraints, Ipo::curve, bAction::curves, Main::curves, ListBase::first, ID::flag, G, G_DEBUG, bAction::groups, Camera::id, Curve::id, Ipo::id, Key::id, Light::id, Material::id, Object::id, Tex::id, World::id, 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, bConstraintChannel::next, nlastrips_to_animdata(), Main::objects, Object::pose, printf, scene, Main::scenes, seq_convert_callback(), SEQ_for_each_callback(), Editing::seqbase, Editing::seqbasep, Main::shapekeys, Main::textures, ID::us, Main::versionfile, and Main::worlds.
Referenced by do_versions_after_setup().
|
static |
Definition at line 1330 of file ipo.cc.
References action_groups_add_channel(), AGRP_MUTED, AGRP_SELECTED, BKE_action_group_find_name(), BLI_addtail(), BLI_uniquename(), bAction::curves, DATA_, FCURVE_MUTED, ListBase::first, bActionGroup::flag, FCurve::flag, bAction::groups, ListBase::last, MEM_callocN, bActionGroup::name, offsetof, and STRNCPY.
Referenced by icu_to_fcurves().
|
static |
Definition at line 1026 of file ipo.cc.
References BLI_dynstr_append(), BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_new(), BLI_str_escape(), camera_adrcodes_to_paths(), CLOG_WARN, constraint_adrcodes_to_paths(), ID_CA, ID_CO, ID_CU_LEGACY, ID_KE, ID_LA, ID_MA, ID_OB, ID_PA, ID_PO, ID_SEQ, ID_SO, ID_TE, ID_WO, light_adrcodes_to_paths(), LOG, material_adrcodes_to_paths(), bActionChannel::name, bConstraint::name, Sequence::name, ob_adrcodes_to_paths(), particle_adrcodes_to_paths(), pchan_adrcodes_to_paths(), SEQ_FAC1, SEQ_FAC_OPACITY, SEQ_FAC_SPEED, shapekey_adrcodes_to_paths(), SNPRINTF, sound_adrcodes_to_paths(), STREQ, STRNCPY, texture_adrcodes_to_paths(), and world_adrcodes_to_paths().
Referenced by icu_to_fcurves().
|
static |
Convert IPO-Curve to F-Curve (including Driver data), and free any of the old data that is not relevant, BUT do not free the IPO-Curve itself...
| actname | name of Action-Channel (if applicable) that IPO-Curve's IPO-block belonged to. |
| constname | name of Constraint-Channel (if applicable) that IPO-Curve's IPO-block belonged to seq. |
| seq | sequencer-strip (if applicable) that IPO-Curve's IPO-block belonged to. |
Definition at line 1402 of file ipo.cc.
References AC_EUL_X, AC_EUL_Y, AC_EUL_Z, add_fmodifier(), IpoCurve::adrcode, adrcode_bitmaps_to_paths(), AdrBit2Path::array_index, FCurve::array_index, b, FCurve::bezt, IpoCurve::bezt, BEZT_IPO_CONST, BEZT_KEYTYPE_KEYFRAME, AdrBit2Path::bit, BKE_fcurve_copy(), BKE_fcurve_create(), BLI_strdup(), IpoCurve::blocktype, IpoCurve::bp, FModifier::data, FCurve::driver, IpoCurve::driver, DTAR_TRANSCHAN_ROTX, DTAR_TRANSCHAN_ROTY, DTAR_TRANSCHAN_ROTZ, ELEM, Sequence::enddisp, FCurve::extend, IpoCurve::extrap, FCM_EXTRAPOLATE_CYCLIC, FCM_EXTRAPOLATE_CYCLIC_OFFSET, FCURVE_ACTIVE, fcurve_add_to_list(), FCURVE_DISABLED, FCURVE_DISCRETE_VALUES, FCURVE_INT_VALUES, FCURVE_MUTED, FCURVE_PROTECTED, FCURVE_SELECTED, FCURVE_VISIBLE, ListBase::first, FCurve::flag, IpoCurve::flag, Sequence::flag, float, FMODIFIER_TYPE_CYCLES, G, G_DEBUG, get_rna_access(), GS, BezTriple::h1, BezTriple::h2, HD_AUTO, HD_AUTO_ANIM, BezTriple::hide, ID_CU_LEGACY, ID_OB, ID_PO, idriver_to_cdriver(), BezTriple::ipo, IpoCurve::ipo, IPO_ACTIVE, IPO_AUTO_HORIZ, IPO_CYCL, IPO_CYCLX, IPO_DIR, IPO_HORIZ, IPO_MIXED, IPO_MUTE, IPO_PROTECT, IPO_SELECT, IPO_VISIBLE, M_PI, MEM_callocN, FCurve::modifiers, mul(), OB_ROT_X, OB_ROT_Y, OB_ROT_Z, AdrBit2Path::path, Curve::pathlen, printf, FCurve::rna_path, SEQ_IPO_FRAME_LOCKED, Sequence::startdisp, STREQ, DriverVar::targets, FCurve::totvert, IpoCurve::totvert, DriverTarget::transChan, ChannelDriver::variables, and BezTriple::vec.
Referenced by ipo_to_animato().
|
static |
Definition at line 1248 of file ipo.cc.
References IpoDriver::adrcode, adrcode_to_dtar_transchan(), IpoDriver::blocktype, driver_add_new_variable(), driver_change_variable_type(), DRIVER_NAME_OFFS, DRIVER_TYPE_AVERAGE, DRIVER_TYPE_PYTHON, DTAR_FLAG_LOCALSPACE, DVAR_TYPE_ROT_DIFF, DVAR_TYPE_TRANSFORM_CHAN, ChannelDriver::expression, DriverTarget::flag, DriverTarget::id, ID_AR, ID_OB, DriverTarget::idtype, IPO_DRIVER_TYPE_PYTHON, MEM_callocN, IpoDriver::name, IpoDriver::ob, OB_ROT_DIFF, DriverTarget::pchan_name, STRNCPY, DriverVar::targets, DriverTarget::transChan, ChannelDriver::type, and IpoDriver::type.
Referenced by icu_to_fcurves().
|
static |
Definition at line 120 of file ipo.cc.
References BLI_endian_switch_int16(), BLO_read_requires_endian_switch(), BLO_read_struct, BLO_read_struct_array, BLO_read_struct_list, Ipo::blocktype, Ipo::curve, and LISTBASE_FOREACH.
|
static |
Definition at line 106 of file ipo.cc.
References BKE_LIB_FOREACHID_PROCESS_IDSUPER, BKE_lib_query_foreachid_process_flags_get(), Ipo::curve, flag, IDWALK_CB_NOP, IDWALK_DO_DEPRECATED_POINTERS, and LISTBASE_FOREACH.
|
static |
Definition at line 77 of file ipo.cc.
References IpoCurve::bezt, BLI_freelinkN(), IpoCurve::bp, Ipo::curve, IpoCurve::driver, ListBase::first, G, G_DEBUG, Ipo::id, MEM_freeN(), ID::name, IpoCurve::next, and printf.
|
static |
Definition at line 1691 of file ipo.cc.
References IpoCurve::bezt, BLI_freelinkN(), Ipo::blocktype, IpoCurve::bp, Ipo::curve, IpoCurve::driver, ELEM, ListBase::first, G, G_DEBUG, icu_to_fcurves(), Ipo::id, ID_OB, ID_REAL_USERS, id_us_min(), IPO_DRIVER_TYPE_PYTHON, LISTBASE_FOREACH, MEM_freeN(), Ipo::muteipo, IpoCurve::next, IpoDriver::ob, printf, STREQ, and IpoDriver::type.
Referenced by action_to_animato(), do_versions_ipos_to_animato(), and ipo_to_animdata().
|
static |
Definition at line 1842 of file ipo.cc.
References AnimData::action, blender::animrig::assign_action(), BKE_action_add(), BKE_animdata_from_id(), BLI_assert_msg, BLI_listbase_count(), BLI_movelisttolist(), CLOG_ERROR, Ipo::curve, bAction::curves, AnimData::drivers, ELEM, ListBase::first, G, G_DEBUG, bAction::id, Ipo::id, id_us_min(), ipo_to_animato(), LOG, MAX_ID_NAME, ID::name, Sequence::name, printf, SNPRINTF, and UNUSED_VARS_NDEBUG.
Referenced by do_versions_ipos_to_animato(), and seq_convert_callback().
Definition at line 814 of file ipo.cc.
References LA_COL_B, LA_COL_G, LA_COL_R, LA_DIST, LA_ENERGY, LA_HALOINT, LA_QUAD1, LA_QUAD2, LA_SPOTBL, LA_SPOTSI, and mtex_adrcodes_to_paths().
Referenced by get_rna_access().
Definition at line 676 of file ipo.cc.
References MA_ADD, MA_ALPHA, MA_AMB, MA_COL_B, MA_COL_G, MA_COL_R, MA_EMIT, MA_FRESMIR, MA_FRESMIRI, MA_FRESTRA, MA_FRESTRAI, MA_HARD, MA_HASIZE, MA_IOR, MA_MIR_B, MA_MIR_G, MA_MIR_R, MA_RAYM, MA_REF, MA_SPEC, MA_SPEC_B, MA_SPEC_G, MA_SPEC_R, MA_SPTR, MA_TRANSLU, and mtex_adrcodes_to_paths().
Referenced by get_rna_access().
Definition at line 469 of file ipo.cc.
References MA_MAP1, MA_MAP10, MA_MAP11, MA_MAP12, MA_MAP13, MA_MAP14, MA_MAP15, MA_MAP16, MA_MAP17, MA_MAP18, MA_MAP2, MA_MAP3, MA_MAP4, MA_MAP5, MA_MAP6, MA_MAP7, MA_MAP8, MA_MAP9, MAP_B, MAP_COLF, MAP_DISP, MAP_DVAR, MAP_G, MAP_NORF, MAP_OFS_X, MAP_OFS_Y, MAP_OFS_Z, MAP_R, MAP_SIZE_X, MAP_SIZE_Y, MAP_SIZE_Z, MAP_VARF, and SNPRINTF.
Referenced by light_adrcodes_to_paths(), material_adrcodes_to_paths(), and world_adrcodes_to_paths().
Definition at line 1944 of file ipo.cc.
References NlaStrip::act, NlaStrip::actend, action_to_animato(), NlaStrip::actstart, ACTSTRIP_ACTIVE, ACTSTRIP_AUTO_BLENDS, ACTSTRIP_HOLDLASTFRAME, ACTSTRIP_LOCK_ACTION, ACTSTRIP_MUTE, ACTSTRIP_REVERSE, ACTSTRIP_SELECT, ACTSTRIPMODE_ADD, BKE_animdata_from_id(), BKE_nlastrip_validate_name(), BKE_nlatrack_add_strip(), BKE_nlatrack_new_tail(), BKE_nlatrack_set_active(), NlaStrip::blendin, NlaStrip::blendmode, NlaStrip::blendout, BLI_freelinkN(), BLI_freelistN(), AnimData::drivers, NlaStrip::end, NlaStrip::extendmode, ListBase::first, NlaStrip::flag, MEM_callocN, bActionStrip::next, AnimData::nla_tracks, NLASTRIP_EXTEND_NOTHING, NLASTRIP_FLAG_ACTIVE, NLASTRIP_FLAG_AUTO_BLENDS, NLASTRIP_FLAG_MUTED, NLASTRIP_FLAG_REVERSE, NLASTRIP_FLAG_SELECT, NLASTRIP_FLAG_SYNC_LENGTH, NLASTRIP_MODE_ADD, NLASTRIP_MODE_REPLACE, NlaStrip::repeat, NlaStrip::scale, and NlaStrip::start.
Referenced by do_versions_ipos_to_animato().
Definition at line 246 of file ipo.cc.
References OB_COL_A, OB_COL_B, OB_COL_G, OB_COL_R, OB_DLOC_X, OB_DLOC_Y, OB_DLOC_Z, OB_DROT_X, OB_DROT_Y, OB_DROT_Z, OB_DSIZE_X, OB_DSIZE_Y, OB_DSIZE_Z, OB_LOC_X, OB_LOC_Y, OB_LOC_Z, OB_PD_FFALL, OB_PD_FMAXD, OB_PD_FSTR, OB_PD_PERM, OB_PD_RDAMP, OB_PD_SDAMP, OB_ROT_X, OB_ROT_Y, OB_ROT_Z, OB_SIZE_X, OB_SIZE_Y, and OB_SIZE_Z.
Referenced by get_rna_access().
Definition at line 931 of file ipo.cc.
References PART_AVE, PART_BB_TILT, PART_BROWN, PART_CLUMP, PART_DAMP, PART_DRAG, PART_GRAV_X, PART_GRAV_Y, PART_GRAV_Z, PART_KINK_AMP, PART_KINK_FREQ, PART_KINK_SHAPE, PART_LENGTH, PART_PD2_FFALL, PART_PD2_FMAXD, PART_PD2_FSTR, PART_PD_FFALL, PART_PD_FMAXD, PART_PD_FSTR, and PART_SIZE.
Referenced by get_rna_access().
|
static |
Definition at line 2045 of file ipo.cc.
References AnimData::action, IpoCurve::adrcode, Seq_callback_data::adt, Seq_callback_data::bmain, ELEM, Sequence::flag, G, G_DEBUG, ID_SCE, id_us_min(), bAction::idroot, ipo_to_animdata(), Sequence::name, printf, Seq_callback_data::scene, SEQ_FAC1, SEQ_FAC_OPACITY, SEQ_FAC_SPEED, SEQ_TYPE_COLOR, SEQ_TYPE_IMAGE, SEQ_TYPE_META, SEQ_TYPE_MOVIE, SEQ_TYPE_SCENE, SEQ_TYPE_SPEED, SEQ_USE_EFFECT_DEFAULT_FADE, and Sequence::type.
Referenced by do_versions_ipos_to_animato().
Definition at line 439 of file ipo.cc.
References BKE_keyblock_find_by_index(), BLI_str_escape(), KeyBlock::name, SNPRINTF, and STRNCPY.
Referenced by get_rna_access().
Definition at line 859 of file ipo.cc.
References SND_ATTEN, SND_PANNING, SND_PITCH, and SND_VOLUME.
Referenced by get_rna_access().
Definition at line 589 of file ipo.cc.
References TE_BRIGHT, TE_COL_B, TE_COL_G, TE_COL_R, TE_CONTRA, TE_DISTA, TE_ISCA, TE_MG_GAIN, TE_MG_LAC, TE_MG_OCT, TE_MG_OFF, TE_MG_TYP, TE_MGH, TE_N_BAS1, TE_N_BAS2, TE_NDEPTH, TE_NSIZE, TE_NTYPE, TE_TURB, TE_VN_COLT, TE_VN_DISTM, TE_VNMEXP, TE_VNW1, TE_VNW2, TE_VNW3, and TE_VNW4.
Referenced by get_rna_access().
Definition at line 885 of file ipo.cc.
References mtex_adrcodes_to_paths(), WO_EXPOS, WO_HOR_B, WO_HOR_G, WO_HOR_R, WO_MISI, WO_MISTDI, WO_MISTHI, WO_MISTSTA, WO_ZEN_B, WO_ZEN_G, and WO_ZEN_R.
Referenced by get_rna_access().
| IDTypeInfo IDType_ID_IP |
|
static |
Definition at line 73 of file ipo.cc.
Referenced by do_versions_ipos_to_animato(), get_rna_access(), ipo_to_animdata(), and pchan_adrcodes_to_paths().
|
static |
Definition at line 208 of file ipo.cc.
Referenced by adrcode_bitmaps_to_paths().