125 for (marker =
markers->first; marker; marker = markern) {
126 markern = marker->next;
129 if (marker->flag &
SELECT) {
149 ot->
name =
"Make Markers Local";
150 ot->
idname =
"ACTION_OT_markers_make_local";
151 ot->
description =
"Move selected scene markers to the active Action as local 'pose' markers";
184 *
max = -999999999.0f;
187 if (anim_data.
first) {
189 for (ale = anim_data.
first; ale; ale = ale->
next) {
209 masklay_shape = masklay_shape->
next) {
210 const float framenum = (
float)masklay_shape->
frame;
298 ot->
name =
"Auto-Set Preview Range";
299 ot->
idname =
"ACTION_OT_previewrange_set";
300 ot->
description =
"Set Preview Range based on extents of selected Keyframes";
379 if (only_sel && (found ==
false)) {
401 if (only_sel ==
false) {
414 float ymid = (ymax - ymin) / 2.0f + ymin;
452 ot->
description =
"Reset viewable area to show full keyframe range";
465 ot->
name =
"Frame Selected";
466 ot->
idname =
"ACTION_OT_view_selected";
467 ot->
description =
"Reset viewable area to show selected keyframes range";
490 ot->
name =
"Go to Current Frame";
491 ot->
idname =
"ACTION_OT_view_frame";
596 ot->
name =
"Copy Keyframes";
598 ot->
description =
"Copy selected keyframes to the copy/paste buffer";
635 "Keyframe pasting is not available for grease pencil or mask mode");
661 return BLI_strdup(
"Paste keyframes from mirrored bones if they exist");
672 ot->
name =
"Paste Keyframes";
675 "Paste keyframes from copy/paste buffer for the selected channels, starting on the current "
693 "Paste time offset of keys");
699 "Method of merging pasted keys and existing");
701 ot->
srna,
"flipped",
false,
"Flipped",
"Paste keyframes from mirrored bones if they exist");
709 {1,
"ALL", 0,
"All Channels",
""},
710 {2,
"SEL", 0,
"Only Selected Channels",
""},
712 {3,
"GROUP", 0,
"In Active Group",
""},
735 else if (mode == 3) {
747 for (ale = anim_data.
first; ale; ale = ale->
next) {
776 float cfra = anim_eval_context.
eval_time;
824 for (ale = anim_data.
first; ale; ale = ale->
next) {
829 if (gpd != gpd_old) {
879 ot->
name =
"Insert Keyframes";
880 ot->
idname =
"ACTION_OT_keyframe_insert";
881 ot->
description =
"Insert keyframes for the specified channels";
915 for (ale = anim_data.
first; ale; ale = ale->
next) {
959 ot->
name =
"Duplicate Keyframes";
978 bool changed_final =
false;
992 for (ale = anim_data.
first; ale; ale = ale->
next) {
993 bool changed =
false;
1017 changed_final =
true;
1024 return changed_final;
1052 ot->
name =
"Delete Keyframes";
1080 for (ale = anim_data.
first; ale; ale = ale->
next) {
1124 ot->
name =
"Clean Keyframes";
1126 ot->
description =
"Simplify F-Curves by removing closely spaced keyframes";
1138 ot->
srna,
"threshold", 0.001f, 0.0f, FLT_MAX,
"Threshold",
"", 0.0f, 1000.0f);
1157 for (ale = anim_data.
first; ale; ale = ale->
next) {
1195 ot->
name =
"Sample Keyframes";
1197 ot->
description =
"Add keyframes on every frame between the selected keyframes";
1213 #define MAKE_CYCLIC_EXPO -1
1214 #define CLEAR_CYCLIC_EXPO -2
1221 "Constant Extrapolation",
1222 "Values on endpoint keyframes are held"},
1226 "Linear Extrapolation",
1227 "Straight-line slope of end segments are extended past the endpoint keyframes"},
1232 "Make Cyclic (F-Modifier)",
1233 "Add Cycles F-Modifier if one doesn't exist already"},
1237 "Clear Cyclic (F-Modifier)",
1238 "Remove Cycles F-Modifier if not needed anymore"},
1255 for (ale = anim_data.
first; ale; ale = ale->
next) {
1326 ot->
name =
"Set Keyframe Extrapolation";
1327 ot->
idname =
"ACTION_OT_extrapolation_type";
1328 ot->
description =
"Set extrapolation mode for selected F-Curves";
1377 ot->
name =
"Set Keyframe Interpolation";
1378 ot->
idname =
"ACTION_OT_interpolation_type";
1380 "Set interpolation mode for the F-Curve segments starting from the selected keyframes";
1425 ot->
name =
"Set Keyframe Easing Type";
1426 ot->
idname =
"ACTION_OT_easing_type";
1428 "Set easing type for the F-Curve segments starting from the selected keyframes";
1464 for (ale = anim_data.
first; ale; ale = ale->
next) {
1512 ot->
name =
"Set Keyframe Handle Type";
1513 ot->
idname =
"ACTION_OT_handle_type";
1514 ot->
description =
"Set type of handle for selected keyframes";
1547 for (ale = anim_data.
first; ale; ale = ale->
next) {
1570 for (ale = anim_data.
first; ale; ale = ale->
next) {
1618 ot->
name =
"Set Keyframe Type";
1619 ot->
idname =
"ACTION_OT_keyframe_type";
1620 ot->
description =
"Set type of keyframe for the selected keyframes";
1642 if (
G.is_rendering) {
1669 for (ale = anim_data.
first; ale; ale = ale->
next) {
1699 ot->
name =
"Jump to Keyframes";
1700 ot->
idname =
"ACTION_OT_frame_jump";
1701 ot->
description =
"Set the current frame to the average frame value of selected keyframes";
1718 "Selection to Current Frame",
1719 "Snap selected keyframes to the current frame"},
1723 "Selection to Nearest Frame",
1724 "Snap selected keyframes to the nearest (whole) frame (use to fix accidental subframe "
1729 "Selection to Nearest Second",
1730 "Snap selected keyframes to the nearest second"},
1734 "Selection to Nearest Marker",
1735 "Snap selected keyframes to the nearest marker"},
1769 for (ale = anim_data.
first; ale; ale = ale->
next) {
1823 ot->
description =
"Snap selected keyframes to the times specified";
1844 "By Times Over Current Frame",
1845 "Flip times of selected keyframes using the current frame as the mirror line"},
1849 "By Values Over Zero Value",
1850 "Flip values of selected keyframes (i.e. negative values become positive, and vice versa)"},
1854 "By Times Over First Selected Marker",
1855 "Flip times of selected keyframes using the first selected marker as the reference point"},
1899 for (ale = anim_data.
first; ale; ale = ale->
next) {
1951 ot->
name =
"Mirror Keys";
1953 ot->
description =
"Flip selected keyframes over the selected mirror line";
typedef float(TangentPoint)[2]
Blender kernel action and pose functionality.
void BKE_animsys_free_nla_keyframing_context_cache(struct ListBase *cache)
AnimationEvalContext BKE_animsys_eval_context_construct(struct Depsgraph *depsgraph, float eval_time)
struct ScrArea * CTX_wm_area(const bContext *C)
struct bScreen * CTX_wm_screen(const bContext *C)
struct SpaceAction * CTX_wm_space_action(const bContext *C)
float evaluate_fcurve(struct FCurve *fcu, float evaltime)
bool BKE_fcurve_calc_range(struct FCurve *fcu, float *min, float *max, const bool do_sel_only, const bool do_min_length)
bool BKE_fcurve_is_empty(struct FCurve *fcu)
bool remove_fmodifier(ListBase *modifiers, struct FModifier *fcm)
void calchandles_fcurve(struct FCurve *fcu)
struct FModifier * add_fmodifier(ListBase *modifiers, int type, struct FCurve *owner_fcu)
bool list_has_suitable_fmodifier(ListBase *modifiers, int mtype, short acttype)
struct bGPDframe * BKE_gpencil_layer_frame_get(struct bGPDlayer *gpl, int cframe, eGP_GetFrame_Mode addnew)
void BKE_gpencil_tag(struct bGPdata *gpd)
float BKE_nla_tweakedit_remap(struct AnimData *adt, float cframe, short mode)
void BKE_report(ReportList *reports, ReportType type, const char *message)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
MINLINE int round_fl_to_int(float a)
MINLINE float max_ff(float a, float b)
MINLINE float min_ff(float a, float b)
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
@ SACTION_POSEMARKERS_SHOW
@ FCURVE_EXTRAPOLATE_CONSTANT
@ FCURVE_EXTRAPOLATE_LINEAR
Object is a sort of wrapper for general info.
@ GP_TOOL_FLAG_RETAIN_LAST
#define ACHANNEL_HEIGHT(ac)
#define ACHANNEL_FIRST_TOP(ac)
#define ANIM_UPDATE_DEFAULT
@ ACHANNEL_SETTING_SELECT
#define ACHANNEL_STEP(ac)
@ ANIMFILTER_DATA_VISIBLE
@ ANIMFILTER_CURVE_VISIBLE
@ ANIMFILTER_LIST_VISIBLE
@ ANIMFILTER_LIST_CHANNELS
@ KEYFRAME_PASTE_MERGE_MIX
@ KEYFRAME_PASTE_OFFSET_CFRA_START
short(* KeyframeEditFunc)(KeyframeEditData *ked, struct BezTriple *bezt)
void ED_masklayer_frames_duplicate(struct MaskLayer *mask_layer)
bool ED_masklayer_frames_delete(struct MaskLayer *mask_layer)
void ED_masklayer_snap_frames(struct MaskLayer *mask_layer, struct Scene *scene, short mode)
void ED_area_tag_redraw(ScrArea *area)
bool ED_operator_action_active(struct bContext *C)
void UI_view2d_center_set(struct View2D *v2d, float x, float y)
void UI_view2d_sync(struct bScreen *screen, struct ScrArea *area, struct View2D *v2dcur, int flag)
void UI_view2d_center_get(const struct View2D *v2d, float *r_x, float *r_y)
void ACTION_OT_view_selected(wmOperatorType *ot)
static bool actkeys_framejump_poll(bContext *C)
static int actkeys_delete_exec(bContext *C, wmOperator *UNUSED(op))
void ACTION_OT_keyframe_type(wmOperatorType *ot)
void ACTION_OT_easing_type(wmOperatorType *ot)
static void insert_gpencil_keys(bAnimContext *ac, short mode)
static bool act_markers_make_local_poll(bContext *C)
static void setkeytype_gpencil_keys(bAnimContext *ac, short mode)
static void snap_action_keys(bAnimContext *ac, short mode)
static int actkeys_view_frame_exec(bContext *C, wmOperator *op)
static void clean_action_keys(bAnimContext *ac, float thresh, bool clean_chan)
static int actkeys_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
static const EnumPropertyItem prop_actkeys_snap_types[]
void ACTION_OT_view_all(wmOperatorType *ot)
void ACTION_OT_sample(wmOperatorType *ot)
static int actkeys_viewall(bContext *C, const bool only_sel)
void ACTION_OT_previewrange_set(wmOperatorType *ot)
static int actkeys_snap_exec(bContext *C, wmOperator *op)
void ACTION_OT_duplicate(wmOperatorType *ot)
void ACTION_OT_delete(wmOperatorType *ot)
void ACTION_OT_view_frame(wmOperatorType *ot)
static int actkeys_previewrange_exec(bContext *C, wmOperator *UNUSED(op))
void ACTION_OT_extrapolation_type(wmOperatorType *ot)
static int actkeys_ipo_exec(bContext *C, wmOperator *op)
void ACTION_OT_keyframe_insert(wmOperatorType *ot)
static void insert_action_keys(bAnimContext *ac, short mode)
static char * actkeys_paste_description(bContext *UNUSED(C), wmOperatorType *UNUSED(op), PointerRNA *ptr)
static bool delete_action_keys(bAnimContext *ac)
void ACTION_OT_snap(wmOperatorType *ot)
static int act_markers_make_local_exec(bContext *C, wmOperator *UNUSED(op))
static void duplicate_action_keys(bAnimContext *ac)
static int actkeys_paste_exec(bContext *C, wmOperator *op)
void ACTION_OT_frame_jump(wmOperatorType *ot)
static void sample_action_keys(bAnimContext *ac)
void ACTION_OT_paste(wmOperatorType *ot)
static int actkeys_clean_exec(bContext *C, wmOperator *op)
static const EnumPropertyItem prop_actkeys_mirror_types[]
static bool actkeys_channels_get_selected_extents(bAnimContext *ac, float *r_min, float *r_max)
static void sethandles_action_keys(bAnimContext *ac, short mode)
static void mirror_action_keys(bAnimContext *ac, short mode)
void ACTION_OT_copy(wmOperatorType *ot)
static short copy_action_keys(bAnimContext *ac)
static bool get_keyframe_extents(bAnimContext *ac, float *min, float *max, const short onlySel)
static int actkeys_easing_exec(bContext *C, wmOperator *op)
static int actkeys_copy_exec(bContext *C, wmOperator *op)
static int actkeys_mirror_exec(bContext *C, wmOperator *op)
void ACTION_OT_markers_make_local(wmOperatorType *ot)
void ACTION_OT_interpolation_type(wmOperatorType *ot)
static int actkeys_expo_exec(bContext *C, wmOperator *op)
static int actkeys_handletype_exec(bContext *C, wmOperator *op)
void ACTION_OT_handle_type(wmOperatorType *ot)
static const EnumPropertyItem prop_actkeys_insertkey_types[]
static int actkeys_insertkey_exec(bContext *C, wmOperator *op)
void ACTION_OT_mirror(wmOperatorType *ot)
static void setexpo_action_keys(bAnimContext *ac, short mode)
static void setkeytype_action_keys(bAnimContext *ac, short mode)
void ACTION_OT_clean(wmOperatorType *ot)
#define CLEAR_CYCLIC_EXPO
static int actkeys_viewsel_exec(bContext *C, wmOperator *UNUSED(op))
static int actkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op))
static short paste_action_keys(bAnimContext *ac, const eKeyPasteOffset offset_mode, const eKeyMergeMode merge_mode, bool flip)
static int actkeys_viewall_exec(bContext *C, wmOperator *UNUSED(op))
static int actkeys_keytype_exec(bContext *C, wmOperator *op)
static const EnumPropertyItem prop_actkeys_expo_types[]
static int actkeys_sample_exec(bContext *C, wmOperator *op)
@ ACTKEYS_SNAP_NEAREST_FRAME
@ ACTKEYS_SNAP_NEAREST_SECOND
@ ACTKEYS_SNAP_NEAREST_MARKER
short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting)
const bAnimChannelType * ANIM_channel_get_typeinfo(bAnimListElem *ale)
void ANIM_fcurve_delete_from_animdata(bAnimContext *ac, AnimData *adt, FCurve *fcu)
void ANIM_animdata_freelist(ListBase *anim_data)
void ANIM_animdata_update(bAnimContext *ac, ListBase *anim_data)
AnimData * ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale)
void ANIM_nla_mapping_apply_fcurve(AnimData *adt, FCurve *fcu, bool restore, bool only_keys)
void ANIM_center_frame(struct bContext *C, int smooth_viewtx)
bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, eAnimFilter_Flags filter_mode, void *data, eAnimCont_Types datatype)
TimeMarker * ED_markers_get_first_selected(ListBase *markers)
ListBase * ED_context_get_markers(const bContext *C)
void ED_gpencil_layer_frames_keytype_set(bGPDlayer *gpl, short type)
void ED_gpencil_layer_frames_duplicate(bGPDlayer *gpl)
bool ED_gpencil_layer_frames_delete(bGPDlayer *gpl)
bool ED_gpencil_anim_copybuf_paste(bAnimContext *ac, const short offset_mode)
void ED_gpencil_layer_mirror_frames(bGPDlayer *gpl, Scene *scene, short mode)
void ED_gpencil_layer_snap_frames(bGPDlayer *gpl, Scene *scene, short mode)
bool ED_gpencil_anim_copybuf_copy(bAnimContext *ac)
DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
const vector< Marker > & markers
KeyframeEditFunc ANIM_editkeyframes_mirror(short mode)
KeyframeEditFunc ANIM_editkeyframes_keytype(short mode)
KeyframeEditFunc ANIM_editkeyframes_easing(short mode)
KeyframeEditFunc ANIM_editkeyframes_ipo(short mode)
short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked, FCurve *fcu, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb)
KeyframeEditFunc ANIM_editkeyframes_ok(short mode)
KeyframeEditFunc ANIM_editkeyframes_snap(short mode)
void ANIM_animdata_keyframe_callback(bAnimContext *ac, eAnimFilter_Flags filter, KeyframeEditFunc callback_fn)
short bezt_calc_average(KeyframeEditData *ked, BezTriple *bezt)
KeyframeEditFunc ANIM_editkeyframes_handles(short mode)
void duplicate_fcurve_keys(FCurve *fcu)
const EnumPropertyItem rna_enum_keyframe_paste_offset_items[]
short paste_animedit_keys(bAnimContext *ac, ListBase *anim_data, const eKeyPasteOffset offset_mode, const eKeyMergeMode merge_mode, bool flip)
short copy_animedit_keys(bAnimContext *ac, ListBase *anim_data)
const EnumPropertyItem rna_enum_keyframe_paste_merge_items[]
void sample_fcurve(FCurve *fcu)
void ANIM_fcurves_copybuf_free(void)
bool delete_fcurve_keys(FCurve *fcu)
void clean_fcurve(struct bAnimContext *ac, bAnimListElem *ale, float thresh, bool cleardefault)
int insert_vert_fcurve(FCurve *fcu, float x, float y, eBezTriple_KeyframeType keyframe_type, eInsertKeyFlags flag)
eInsertKeyFlags ANIM_get_keyframing_flags(Scene *scene, const bool use_autokey_mode)
int insert_keyframe(Main *bmain, ReportList *reports, ID *id, bAction *act, const char group[], const char rna_path[], int array_index, const AnimationEvalContext *anim_eval_context, eBezTriple_KeyframeType keytype, ListBase *nla_cache, eInsertKeyFlags flag)
float RNA_float_get(PointerRNA *ptr, const char *name)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
const EnumPropertyItem rna_enum_beztriple_interpolation_mode_items[]
const EnumPropertyItem rna_enum_keyframe_handle_type_items[]
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
const EnumPropertyItem rna_enum_beztriple_interpolation_easing_items[]
const EnumPropertyItem rna_enum_beztriple_keyframe_type_items[]
struct MaskLayerShape * next
struct ToolSettings * toolsettings
bool(* has_setting)(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting)
eAnimChannel_Role channel_role
struct ReportList * reports
struct Depsgraph * depsgraph
struct bAnimListElem * next
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
char *(* get_description)(struct bContext *C, struct wmOperatorType *, struct PointerRNA *)
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_operator_properties_confirm_or_exec(wmOperatorType *ot)
int WM_operator_confirm_or_exec(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
int WM_operator_smooth_viewtx_get(const wmOperator *op)
int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))