Blender V2.61 - r43446
|
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stddef.h>
#include "DNA_anim_types.h"
#include "DNA_constraint_types.h"
#include "DNA_camera_types.h"
#include "DNA_lamp_types.h"
#include "DNA_ipo_types.h"
#include "DNA_key_types.h"
#include "DNA_material_types.h"
#include "DNA_nla_types.h"
#include "DNA_sequence_types.h"
#include "DNA_scene_types.h"
#include "DNA_world_types.h"
#include "DNA_object_types.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_dynstr.h"
#include "BLI_utildefines.h"
#include "BKE_ipo.h"
#include "BKE_animsys.h"
#include "BKE_action.h"
#include "BKE_fcurve.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_nla.h"
#include "BKE_sequencer.h"
#include "MEM_guardedalloc.h"
Go to the source code of this file.
Classes | |
struct | AdrBit2Path |
Defines | |
#define | DNA_DEPRECATED_ALLOW |
#define | RET_ABP(items) |
Typedefs | |
typedef struct AdrBit2Path | AdrBit2Path |
Functions | |
void | free_ipo (Ipo *ipo) |
static AdrBit2Path * | adrcode_bitmaps_to_paths (int blocktype, int adrcode, int *tot) |
static const char * | ob_adrcodes_to_paths (int adrcode, int *array_index) |
static const char * | pchan_adrcodes_to_paths (int adrcode, int *array_index) |
static const char * | constraint_adrcodes_to_paths (int adrcode, int *array_index) |
static char * | shapekey_adrcodes_to_paths (int adrcode, int *UNUSED(array_index)) |
static const char * | mtex_adrcodes_to_paths (int adrcode, int *UNUSED(array_index)) |
static const char * | texture_adrcodes_to_paths (int adrcode, int *array_index) |
static const char * | material_adrcodes_to_paths (int adrcode, int *array_index) |
static const char * | camera_adrcodes_to_paths (int adrcode, int *array_index) |
static const char * | lamp_adrcodes_to_paths (int adrcode, int *array_index) |
static const char * | sound_adrcodes_to_paths (int adrcode, int *array_index) |
static const char * | world_adrcodes_to_paths (int adrcode, int *array_index) |
static const char * | particle_adrcodes_to_paths (int adrcode, int *array_index) |
static char * | get_rna_access (int blocktype, int adrcode, char actname[], char constname[], Sequence *seq, int *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 (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) |
void | do_versions_ipos_to_animato (Main *main) |
Variables | |
static AdrBit2Path | ob_layer_bits [] |
static AdrBit2Path | ma_mode_bits [] |
Definition in file ipo.c.
#define RET_ABP | ( | items | ) |
{ \ *tot= sizeof(items)/sizeof(AdrBit2Path); \ return items; \ }
Definition at line 155 of file ipo.c.
Referenced by adrcode_bitmaps_to_paths().
typedef struct AdrBit2Path AdrBit2Path |
static void action_to_animato | ( | ID * | id, |
bAction * | act, | ||
ListBase * | groups, | ||
ListBase * | curves, | ||
ListBase * | drivers | ||
) | [static] |
Definition at line 1456 of file ipo.c.
References BLI_freelinkN(), BLI_freelistN(), bAction::chanbase, bActionChannel::constraintChannels, ListBase::first, bAction::groups, Ipo::id, bConstraintChannel::ipo, bActionChannel::ipo, ipo_to_animato(), bConstraintChannel::name, bActionChannel::name, bConstraintChannel::next, bActionChannel::next, NULL, and ID::us.
Referenced by action_to_animdata(), do_versions_ipos_to_animato(), and nlastrips_to_animdata().
Definition at line 1564 of file ipo.c.
References AnimData::action, action_to_animato(), BKE_animdata_from_id(), bAction::chanbase, bAction::curves, AnimData::drivers, ELEM, ListBase::first, G, G_DEBUG, bAction::groups, and NULL.
Referenced by do_versions_ipos_to_animato().
static AdrBit2Path* adrcode_bitmaps_to_paths | ( | int | blocktype, |
int | adrcode, | ||
int * | tot | ||
) | [static] |
static short adrcode_to_dtar_transchan | ( | short | adrcode | ) | [static] |
Definition at line 973 of file ipo.c.
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().
static const char* camera_adrcodes_to_paths | ( | int | adrcode, |
int * | array_index | ||
) | [static] |
Definition at line 572 of file ipo.c.
References CAM_END, CAM_LENS, CAM_ORTHO, CAM_SHIFT_X, CAM_SHIFT_Y, CAM_STA, CAM_YF_APERT, CAM_YF_FDIST, and NULL.
Referenced by get_rna_access().
static const char* constraint_adrcodes_to_paths | ( | int | adrcode, |
int * | array_index | ||
) | [static] |
Definition at line 304 of file ipo.c.
References CO_ENFORCE, CO_HEADTAIL, and NULL.
Referenced by get_rna_access().
void do_versions_ipos_to_animato | ( | Main * | main | ) |
Definition at line 1678 of file ipo.c.
References Main::action, AnimData::action, action_to_animato(), action_to_animdata(), add_empty_action(), IpoCurve::adrcode, BKE_animdata_from_id(), BKE_id_add_animdata(), BLI_freelinkN(), Ipo::blocktype, Main::camera, bAction::chanbase, bPose::chanbase, Object::constraints, bPoseChannel::constraints, Ipo::curve, Main::curve, bAction::curves, Scene::ed, ELEM, ListBase::first, ID::flag, Sequence::flag, free_fcurves(), G, G_DEBUG, bAction::groups, Curve::id, Lamp::id, Camera::id, Tex::id, World::id, Material::id, Key::id, Ipo::id, Object::id, ID_OB, ID_SCE, bAction::idroot, if(), Main::ipo, bConstraintChannel::ipo, ipo_to_animato(), ipo_to_animdata(), Main::key, Main::lamp, LIB_FAKEUSER, Main::mat, Sequence::name, bConstraintChannel::name, bConstraint::name, bPoseChannel::name, ID::name, bConstraintChannel::next, bConstraint::next, bPoseChannel::next, ID::next, nlastrips_to_animdata(), NULL, Main::object, Object::pose, Main::scene, SEQ_BEGIN, SEQ_COLOR, SEQ_END, SEQ_FAC1, SEQ_FAC_OPACITY, SEQ_FAC_SPEED, SEQ_IMAGE, SEQ_META, SEQ_MOVIE, SEQ_SCENE, SEQ_SPEED, SEQ_USE_EFFECT_DEFAULT_FADE, Editing::seqbasep, Main::tex, Sequence::type, ID::us, Main::versionfile, and Main::world.
Referenced by setup_app_data(), and StartKetsjiShell().
static void fcurve_add_to_list | ( | ListBase * | groups, |
ListBase * | list, | ||
FCurve * | fcu, | ||
char * | grpname, | ||
int | muteipo | ||
) | [static] |
Definition at line 1081 of file ipo.c.
References action_groups_add_channel(), action_groups_find_named(), AGRP_MUTED, AGRP_SELECTED, BLI_addtail(), BLI_strncpy(), BLI_uniquename(), bAction::curves, FCURVE_MUTED, ListBase::first, FCurve::flag, bActionGroup::flag, bAction::groups, ListBase::last, MEM_callocN(), bActionGroup::name, and NULL.
Referenced by icu_to_fcurves().
void free_ipo | ( | Ipo * | ipo | ) |
Definition at line 84 of file ipo.c.
References IpoCurve::bezt, BLI_freelinkN(), IpoCurve::bp, Ipo::curve, IpoCurve::driver, ListBase::first, G, G_DEBUG, Ipo::id, MEM_freeN(), ID::name, and IpoCurve::next.
Referenced by free_libblock(), and join_mesh_exec().
static char* get_rna_access | ( | int | blocktype, |
int | adrcode, | ||
char | actname[], | ||
char | constname[], | ||
Sequence * | seq, | ||
int * | array_index | ||
) | [static] |
Definition at line 803 of file ipo.c.
References BLI_dynstr_append(), BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_new(), BLI_snprintf(), camera_adrcodes_to_paths(), constraint_adrcodes_to_paths(), ID_CA, ID_CO, ID_CU, ID_KE, ID_LA, ID_MA, ID_OB, ID_PA, ID_PO, ID_SEQ, ID_SO, ID_TE, ID_WO, lamp_adrcodes_to_paths(), material_adrcodes_to_paths(), Sequence::name, NULL, ob_adrcodes_to_paths(), particle_adrcodes_to_paths(), pchan_adrcodes_to_paths(), SEQ_FAC1, SEQ_FAC_OPACITY, SEQ_FAC_SPEED, shapekey_adrcodes_to_paths(), sound_adrcodes_to_paths(), texture_adrcodes_to_paths(), and world_adrcodes_to_paths().
Referenced by icu_to_fcurves().
static void icu_to_fcurves | ( | ID * | id, |
ListBase * | groups, | ||
ListBase * | list, | ||
IpoCurve * | icu, | ||
char * | actname, | ||
char * | constname, | ||
Sequence * | seq, | ||
int | muteipo | ||
) | [static] |
Definition at line 1142 of file ipo.c.
References AC_EUL_X, AC_EUL_Y, AC_EUL_Z, add_fmodifier(), IpoCurve::adrcode, adrcode_bitmaps_to_paths(), FMod_Cycles::after_mode, AdrBit2Path::array_index, FCurve::array_index, FMod_Cycles::before_mode, IpoCurve::bezt, FCurve::bezt, BEZT_IPO_CONST, BEZT_KEYTYPE_KEYFRAME, AdrBit2Path::bit, BLI_strdup(), IpoCurve::blocktype, IpoCurve::bp, copy_fcurve(), FModifier::data, data, IpoCurve::driver, FCurve::driver, DTAR_TRANSCHAN_ROTX, DTAR_TRANSCHAN_ROTY, DTAR_TRANSCHAN_ROTZ, ELEM3, 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, Sequence::flag, FCurve::flag, IpoCurve::flag, FMODIFIER_TYPE_CYCLES, G, G_DEBUG, get_rna_access(), GS, BezTriple::h1, BezTriple::h2, HD_AUTO, HD_AUTO_ANIM, BezTriple::hide, i, ID_OB, ID_PO, idriver_to_cdriver(), if(), 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(), ID::name, NULL, OB_ROT_X, OB_ROT_Y, OB_ROT_Z, AdrBit2Path::path, Curve::pathlen, FCurve::rna_path, SEQ_IPO_FRAME_LOCKED, Sequence::startdisp, DriverVar::targets, IpoCurve::totvert, FCurve::totvert, DriverTarget::transChan, ChannelDriver::variables, and BezTriple::vec.
Referenced by ipo_to_animato().
static ChannelDriver* idriver_to_cdriver | ( | IpoDriver * | idriver | ) | [static] |
Definition at line 1003 of file ipo.c.
References IpoDriver::adrcode, adrcode_to_dtar_transchan(), BLI_strncpy(), 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, if(), IPO_DRIVER_TYPE_PYTHON, MEM_callocN(), IpoDriver::name, NULL, IpoDriver::ob, OB_ROT_DIFF, DriverTarget::pchan_name, DriverVar::targets, DriverTarget::transChan, IpoDriver::type, and ChannelDriver::type.
Referenced by icu_to_fcurves().
static void ipo_to_animato | ( | ID * | id, |
Ipo * | ipo, | ||
char | actname[], | ||
char | constname[], | ||
Sequence * | seq, | ||
ListBase * | animgroups, | ||
ListBase * | anim, | ||
ListBase * | drivers | ||
) | [static] |
Definition at line 1387 of file ipo.c.
References IpoCurve::bezt, BLI_freelinkN(), Ipo::blocktype, IpoCurve::bp, Ipo::curve, IpoCurve::driver, ELEM3, ListBase::first, G, G_DEBUG, icu_to_fcurves(), Ipo::id, ID_OB, ID_REAL_USERS, IPO_DRIVER_TYPE_PYTHON, MEM_freeN(), Ipo::muteipo, IpoCurve::next, NULL, IpoDriver::ob, IpoDriver::type, and ID::us.
Referenced by action_to_animato(), do_versions_ipos_to_animato(), and ipo_to_animdata().
static void ipo_to_animdata | ( | ID * | id, |
Ipo * | ipo, | ||
char | actname[], | ||
char | constname[], | ||
Sequence * | seq | ||
) | [static] |
Definition at line 1510 of file ipo.c.
References AnimData::action, add_empty_action(), BKE_animdata_from_id(), BLI_countlist(), BLI_movelisttolist(), BLI_snprintf(), Ipo::curve, bAction::curves, AnimData::drivers, ELEM, ListBase::first, G, G_DEBUG, Ipo::id, ipo_to_animato(), MAX_ID_NAME, Sequence::name, ID::name, and NULL.
Referenced by do_versions_ipos_to_animato().
static const char* lamp_adrcodes_to_paths | ( | int | adrcode, |
int * | array_index | ||
) | [static] |
Definition at line 612 of file ipo.c.
References LA_COL_B, LA_COL_G, LA_COL_R, LA_DIST, LA_ENERGY, LA_HALOINT, LA_QUAD1, LA_QUAD2, LA_SPOTBL, LA_SPOTSI, mtex_adrcodes_to_paths(), and NULL.
Referenced by get_rna_access().
static const char* material_adrcodes_to_paths | ( | int | adrcode, |
int * | array_index | ||
) | [static] |
Definition at line 488 of file ipo.c.
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, mtex_adrcodes_to_paths(), and NULL.
Referenced by get_rna_access().
static const char* mtex_adrcodes_to_paths | ( | int | adrcode, |
int * | UNUSEDarray_index | ||
) | [static] |
Definition at line 338 of file ipo.c.
References BLI_snprintf(), 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 NULL.
Referenced by lamp_adrcodes_to_paths(), material_adrcodes_to_paths(), and world_adrcodes_to_paths().
Definition at line 1590 of file ipo.c.
References bActionStrip::act, NlaStrip::act, bActionStrip::actend, NlaStrip::actend, action_to_animato(), NlaStrip::actstart, bActionStrip::actstart, ACTSTRIP_ACTIVE, ACTSTRIP_AUTO_BLENDS, ACTSTRIP_HOLDLASTFRAME, ACTSTRIP_LOCK_ACTION, ACTSTRIP_MUTE, ACTSTRIP_REVERSE, ACTSTRIP_SELECT, ACTSTRIPMODE_ADD, add_nlatrack(), BKE_animdata_from_id(), BKE_nlatrack_add_strip(), bActionStrip::blendin, NlaStrip::blendin, NlaStrip::blendmode, NlaStrip::blendout, bActionStrip::blendout, BLI_freelinkN(), BLI_freelistN(), bAction::curves, AnimData::drivers, bActionStrip::end, NlaStrip::end, NlaStrip::extendmode, ListBase::first, NlaStrip::flag, bActionStrip::flag, bAction::groups, MEM_callocN(), bActionStrip::mode, bActionStrip::modifiers, bActionStrip::next, 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, NULL, bActionStrip::repeat, NlaStrip::repeat, NlaStrip::scale, bActionStrip::scale, bActionStrip::start, NlaStrip::start, and io_export_cycles_xml::strip().
Referenced by do_versions_ipos_to_animato().
static const char* ob_adrcodes_to_paths | ( | int | adrcode, |
int * | array_index | ||
) | [static] |
Definition at line 179 of file ipo.c.
References NULL, 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().
static const char* particle_adrcodes_to_paths | ( | int | adrcode, |
int * | array_index | ||
) | [static] |
Definition at line 728 of file ipo.c.
References NULL, 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, and PART_SIZE.
Referenced by get_rna_access().
static const char* pchan_adrcodes_to_paths | ( | int | adrcode, |
int * | array_index | ||
) | [static] |
static char* shapekey_adrcodes_to_paths | ( | int | adrcode, |
int * | UNUSEDarray_index | ||
) | [static] |
static const char* sound_adrcodes_to_paths | ( | int | adrcode, |
int * | array_index | ||
) | [static] |
Definition at line 654 of file ipo.c.
References NULL, SND_ATTEN, SND_PITCH, and SND_VOLUME.
Referenced by get_rna_access().
static const char* texture_adrcodes_to_paths | ( | int | adrcode, |
int * | array_index | ||
) | [static] |
Definition at line 408 of file ipo.c.
References NULL, 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().
static const char* world_adrcodes_to_paths | ( | int | adrcode, |
int * | array_index | ||
) | [static] |
Definition at line 677 of file ipo.c.
References mtex_adrcodes_to_paths(), NULL, WO_EXPOS, WO_HOR_B, WO_HOR_G, WO_HOR_R, WO_MISI, WO_MISTDI, WO_MISTHI, WO_MISTSTA, WO_STAR_B, WO_STAR_G, WO_STAR_R, WO_STARDIST, WO_STARSIZE, WO_ZEN_B, WO_ZEN_G, and WO_ZEN_R.
Referenced by get_rna_access().
AdrBit2Path ma_mode_bits[] [static] |
{ {MA_RAYTRANSP, "transparency", 0}, {MA_RAYMIRROR, "raytrace_mirror.enabled", 0}, }
AdrBit2Path ob_layer_bits[] [static] |
{ {(1<<0), "layers", 0}, {(1<<1), "layers", 1}, {(1<<2), "layers", 2}, {(1<<3), "layers", 3}, {(1<<4), "layers", 4}, {(1<<5), "layers", 5}, {(1<<6), "layers", 6}, {(1<<7), "layers", 7}, {(1<<8), "layers", 8}, {(1<<9), "layers", 9}, {(1<<10), "layers", 10}, {(1<<11), "layers", 11}, {(1<<12), "layers", 12}, {(1<<13), "layers", 13}, {(1<<14), "layers", 14}, {(1<<15), "layers", 15}, {(1<<16), "layers", 16}, {(1<<17), "layers", 17}, {(1<<18), "layers", 18}, {(1<<19), "layers", 19} }