Blender V2.61 - r43446
|
#include <stdio.h>
#include <string.h>
#include <stddef.h>
#include <float.h>
#include <math.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_dynstr.h"
#include "BLI_utildefines.h"
#include "DNA_anim_types.h"
#include "DNA_lamp_types.h"
#include "DNA_material_types.h"
#include "DNA_scene_types.h"
#include "DNA_texture_types.h"
#include "DNA_world_types.h"
#include "BKE_animsys.h"
#include "BKE_action.h"
#include "BKE_depsgraph.h"
#include "BKE_fcurve.h"
#include "BKE_nla.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_library.h"
#include "BKE_report.h"
#include "BKE_utildefines.h"
#include "RNA_access.h"
#include "nla_private.h"
Go to the source code of this file.
Defines | |
#define | ANIMDATA_IDS_CB(first) |
#define | ANIMDATA_NODETREE_IDS_CB(first, NtId_Type) |
#define | RENAMEFIX_ANIM_IDS(first) |
#define | RENAMEFIX_ANIM_NODETREE_IDS(first, NtId_Type) |
#define | ANIMSYS_FLOAT_AS_BOOL(value) ((value) > ((1.0f-FLT_EPSILON))) |
#define | EVAL_ANIM_IDS(first, aflag) |
#define | EVAL_ANIM_NODETREE_IDS(first, NtId_Type, aflag) |
Functions | |
short | id_type_can_have_animdata (ID *id) |
AnimData * | BKE_animdata_from_id (ID *id) |
AnimData * | BKE_id_add_animdata (ID *id) |
short | BKE_animdata_set_action (ReportList *reports, ID *id, bAction *act) |
void | BKE_free_animdata (ID *id) |
AnimData * | BKE_copy_animdata (AnimData *adt, const short do_action) |
int | BKE_copy_animdata_id (ID *id_to, ID *id_from, const short do_action) |
void | BKE_copy_animdata_id_action (ID *id) |
static void | make_local_strips (ListBase *strips) |
void | BKE_animdata_make_local (AnimData *adt) |
void | BKE_relink_animdata (AnimData *adt) |
static short | animpath_matches_basepath (const char path[], const char basepath[]) |
void | action_move_fcurves_by_basepath (bAction *srcAct, bAction *dstAct, const char basepath[]) |
void | BKE_animdata_separate_by_basepath (ID *srcID, ID *dstID, ListBase *basepaths) |
static short | check_rna_path_is_valid (ID *owner_id, const char *path) |
static char * | rna_path_rename_fix (ID *owner_id, const char *prefix, const char *oldName, const char *newName, char *oldpath, int verify_paths) |
static void | fcurves_path_rename_fix (ID *owner_id, const char *prefix, char *oldName, char *newName, ListBase *curves, int verify_paths) |
static void | drivers_path_rename_fix (ID *owner_id, const char *prefix, const char *oldName, const char *newName, const char *oldKey, const char *newKey, ListBase *curves, int verify_paths) |
static void | nlastrips_path_rename_fix (ID *owner_id, const char *prefix, char *oldName, char *newName, ListBase *strips, int verify_paths) |
void | BKE_animdata_fix_paths_rename (ID *owner_id, AnimData *adt, const char *prefix, const char *oldName, const char *newName, int oldSubscript, int newSubscript, int verify_paths) |
void | BKE_animdata_main_cb (Main *mainptr, ID_AnimData_Edit_Callback func, void *user_data) |
void | BKE_all_animdata_fix_paths_rename (const char *prefix, const char *oldName, const char *newName) |
KS_Path * | BKE_keyingset_find_path (KeyingSet *ks, ID *id, const char group_name[], const char rna_path[], int array_index, int UNUSED(group_mode)) |
KeyingSet * | BKE_keyingset_add (ListBase *list, const char name[], short flag, short keyingflag) |
KS_Path * | BKE_keyingset_add_path (KeyingSet *ks, ID *id, const char group_name[], const char rna_path[], int array_index, short flag, short groupmode) |
void | BKE_keyingset_free_path (KeyingSet *ks, KS_Path *ksp) |
void | BKE_keyingsets_copy (ListBase *newlist, ListBase *list) |
void | BKE_keyingset_free (KeyingSet *ks) |
void | BKE_keyingsets_free (ListBase *list) |
static short | animsys_remap_path (AnimMapper *UNUSED(remap), char *path, char **dst) |
static short | animsys_write_rna_setting (PointerRNA *ptr, char *path, int array_index, float value) |
static short | animsys_execute_fcurve (PointerRNA *ptr, AnimMapper *remap, FCurve *fcu) |
static void | animsys_evaluate_fcurves (PointerRNA *ptr, ListBase *list, AnimMapper *remap, float ctime) |
static void | animsys_evaluate_drivers (PointerRNA *ptr, AnimData *adt, float ctime) |
static void | action_idcode_patch_check (ID *id, bAction *act) |
void | animsys_evaluate_action_group (PointerRNA *ptr, bAction *act, bActionGroup *agrp, AnimMapper *remap, float ctime) |
void | animsys_evaluate_action (PointerRNA *ptr, bAction *act, AnimMapper *remap, float ctime) |
static float | nlastrip_get_influence (NlaStrip *strip, float cframe) |
static void | nlastrip_evaluate_controls (NlaStrip *strip, float ctime) |
NlaEvalStrip * | nlastrips_ctime_get_strip (ListBase *list, ListBase *strips, short index, float ctime) |
static NlaEvalChannel * | nlaevalchan_find_match (ListBase *channels, PointerRNA *ptr, PropertyRNA *prop, int array_index) |
static NlaEvalChannel * | nlaevalchan_verify (PointerRNA *ptr, ListBase *channels, NlaEvalStrip *nes, FCurve *fcu, short *newChan) |
static void | nlaevalchan_accumulate (NlaEvalChannel *nec, NlaEvalStrip *nes, short newChan, float value) |
static void | nlaevalchan_buffers_accumulate (ListBase *channels, ListBase *tmp_buffer, NlaEvalStrip *nes) |
static void | nlaeval_fmodifiers_join_stacks (ListBase *result, ListBase *list1, ListBase *list2) |
static void | nlaeval_fmodifiers_split_stacks (ListBase *list1, ListBase *list2) |
static void | nlastrip_evaluate_actionclip (PointerRNA *ptr, ListBase *channels, ListBase *modifiers, NlaEvalStrip *nes) |
static void | nlastrip_evaluate_transition (PointerRNA *ptr, ListBase *channels, ListBase *modifiers, NlaEvalStrip *nes) |
static void | nlastrip_evaluate_meta (PointerRNA *ptr, ListBase *channels, ListBase *modifiers, NlaEvalStrip *nes) |
void | nlastrip_evaluate (PointerRNA *ptr, ListBase *channels, ListBase *modifiers, NlaEvalStrip *nes) |
void | nladata_flush_channels (ListBase *channels) |
static void | animsys_evaluate_nla (ListBase *echannels, PointerRNA *ptr, AnimData *adt, float ctime) |
static void | animsys_calculate_nla (PointerRNA *ptr, AnimData *adt, float ctime) |
static void | animsys_evaluate_overrides (PointerRNA *ptr, AnimData *adt) |
void | BKE_animsys_evaluate_animdata (Scene *scene, ID *id, AnimData *adt, float ctime, short recalc) |
void | BKE_animsys_evaluate_all_animation (Main *main, Scene *scene, float ctime) |
Definition in file anim_sys.c.
#define ANIMDATA_IDS_CB | ( | first | ) |
for (id= first; id; id= id->next) { \ AnimData *adt= BKE_animdata_from_id(id); \ if (adt) func(id, adt, user_data); \ }
Referenced by BKE_animdata_main_cb().
#define ANIMDATA_NODETREE_IDS_CB | ( | first, | |
NtId_Type | |||
) |
for (id= first; id; id= id->next) { \ AnimData *adt= BKE_animdata_from_id(id); \ NtId_Type *ntp= (NtId_Type *)id; \ if (ntp->nodetree) { \ AnimData *adt2= BKE_animdata_from_id((ID *)ntp); \ if (adt2) func(id, adt2, user_data); \ } \ if (adt) func(id, adt, user_data); \ }
Referenced by BKE_animdata_main_cb().
#define ANIMSYS_FLOAT_AS_BOOL | ( | value | ) | ((value) > ((1.0f-FLT_EPSILON))) |
Definition at line 1109 of file anim_sys.c.
Referenced by animsys_write_rna_setting(), and nladata_flush_channels().
#define EVAL_ANIM_IDS | ( | first, | |
aflag | |||
) |
for (id= first; id; id= id->next) { \ if (ID_REAL_USERS(id) > 0) { \ AnimData *adt= BKE_animdata_from_id(id); \ BKE_animsys_evaluate_animdata(scene, id, adt, ctime, aflag); \ } \ }
Referenced by BKE_animsys_evaluate_all_animation().
#define EVAL_ANIM_NODETREE_IDS | ( | first, | |
NtId_Type, | |||
aflag | |||
) |
for (id= first; id; id= id->next) { \ if (ID_REAL_USERS(id) > 0) { \ AnimData *adt= BKE_animdata_from_id(id); \ NtId_Type *ntp= (NtId_Type *)id; \ if (ntp->nodetree) { \ AnimData *adt2= BKE_animdata_from_id((ID *)ntp->nodetree); \ BKE_animsys_evaluate_animdata(scene, (ID *)ntp->nodetree, adt2, ctime, ADT_RECALC_ANIM); \ } \ BKE_animsys_evaluate_animdata(scene, id, adt, ctime, aflag); \ } \ }
Referenced by BKE_animsys_evaluate_all_animation().
#define RENAMEFIX_ANIM_IDS | ( | first | ) |
for (id= first; id; id= id->next) { \ AnimData *adt= BKE_animdata_from_id(id); \ BKE_animdata_fix_paths_rename(id, adt, prefix, oldName, newName, 0, 0, 1);\ }
Referenced by BKE_all_animdata_fix_paths_rename().
#define RENAMEFIX_ANIM_NODETREE_IDS | ( | first, | |
NtId_Type | |||
) |
for (id= first; id; id= id->next) { \ AnimData *adt= BKE_animdata_from_id(id); \ NtId_Type *ntp= (NtId_Type *)id; \ if (ntp->nodetree) { \ AnimData *adt2= BKE_animdata_from_id((ID *)ntp); \ BKE_animdata_fix_paths_rename((ID *)ntp, adt2, prefix, oldName, newName, 0, 0, 1);\ } \ BKE_animdata_fix_paths_rename(id, adt, prefix, oldName, newName, 0, 0, 1);\ }
Referenced by BKE_all_animdata_fix_paths_rename().
Definition at line 1300 of file anim_sys.c.
References ELEM, G, G_DEBUG, GS, bAction::id, bAction::idroot, ID::name, and NULL.
Referenced by animsys_evaluate_action(), animsys_evaluate_action_group(), and nlastrip_evaluate_actionclip().
Definition at line 394 of file anim_sys.c.
References action_groups_add_channel(), action_groups_add_new(), action_groups_clear_tempflags(), action_groups_find_named(), action_groups_remove_channel(), AGRP_TEMP, animpath_matches_basepath(), BLI_addtail(), BLI_freelinkN(), bActionGroup::channels, bAction::curves, ELEM3, ListBase::first, bActionGroup::flag, G, G_DEBUG, bAction::groups, FCurve::grp, bActionGroup::name, FCurve::next, bActionGroup::next, NULL, and FCurve::rna_path.
Referenced by BKE_animdata_separate_by_basepath().
static short animpath_matches_basepath | ( | const char | path[], |
const char | basepath[] | ||
) | [static] |
Definition at line 382 of file anim_sys.c.
Referenced by action_move_fcurves_by_basepath(), and BKE_animdata_separate_by_basepath().
static void animsys_calculate_nla | ( | PointerRNA * | ptr, |
AnimData * | adt, | ||
float | ctime | ||
) | [static] |
Definition at line 2092 of file anim_sys.c.
References animsys_evaluate_nla(), BLI_freelistN(), nladata_flush_channels(), and NULL.
Referenced by BKE_animsys_evaluate_animdata().
void animsys_evaluate_action | ( | PointerRNA * | ptr, |
bAction * | act, | ||
AnimMapper * | remap, | ||
float | ctime | ||
) |
Definition at line 1357 of file anim_sys.c.
References action_idcode_patch_check(), animsys_evaluate_fcurves(), bAction::curves, PointerRNA::data, PointerRNA::id, NULL, and AnimMapper::target.
Referenced by animsys_evaluate_nla(), BKE_animsys_evaluate_animdata(), BL_Action::Update(), and BL_ShapeActionActuator::Update().
void animsys_evaluate_action_group | ( | PointerRNA * | ptr, |
bAction * | act, | ||
bActionGroup * | agrp, | ||
AnimMapper * | remap, | ||
float | ctime | ||
) |
Definition at line 1330 of file anim_sys.c.
References action_idcode_patch_check(), AGRP_MUTED, animsys_execute_fcurve(), calculate_fcurve(), bActionGroup::channels, PointerRNA::data, ELEM, FCURVE_DISABLED, FCURVE_MUTED, ListBase::first, FCurve::flag, bActionGroup::flag, FCurve::grp, PointerRNA::id, FCurve::next, NULL, and AnimMapper::target.
Referenced by poselib_apply_pose(), and what_does_obaction().
static void animsys_evaluate_drivers | ( | PointerRNA * | ptr, |
AnimData * | adt, | ||
float | ctime | ||
) | [static] |
Definition at line 1260 of file anim_sys.c.
References animsys_execute_fcurve(), calculate_fcurve(), FCurve::driver, DRIVER_FLAG_INVALID, DRIVER_FLAG_RECALC, AnimData::drivers, FCURVE_DISABLED, FCURVE_MUTED, ListBase::first, FCurve::flag, ChannelDriver::flag, FCurve::next, and NULL.
Referenced by BKE_animsys_evaluate_animdata().
static void animsys_evaluate_fcurves | ( | PointerRNA * | ptr, |
ListBase * | list, | ||
AnimMapper * | remap, | ||
float | ctime | ||
) | [static] |
Definition at line 1237 of file anim_sys.c.
References AGRP_MUTED, animsys_execute_fcurve(), calculate_fcurve(), FCURVE_DISABLED, FCURVE_MUTED, ListBase::first, FCurve::flag, bActionGroup::flag, FCurve::grp, FCurve::next, and NULL.
Referenced by animsys_evaluate_action(), and nlastrip_evaluate_controls().
static void animsys_evaluate_nla | ( | ListBase * | echannels, |
PointerRNA * | ptr, | ||
AnimData * | adt, | ||
float | ctime | ||
) | [static] |
Definition at line 1999 of file anim_sys.c.
References NlaStrip::act, AnimData::act_blendmode, AnimData::act_extendmode, AnimData::act_influence, NlaStrip::actend, AnimData::action, NlaStrip::actstart, AnimData::actstrip, ADT_NLA_EDIT_NOMAP, ADT_NLA_EDIT_ON, ADT_NLA_SOLO_TRACK, animsys_evaluate_action(), NlaStrip::blendmode, BLI_freelistN(), calc_action_range(), NlaStrip::end, NlaStrip::extendmode, ListBase::first, AnimData::flag, NlaTrack::flag, NlaStrip::influence, IS_EQF, ListBase::last, NlaEvalStrip::next, NlaTrack::next, NlaStrip::next, AnimData::nla_tracks, nlastrip_evaluate(), nlastrips_ctime_get_strip(), NLATRACK_DISABLED, NLATRACK_MUTED, NLATRACK_SOLO, NULL, NlaStrip::prev, NlaStrip::remap, AnimData::remap, NlaStrip::start, NlaTrack::strips, and NlaEvalStrip::track.
Referenced by animsys_calculate_nla().
static void animsys_evaluate_overrides | ( | PointerRNA * | ptr, |
AnimData * | adt | ||
) | [static] |
Definition at line 2126 of file anim_sys.c.
References animsys_write_rna_setting(), AnimOverride::array_index, ListBase::first, AnimOverride::next, AnimData::overrides, AnimOverride::rna_path, and AnimOverride::value.
Referenced by BKE_animsys_evaluate_animdata().
static short animsys_execute_fcurve | ( | PointerRNA * | ptr, |
AnimMapper * | remap, | ||
FCurve * | fcu | ||
) | [static] |
Definition at line 1213 of file anim_sys.c.
References animsys_remap_path(), animsys_write_rna_setting(), FCurve::array_index, FCurve::curval, free_path(), MEM_freeN(), NULL, and FCurve::rna_path.
Referenced by animsys_evaluate_action_group(), animsys_evaluate_drivers(), and animsys_evaluate_fcurves().
static short animsys_remap_path | ( | AnimMapper * | UNUSEDremap, |
char * | path, | ||
char ** | dst | ||
) | [static] |
Definition at line 1094 of file anim_sys.c.
Referenced by animsys_execute_fcurve(), and nlaevalchan_verify().
static short animsys_write_rna_setting | ( | PointerRNA * | ptr, |
char * | path, | ||
int | array_index, | ||
float | value | ||
) | [static] |
Definition at line 1112 of file anim_sys.c.
References ANIMSYS_FLOAT_AS_BOOL, DAG_id_type_tag(), PointerRNA::data, G, G_DEBUG, GS, PointerRNA::id, LIB_ID_RECALC, ID::name, PROP_BOOLEAN, PROP_ENUM, PROP_FLOAT, PROP_INT, RNA_path_resolve(), RNA_PoseBone, RNA_property_animateable(), RNA_property_array_length(), RNA_property_boolean_set(), RNA_property_boolean_set_index(), RNA_property_enum_set(), RNA_property_float_set(), RNA_property_float_set_index(), RNA_property_int_set(), RNA_property_int_set_index(), RNA_property_type(), RNA_property_update_cache_add(), RNA_property_update_check(), and PointerRNA::type.
Referenced by animsys_evaluate_overrides(), and animsys_execute_fcurve().
void BKE_all_animdata_fix_paths_rename | ( | const char * | prefix, |
const char * | oldName, | ||
const char * | newName | ||
) |
Definition at line 811 of file anim_sys.c.
References Main::armature, Main::camera, Main::curve, ListBase::first, G, Main::key, Main::lamp, Main::latt, Main::mat, Main::mball, Main::mesh, Main::nodetree, Main::object, Main::particle, RENAMEFIX_ANIM_IDS, RENAMEFIX_ANIM_NODETREE_IDS, Main::scene, Main::speaker, Main::tex, and Main::world.
void BKE_animdata_fix_paths_rename | ( | ID * | owner_id, |
AnimData * | adt, | ||
const char * | prefix, | ||
const char * | oldName, | ||
const char * | newName, | ||
int | oldSubscript, | ||
int | newSubscript, | ||
int | verify_paths | ||
) |
Definition at line 694 of file anim_sys.c.
References AnimData::action, BLI_sprintfN(), bAction::curves, AnimData::drivers, drivers_path_rename_fix(), ELEM, fcurves_path_rename_fix(), ListBase::first, MEM_freeN(), NlaTrack::next, AnimData::nla_tracks, nlastrips_path_rename_fix(), NULL, NlaTrack::strips, and AnimData::tmpact.
Referenced by ED_armature_bone_rename(), seq_dupe_animdata(), and texture_slot_move().
Definition at line 106 of file anim_sys.c.
References IdAdtTemplate::adt, id_type_can_have_animdata(), and NULL.
Referenced by action_to_animdata(), ANIM_id_update(), ANIM_list_elem_update(), ANIM_remove_driver(), animfilter_block_data(), animrecord_check_state(), BKE_animdata_separate_by_basepath(), BKE_animdata_set_action(), BKE_copy_animdata_id(), BKE_copy_animdata_id_action(), build_dag_object(), ConvertMaterial(), curve_is_animated(), curve_rename_fcurves(), dag_object_time_update_flags(), delete_keyframe(), do_versions_ipos_to_animato(), draw_ghost_poses(), draw_ghost_poses_keys(), draw_ghost_poses_range(), draw_motion_path_instance(), ED_curve_updateAnimPaths(), editCurve_to_undoCurve(), id_copy_animdata(), id_data_find_fcurve(), id_frame_has_keyframe(), insert_keyframe(), ipo_to_animdata(), make_local_exec(), make_local_makelocalmaterial(), make_new_animlistelem(), mouse_nla_channels(), nlastrips_to_animdata(), ntreeLocalize(), object_handle_update(), pyrna_struct_driver_add(), rna_get_fcurve(), scene_update_drivers(), scene_update_tagged(), seq_render_strip_stack(), texture_slot_move(), undoCurve_to_editCurve(), verify_adt_action(), and verify_driver_fcurve().
void BKE_animdata_main_cb | ( | Main * | mainptr, |
ID_AnimData_Edit_Callback | func, | ||
void * | user_data | ||
) |
Definition at line 734 of file anim_sys.c.
References ANIMDATA_IDS_CB, ANIMDATA_NODETREE_IDS_CB, Main::armature, Main::camera, Main::curve, ListBase::first, Main::key, Main::lamp, Main::latt, Main::mat, Main::mball, Main::mesh, Main::nodetree, Main::object, Main::particle, Main::scene, Main::speaker, Main::tex, and Main::world.
Referenced by free_libblock(), and make_local_action().
void BKE_animdata_make_local | ( | AnimData * | adt | ) |
Definition at line 323 of file anim_sys.c.
References AnimData::action, ListBase::first, make_local_action(), make_local_strips(), NlaTrack::next, AnimData::nla_tracks, AnimData::remap, NlaTrack::strips, AnimMapper::target, and AnimData::tmpact.
Referenced by make_local_exec(), and make_local_makelocalmaterial().
Definition at line 474 of file anim_sys.c.
References AnimData::action, action_move_fcurves_by_basepath(), add_empty_action(), animpath_matches_basepath(), BKE_animdata_from_id(), BKE_id_add_animdata(), BLI_addtail(), BLI_remlink(), LinkData::data, AnimData::drivers, ELEM, ListBase::first, G, G_DEBUG, bAction::id, id_us_min(), if(), ID::name, FCurve::next, LinkData::next, NULL, and FCurve::rna_path.
Referenced by node_group_make_from_selected(), and node_group_ungroup().
short BKE_animdata_set_action | ( | ReportList * | reports, |
ID * | id, | ||
bAction * | act | ||
) |
Definition at line 153 of file anim_sys.c.
References AnimData::action, AnimData::actstrip, ADT_NLA_EDIT_ON, BKE_animdata_from_id(), BKE_report(), BKE_reportf(), ELEM, AnimData::flag, GS, bAction::id, id_us_min(), id_us_plus(), bAction::idroot, ID::name, NULL, RPT_ERROR, RPT_WARNING, and AnimData::tmpact.
Referenced by actionset_id_cb(), unlink_action_cb(), and unlinkact_animdata_cb().
Definition at line 2246 of file anim_sys.c.
References Main::action, ADT_RECALC_ANIM, Main::armature, Main::camera, Main::curve, EVAL_ANIM_IDS, EVAL_ANIM_NODETREE_IDS, ListBase::first, G, G_DEBUG, Main::key, Main::lamp, Main::latt, Main::mat, Main::mball, Main::mesh, Main::nodetree, NULL, Main::object, Main::particle, Main::scene, Main::speaker, Main::tex, and Main::world.
Referenced by do_render_seq(), scene_update_for_newframe(), and seq_render_strip().
void BKE_animsys_evaluate_animdata | ( | Scene * | scene, |
ID * | id, | ||
AnimData * | adt, | ||
float | ctime, | ||
short | recalc | ||
) |
Definition at line 2175 of file anim_sys.c.
References AnimData::action, ADT_NLA_EVAL_OFF, ADT_RECALC_ANIM, ADT_RECALC_DRIVERS, animsys_calculate_nla(), animsys_evaluate_action(), animsys_evaluate_drivers(), animsys_evaluate_overrides(), ELEM, ListBase::first, AnimData::flag, G, AnimData::nla_tracks, NULL, AnimData::recalc, AnimData::remap, RNA_id_pointer_create(), RNA_property_update_cache_flush(), and RNA_property_update_cache_free().
Referenced by AnimationExporter::create_4x4_source(), do_ob_key(), draw_ghost_poses(), draw_ghost_poses_keys(), draw_ghost_poses_range(), dynamicPaint_doStep(), BL_ShapeDeformer::ExecuteShapeDrivers(), frames_duplilist(), object_handle_update(), ocean_bake_exec(), particle_system_update(), pose_clear_user_transforms_exec(), RE_init_sample_material(), reset_particle(), AnimationExporter::sample_animation(), scene_update_drivers(), scene_update_tagged(), seq_render_strip_stack(), subframe_updateObject(), what_does_obaction(), and where_is_object_time().
Definition at line 243 of file anim_sys.c.
References AnimData::action, copy_action(), copy_fcurves(), copy_nladata(), AnimData::drivers, ListBase::first, id_us_plus(), ListBase::last, MEM_dupallocN(), AnimData::nla_tracks, NULL, AnimData::overrides, and AnimData::tmpact.
Referenced by BKE_copy_animdata_id(), and id_copy_animdata().
Definition at line 275 of file anim_sys.c.
References IdAdtTemplate::adt, BKE_animdata_from_id(), BKE_copy_animdata(), BKE_free_animdata(), GS, and ID::name.
Referenced by make_links_data_exec().
void BKE_copy_animdata_id_action | ( | ID * | id | ) |
Definition at line 293 of file anim_sys.c.
References AnimData::action, BKE_animdata_from_id(), copy_action(), id_us_min(), and AnimData::tmpact.
Referenced by copy_scene(), do_single_tex_user(), id_single_user(), object_add_duplicate_internal(), single_mat_users(), single_obdata_users(), and single_object_action_users().
void BKE_free_animdata | ( | ID * | id | ) |
Definition at line 206 of file anim_sys.c.
References AnimData::action, IdAdtTemplate::adt, AnimData::drivers, free_fcurves(), free_nladata(), bAction::id, id_type_can_have_animdata(), MEM_freeN(), AnimData::nla_tracks, NULL, AnimData::tmpact, and ID::us.
Referenced by BKE_copy_animdata_id(), free_armature(), free_camera(), free_curve(), free_key(), free_lamp(), free_lattice(), free_material(), free_mball(), free_mesh(), free_object(), free_scene(), free_speaker(), free_texture(), free_world(), make_object_duplilist_real(), ntreeFreeTree(), and psys_free_settings().
Definition at line 124 of file anim_sys.c.
References AnimData::act_influence, IdAdtTemplate::adt, id_type_can_have_animdata(), MEM_callocN(), and NULL.
Referenced by BKE_animdata_separate_by_basepath(), do_versions_ipos_to_animato(), object_copy_proxy_drivers(), object_speaker_add_exec(), verify_adt_action(), verify_driver_fcurve(), and KX_BlenderSceneConverter::WritePhysicsObjectToAnimationIpo().
KeyingSet* BKE_keyingset_add | ( | ListBase * | list, |
const char | name[], | ||
short | flag, | ||
short | keyingflag | ||
) | [read] |
Definition at line 937 of file anim_sys.c.
References BLI_addtail(), BLI_strncpy(), BLI_uniquename(), KeyingSet::flag, KeyingSet::keyingflag, MEM_callocN(), and KeyingSet::name.
Referenced by add_default_keyingset_exec(), add_keyingset_button_exec(), ANIM_keyingset_info_register(), and verify_active_keyingset().
KS_Path* BKE_keyingset_add_path | ( | KeyingSet * | ks, |
ID * | id, | ||
const char | group_name[], | ||
const char | rna_path[], | ||
int | array_index, | ||
short | flag, | ||
short | groupmode | ||
) | [read] |
Definition at line 962 of file anim_sys.c.
References KS_Path::array_index, BKE_keyingset_find_path(), BLI_addtail(), BLI_strdupn(), BLI_strncpy(), ELEM, KS_Path::flag, G, G_DEBUG, KS_Path::group, KS_Path::groupmode, GS, KS_Path::id, KS_Path::idtype, MEM_callocN(), ID::name, NULL, KeyingSet::paths, KS_Path::rna_path, and strlen().
Referenced by add_keyingset_button_exec(), and do_outliner_keyingset_editop().
KS_Path* BKE_keyingset_find_path | ( | KeyingSet * | ks, |
ID * | id, | ||
const char | group_name[], | ||
const char | rna_path[], | ||
int | array_index, | ||
int | UNUSEDgroup_mode | ||
) |
Definition at line 894 of file anim_sys.c.
References KS_Path::array_index, ELEM3, ListBase::first, KS_Path::id, KS_Path::next, NULL, KeyingSet::paths, and KS_Path::rna_path.
void BKE_keyingset_free | ( | KeyingSet * | ks | ) |
Definition at line 1049 of file anim_sys.c.
References BKE_keyingset_free_path(), ListBase::first, KS_Path::next, NULL, and KeyingSet::paths.
Referenced by ANIM_keyingset_info_unregister(), ANIM_validate_keyingset(), BKE_keyingsets_free(), and remove_active_keyingset_exec().
Definition at line 1016 of file anim_sys.c.
References BLI_freelinkN(), ELEM, MEM_freeN(), NULL, KeyingSet::paths, and KS_Path::rna_path.
Referenced by BKE_keyingset_free(), do_outliner_keyingset_editop(), remove_active_ks_path_exec(), and remove_keyingset_button_exec().
Definition at line 1031 of file anim_sys.c.
References BLI_duplicatelist(), ListBase::first, MEM_dupallocN(), KeyingSet::next, KS_Path::next, KeyingSet::paths, and KS_Path::rna_path.
Referenced by copy_scene().
void BKE_keyingsets_free | ( | ListBase * | list | ) |
Definition at line 1065 of file anim_sys.c.
References BKE_keyingset_free(), BLI_freelinkN(), ListBase::first, KeyingSet::next, and NULL.
Referenced by ANIM_keyingset_infos_exit(), and free_scene().
void BKE_relink_animdata | ( | AnimData * | adt | ) |
Definition at line 345 of file anim_sys.c.
References FCurve::driver, DRIVER_TARGETS_LOOPER_END, DRIVER_TARGETS_USED_LOOPER, AnimData::drivers, ListBase::first, FCurve::next, DriverVar::next, NULL, and ChannelDriver::variables.
Referenced by object_relink().
static short check_rna_path_is_valid | ( | ID * | owner_id, |
const char * | path | ||
) | [static] |
Definition at line 548 of file anim_sys.c.
References NULL, RNA_id_pointer_create(), and RNA_path_resolve().
Referenced by rna_path_rename_fix().
static void drivers_path_rename_fix | ( | ID * | owner_id, |
const char * | prefix, | ||
const char * | oldName, | ||
const char * | newName, | ||
const char * | oldKey, | ||
const char * | newKey, | ||
ListBase * | curves, | ||
int | verify_paths | ||
) | [static] |
Definition at line 634 of file anim_sys.c.
References BLI_strncpy(), FCurve::driver, DRIVER_TARGETS_LOOPER_END, DRIVER_TARGETS_USED_LOOPER, ListBase::first, GS, ID_OB, FCurve::next, DriverVar::next, FCurve::rna_path, rna_path_rename_fix(), and ChannelDriver::variables.
Referenced by BKE_animdata_fix_paths_rename().
static void fcurves_path_rename_fix | ( | ID * | owner_id, |
const char * | prefix, | ||
char * | oldName, | ||
char * | newName, | ||
ListBase * | curves, | ||
int | verify_paths | ||
) | [static] |
Definition at line 621 of file anim_sys.c.
References ListBase::first, FCurve::next, FCurve::rna_path, and rna_path_rename_fix().
Referenced by BKE_animdata_fix_paths_rename(), and nlastrips_path_rename_fix().
short id_type_can_have_animdata | ( | ID * | id | ) |
Definition at line 73 of file anim_sys.c.
References GS, ID_AR, ID_CA, ID_CU, ID_KE, ID_LA, ID_LT, ID_MA, ID_MB, ID_ME, ID_NT, ID_OB, ID_PA, ID_SCE, ID_SPK, ID_TE, ID_WO, ID::name, and NULL.
Referenced by BKE_animdata_from_id(), BKE_free_animdata(), BKE_id_add_animdata(), and RNA_property_animateable().
static void make_local_strips | ( | ListBase * | strips | ) | [static] |
Definition at line 310 of file anim_sys.c.
References NlaStrip::act, ListBase::first, make_local_action(), NlaStrip::next, NlaStrip::remap, io_export_cycles_xml::strip(), NlaStrip::strips, and AnimMapper::target.
Referenced by BKE_animdata_make_local().
void nladata_flush_channels | ( | ListBase * | channels | ) |
Definition at line 1947 of file anim_sys.c.
References ANIMSYS_FLOAT_AS_BOOL, ListBase::first, NlaEvalChannel::index, NlaEvalChannel::next, NULL, NlaEvalChannel::prop, PROP_BOOLEAN, PROP_ENUM, PROP_FLOAT, PROP_INT, NlaEvalChannel::ptr, RNA_property_array_length(), RNA_property_boolean_set(), RNA_property_boolean_set_index(), RNA_property_enum_set(), RNA_property_float_set(), RNA_property_float_set_index(), RNA_property_int_set(), RNA_property_int_set_index(), RNA_property_type(), and NlaEvalChannel::value.
Referenced by animsys_calculate_nla().
static void nlaeval_fmodifiers_join_stacks | ( | ListBase * | result, |
ListBase * | list1, | ||
ListBase * | list2 | ||
) | [static] |
Definition at line 1703 of file anim_sys.c.
References ELEM, ListBase::first, ListBase::last, NULL, and FModifier::prev.
Referenced by nlastrip_evaluate_actionclip(), nlastrip_evaluate_meta(), and nlastrip_evaluate_transition().
Definition at line 1735 of file anim_sys.c.
References ELEM, ListBase::first, ListBase::last, NULL, and FModifier::prev.
Referenced by nlastrip_evaluate_actionclip(), nlastrip_evaluate_meta(), and nlastrip_evaluate_transition().
static void nlaevalchan_accumulate | ( | NlaEvalChannel * | nec, |
NlaEvalStrip * | nes, | ||
short | newChan, | ||
float | value | ||
) | [static] |
Definition at line 1617 of file anim_sys.c.
References NlaStrip::blendmode, NlaStrip::influence, IS_EQ, NES_TIME_TRANSITION_END, NLASTRIP_MODE_ADD, NLASTRIP_MODE_MULTIPLY, NLASTRIP_MODE_REPLACE, NLASTRIP_MODE_SUBTRACT, NlaEvalStrip::strip, io_export_cycles_xml::strip(), NlaEvalStrip::strip_mode, NlaEvalStrip::strip_time, and NlaEvalChannel::value.
Referenced by nlaevalchan_buffers_accumulate(), and nlastrip_evaluate_actionclip().
static void nlaevalchan_buffers_accumulate | ( | ListBase * | channels, |
ListBase * | tmp_buffer, | ||
NlaEvalStrip * | nes | ||
) | [static] |
Definition at line 1668 of file anim_sys.c.
References BLI_addtail(), BLI_freelistN(), BLI_remlink(), ListBase::first, NlaEvalChannel::index, NlaEvalChannel::next, nlaevalchan_accumulate(), nlaevalchan_find_match(), NULL, NlaEvalChannel::prop, NlaEvalChannel::ptr, and NlaEvalChannel::value.
Referenced by nlastrip_evaluate_meta(), and nlastrip_evaluate_transition().
static NlaEvalChannel* nlaevalchan_find_match | ( | ListBase * | channels, |
PointerRNA * | ptr, | ||
PropertyRNA * | prop, | ||
int | array_index | ||
) | [static] |
Definition at line 1544 of file anim_sys.c.
References PointerRNA::data, ListBase::first, NlaEvalChannel::index, NlaEvalChannel::next, NULL, NlaEvalChannel::prop, and NlaEvalChannel::ptr.
Referenced by nlaevalchan_buffers_accumulate(), and nlaevalchan_verify().
static NlaEvalChannel* nlaevalchan_verify | ( | PointerRNA * | ptr, |
ListBase * | channels, | ||
NlaEvalStrip * | nes, | ||
FCurve * | fcu, | ||
short * | newChan | ||
) | [static] |
Definition at line 1568 of file anim_sys.c.
References animsys_remap_path(), FCurve::array_index, BLI_addtail(), G, G_DEBUG, NlaEvalChannel::index, MEM_callocN(), nlaevalchan_find_match(), NULL, NlaEvalChannel::prop, NlaEvalChannel::ptr, NlaStrip::remap, FCurve::rna_path, RNA_path_resolve(), RNA_property_animateable(), NlaEvalStrip::strip, and io_export_cycles_xml::strip().
Referenced by nlastrip_evaluate_actionclip().
void nlastrip_evaluate | ( | PointerRNA * | ptr, |
ListBase * | channels, | ||
ListBase * | modifiers, | ||
NlaEvalStrip * | nes | ||
) |
Definition at line 1914 of file anim_sys.c.
References NlaStrip::flag, nlastrip_evaluate_actionclip(), nlastrip_evaluate_meta(), nlastrip_evaluate_transition(), NLASTRIP_FLAG_EDIT_TOUCHED, NLASTRIP_TYPE_CLIP, NLASTRIP_TYPE_META, NLASTRIP_TYPE_TRANSITION, NlaEvalStrip::strip, io_export_cycles_xml::strip(), and NlaStrip::type.
Referenced by animsys_evaluate_nla(), nlastrip_evaluate_meta(), and nlastrip_evaluate_transition().
static void nlastrip_evaluate_actionclip | ( | PointerRNA * | ptr, |
ListBase * | channels, | ||
ListBase * | modifiers, | ||
NlaEvalStrip * | nes | ||
) | [static] |
Definition at line 1757 of file anim_sys.c.
References NlaStrip::act, action_idcode_patch_check(), AGRP_MUTED, bAction::curves, PointerRNA::data, evaluate_fcurve(), evaluate_time_fmodifiers(), evaluate_value_fmodifiers(), FCURVE_DISABLED, FCURVE_MUTED, ListBase::first, FCurve::flag, bActionGroup::flag, FCurve::grp, PointerRNA::id, NlaStrip::modifiers, NlaStrip::name, FCurve::next, nlaeval_fmodifiers_join_stacks(), nlaeval_fmodifiers_split_stacks(), nlaevalchan_accumulate(), nlaevalchan_verify(), NULL, NlaEvalStrip::strip, io_export_cycles_xml::strip(), and NlaStrip::strip_time.
Referenced by nlastrip_evaluate().
static void nlastrip_evaluate_controls | ( | NlaStrip * | strip, |
float | ctime | ||
) | [static] |
Definition at line 1395 of file anim_sys.c.
References NlaStrip::actend, NlaStrip::actstart, animsys_evaluate_fcurves(), NlaStrip::fcurves, ListBase::first, NlaStrip::flag, NlaStrip::influence, NLASTRIP_FLAG_USR_INFLUENCE, NLASTRIP_FLAG_USR_TIME, NLASTRIP_FLAG_USR_TIME_CYCLIC, nlastrip_get_frame(), nlastrip_get_influence(), NLATIME_CONVERT_EVAL, NULL, RNA_NlaStrip, RNA_pointer_create(), and NlaStrip::strip_time.
Referenced by nlastrips_ctime_get_strip().
static void nlastrip_evaluate_meta | ( | PointerRNA * | ptr, |
ListBase * | channels, | ||
ListBase * | modifiers, | ||
NlaEvalStrip * | nes | ||
) | [static] |
Definition at line 1873 of file anim_sys.c.
References NlaStrip::end, MEM_freeN(), NlaStrip::modifiers, nlaeval_fmodifiers_join_stacks(), nlaeval_fmodifiers_split_stacks(), nlaevalchan_buffers_accumulate(), nlastrip_evaluate(), nlastrips_ctime_get_strip(), NULL, NlaStrip::start, NlaEvalStrip::strip, io_export_cycles_xml::strip(), NlaEvalStrip::strip_time, and NlaStrip::strips.
Referenced by nlastrip_evaluate().
static void nlastrip_evaluate_transition | ( | PointerRNA * | ptr, |
ListBase * | channels, | ||
ListBase * | modifiers, | ||
NlaEvalStrip * | nes | ||
) | [static] |
Definition at line 1817 of file anim_sys.c.
References NlaStrip::flag, NlaStrip::modifiers, NES_TIME_TRANSITION_END, NES_TIME_TRANSITION_START, NlaStrip::next, nlaeval_fmodifiers_join_stacks(), nlaeval_fmodifiers_split_stacks(), nlaevalchan_buffers_accumulate(), nlastrip_evaluate(), NLASTRIP_FLAG_REVERSE, NULL, NlaStrip::prev, NlaEvalStrip::strip, and NlaEvalStrip::strip_mode.
Referenced by nlastrip_evaluate().
static float nlastrip_get_influence | ( | NlaStrip * | strip, |
float | cframe | ||
) | [static] |
Definition at line 1373 of file anim_sys.c.
References NlaStrip::blendin, NlaStrip::blendout, NlaStrip::end, fabsf, IS_EQ, and NlaStrip::start.
Referenced by nlastrip_evaluate_controls().
NlaEvalStrip* nlastrips_ctime_get_strip | ( | ListBase * | list, |
ListBase * | strips, | ||
short | index, | ||
float | ctime | ||
) |
Definition at line 1424 of file anim_sys.c.
References NlaStrip::act, BLI_addtail(), ELEM, NlaStrip::end, NlaStrip::extendmode, ListBase::first, NlaStrip::flag, IN_RANGE_INCL, NlaStrip::influence, ListBase::last, MEM_callocN(), NES_TIME_AFTER, NES_TIME_BEFORE, NES_TIME_WITHIN, NlaStrip::next, nlastrip_evaluate_controls(), NLASTRIP_EXTEND_HOLD, NLASTRIP_EXTEND_NOTHING, NLASTRIP_FLAG_MUTED, NLASTRIP_TYPE_CLIP, NLASTRIP_TYPE_TRANSITION, NULL, NlaStrip::prev, NlaStrip::start, NlaEvalStrip::strip, io_export_cycles_xml::strip(), NlaEvalStrip::strip_mode, NlaStrip::strip_time, NlaEvalStrip::strip_time, NlaEvalStrip::track_index, and NlaStrip::type.
Referenced by animsys_evaluate_nla(), and nlastrip_evaluate_meta().
static void nlastrips_path_rename_fix | ( | ID * | owner_id, |
const char * | prefix, | ||
char * | oldName, | ||
char * | newName, | ||
ListBase * | strips, | ||
int | verify_paths | ||
) | [static] |
Definition at line 674 of file anim_sys.c.
References NlaStrip::act, bAction::curves, fcurves_path_rename_fix(), ListBase::first, NlaStrip::next, io_export_cycles_xml::strip(), and NlaStrip::strips.
Referenced by BKE_animdata_fix_paths_rename().
static char* rna_path_rename_fix | ( | ID * | owner_id, |
const char * | prefix, | ||
const char * | oldName, | ||
const char * | newName, | ||
char * | oldpath, | ||
int | verify_paths | ||
) | [static] |
Definition at line 563 of file anim_sys.c.
References BLI_dynstr_append(), BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_new(), check_rna_path_is_valid(), MEM_freeN(), NULL, and strlen().
Referenced by drivers_path_rename_fix(), and fcurves_path_rename_fix().