Blender V2.61 - r43446
|
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <float.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "DNA_anim_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_fcurve.h"
#include "BKE_utildefines.h"
#include "BKE_report.h"
#include "BKE_library.h"
#include "BKE_global.h"
#include "RNA_access.h"
#include "RNA_enum_types.h"
#include "ED_anim_api.h"
#include "ED_keyframing.h"
#include "ED_keyframes_edit.h"
Go to the source code of this file.
Definition in file keyframes_general.c.
typedef struct tAnimCopybufItem tAnimCopybufItem |
typedef struct tempFrameValCache tempFrameValCache |
typedef struct tSmooth_Bezt tSmooth_Bezt |
void clean_fcurve | ( | FCurve * | fcu, |
float | thresh | ||
) |
Definition at line 180 of file keyframes_general.c.
References FCurve::bezt, i, insert_vert_fcurve(), IS_EQT, MEM_freeN(), next, NULL, ActBeztColumn::prev, FCurve::totvert, and BezTriple::vec.
Referenced by clean_action_keys(), and clean_graph_keys().
void clear_fcurve_keys | ( | FCurve * | fcu | ) |
Definition at line 130 of file keyframes_general.c.
References FCurve::bezt, MEM_freeN(), NULL, and FCurve::totvert.
Referenced by delete_fcurve_keys(), and paste_animedit_keys_fcurve().
short copy_animedit_keys | ( | bAnimContext * | ac, |
ListBase * | anim_data | ||
) |
Definition at line 509 of file keyframes_general.c.
References ANIM_editkeyframes_ok(), ANIM_fcurve_keyframes_loop(), animcopy_cfra, animcopy_firstframe, animcopy_lastframe, FCurve::array_index, BEZ_SEL, BEZSELECTED, tAnimCopybufItem::bezt, FCurve::bezt, BEZT_OK_SELECTED, BLI_addtail(), CFRA, ELEM, ListBase::first, free_anim_copybuf(), FCurve::grp, GS, i, bAnimListElem::id, if(), bAnimListElem::key_data, ListBase::last, MEM_callocN(), MEM_dupallocN(), MEM_freeN(), ID::name, bAnimListElem::next, NULL, FCurve::rna_path, bAnimContext::scene, and tAnimCopybufItem::totvert.
Referenced by copy_action_keys(), and copy_graph_keys().
void delete_fcurve_key | ( | FCurve * | fcu, |
int | index, | ||
short | do_recalc | ||
) |
Definition at line 77 of file keyframes_general.c.
References abs(), FCurve::bezt, calchandles_fcurve(), MEM_freeN(), NULL, and FCurve::totvert.
Referenced by delete_keyframe(), insert_keyframe_direct(), poselib_remove_exec(), and posttrans_fcurve_clean().
void delete_fcurve_keys | ( | FCurve * | fcu | ) |
Definition at line 108 of file keyframes_general.c.
References FCurve::bezt, clear_fcurve_keys(), BezTriple::f2, i, NULL, SELECT, and FCurve::totvert.
Referenced by delete_action_keys(), delete_graph_keys(), and paste_animedit_keys_fcurve().
void duplicate_fcurve_keys | ( | FCurve * | fcu | ) |
Definition at line 142 of file keyframes_general.c.
References BEZ_DESEL, BEZ_SEL, FCurve::bezt, ELEM, BezTriple::f2, i, MEM_callocN(), MEM_freeN(), NULL, SELECT, and FCurve::totvert.
Referenced by duplicate_action_keys(), and duplicate_graph_keys().
void free_anim_copybuf | ( | void | ) |
Definition at line 480 of file keyframes_general.c.
References animcopy_firstframe, animcopy_lastframe, tAnimCopybufItem::bezt, BLI_freelinkN(), ListBase::first, ListBase::last, MEM_freeN(), tAnimCopybufItem::next, NULL, and tAnimCopybufItem::rna_path.
Referenced by copy_action_keys(), copy_animedit_keys(), copy_graph_keys(), and WM_exit_ext().
short paste_animedit_keys | ( | bAnimContext * | ac, |
ListBase * | anim_data, | ||
const eKeyPasteOffset | offset_mode, | ||
const eKeyMergeMode | merge_mode | ||
) |
Definition at line 763 of file keyframes_general.c.
References animcopy_cfra, animcopy_firstframe, animcopy_lastframe, BKE_report(), CFRA, bAnimListElem::data, ListBase::first, KEYFRAME_PASTE_OFFSET_CFRA_END, KEYFRAME_PASTE_OFFSET_CFRA_RELATIVE, KEYFRAME_PASTE_OFFSET_CFRA_START, KEYFRAME_PASTE_OFFSET_NONE, ListBase::last, bAnimListElem::next, NULL, paste_animedit_keys_fcurve(), pastebuf_match_index_only(), pastebuf_match_path_full(), pastebuf_match_path_property(), bAnimContext::reports, RPT_ERROR, and bAnimContext::scene.
Referenced by paste_action_keys(), and paste_graph_keys().
static void paste_animedit_keys_fcurve | ( | FCurve * | fcu, |
tAnimCopybufItem * | aci, | ||
float | offset, | ||
const eKeyMergeMode | merge_mode | ||
) | [static] |
Definition at line 669 of file keyframes_general.c.
References animcopy_firstframe, animcopy_lastframe, tAnimCopybufItem::bezt, FCurve::bezt, calchandles_fcurve(), clear_fcurve_keys(), delete_fcurve_keys(), BezTriple::f2, i, insert_bezt_fcurve(), KEYFRAME_PASTE_MERGE_MIX, KEYFRAME_PASTE_MERGE_OVER, KEYFRAME_PASTE_MERGE_OVER_RANGE, KEYFRAME_PASTE_MERGE_OVER_RANGE_ALL, SELECT, tAnimCopybufItem::totvert, and BezTriple::vec.
Referenced by paste_animedit_keys().
static tAnimCopybufItem* pastebuf_match_index_only | ( | FCurve * | fcu, |
const short | from_single, | ||
const short | UNUSEDto_simple | ||
) | [static] |
Definition at line 652 of file keyframes_general.c.
References FCurve::array_index, tAnimCopybufItem::array_index, ListBase::first, and tAnimCopybufItem::next.
Referenced by paste_animedit_keys().
static tAnimCopybufItem* pastebuf_match_path_full | ( | FCurve * | fcu, |
const short | from_single, | ||
const short | to_simple | ||
) | [static] |
Definition at line 587 of file keyframes_general.c.
References FCurve::array_index, tAnimCopybufItem::array_index, ListBase::first, tAnimCopybufItem::next, FCurve::rna_path, and tAnimCopybufItem::rna_path.
Referenced by paste_animedit_keys().
static tAnimCopybufItem* pastebuf_match_path_property | ( | FCurve * | fcu, |
const short | from_single, | ||
const short | UNUSEDto_simple | ||
) | [static] |
Definition at line 605 of file keyframes_general.c.
References FCurve::array_index, tAnimCopybufItem::array_index, BLI_findindex(), ListBase::first, G, tAnimCopybufItem::id, tAnimCopybufItem::id_type, ID::name, tAnimCopybufItem::next, RNA_id_pointer_create(), FCurve::rna_path, tAnimCopybufItem::rna_path, RNA_path_resolve(), RNA_property_identifier(), strlen(), and which_libbase().
Referenced by paste_animedit_keys().
void sample_fcurve | ( | FCurve * | fcu | ) |
Definition at line 383 of file keyframes_general.c.
References BEZKEYTYPE, BEZSELECTED, FCurve::bezt, BEZT_KEYTYPE_BREAKDOWN, calchandles_fcurve(), evaluate_fcurve(), i, insert_vert_fcurve(), MEM_callocN(), MEM_freeN(), NULL, and BezTriple::vec.
Referenced by sample_action_keys(), and sample_graph_keys().
void smooth_fcurve | ( | FCurve * | fcu | ) |
Definition at line 285 of file keyframes_general.c.
References BEZSELECTED, FCurve::bezt, calchandles_fcurve(), ELEM, tSmooth_Bezt::h1, tSmooth_Bezt::h2, tSmooth_Bezt::h3, i, MEM_callocN(), MEM_freeN(), NULL, FCurve::totvert, BezTriple::vec, tSmooth_Bezt::y1, tSmooth_Bezt::y2, and tSmooth_Bezt::y3.
Referenced by graphkeys_smooth_exec().
float animcopy_cfra = 0.0 [static] |
Definition at line 460 of file keyframes_general.c.
Referenced by copy_animedit_keys(), and paste_animedit_keys().
float animcopy_firstframe = 999999999.0f [static] |
Definition at line 458 of file keyframes_general.c.
Referenced by copy_animedit_keys(), free_anim_copybuf(), paste_animedit_keys(), and paste_animedit_keys_fcurve().
float animcopy_lastframe = -999999999.0f [static] |
Definition at line 459 of file keyframes_general.c.
Referenced by copy_animedit_keys(), free_anim_copybuf(), paste_animedit_keys(), and paste_animedit_keys_fcurve().
ListBase animcopybuf = {NULL, NULL} [static] |
Definition at line 457 of file keyframes_general.c.
{ {KEYFRAME_PASTE_MERGE_MIX, "MIX", 0, "Mix", "Overlay existing with new keys"}, {KEYFRAME_PASTE_MERGE_OVER, "OVER_ALL", 0, "Overwrite All", "Replace all keys"}, {KEYFRAME_PASTE_MERGE_OVER_RANGE, "OVER_RANGE", 0, "Overwrite Range", "Overwrite keys in pasted range"}, {KEYFRAME_PASTE_MERGE_OVER_RANGE_ALL, "OVER_RANGE_ALL", 0, "Overwrite Entire Range", "Overwrite keys in pasted range, using the range of all copied keys"}, {0, NULL, 0, NULL, NULL}}
Definition at line 752 of file keyframes_general.c.
Referenced by ACTION_OT_paste(), and GRAPH_OT_paste().
{ {KEYFRAME_PASTE_OFFSET_CFRA_START, "START", 0, "Frame Start", "Paste keys starting at current frame"}, {KEYFRAME_PASTE_OFFSET_CFRA_END, "END", 0, "Frame End", "Paste keys ending at current frame"}, {KEYFRAME_PASTE_OFFSET_CFRA_RELATIVE, "RELATIVE", 0, "Frame Relative", "Paste keys relative to the current frame when copying"}, {KEYFRAME_PASTE_OFFSET_NONE, "NONE", 0, "No Offset", "Paste keys from original time"}, {0, NULL, 0, NULL, NULL}}
Definition at line 745 of file keyframes_general.c.
Referenced by ACTION_OT_paste(), and GRAPH_OT_paste().