Blender V4.3
ED_keyframing.hh File Reference
#include "BLI_vector.hh"
#include "DNA_anim_types.h"
#include "RNA_types.hh"

Go to the source code of this file.

Classes

struct  KeyingSetInfo
 

Namespaces

namespace  blender
 
namespace  blender::animrig
 

Functions

Key-Framing Management
void update_autoflags_fcurve (FCurve *fcu, bContext *C, ReportList *reports, PointerRNA *ptr)
 Lesser Key-framing API call.
 
void ED_keyframes_add (FCurve *fcu, int num_keys_to_add)
 

Keyframe Checking

#define ANIM_KS_LOCATION_ID   "Location"
 
#define ANIM_KS_ROTATION_ID   "Rotation"
 
#define ANIM_KS_SCALING_ID   "Scaling"
 
#define ANIM_KS_LOC_ROT_SCALE_ID   "LocRotScale"
 
#define ANIM_KS_LOC_ROT_SCALE_CPROP_ID   "LocRotScaleCProp"
 
#define ANIM_KS_AVAILABLE_ID   "Available"
 
#define ANIM_KS_WHOLE_CHARACTER_ID   "WholeCharacter"
 
#define ANIM_KS_WHOLE_CHARACTER_SELECTED_ID   "WholeCharacterSelected"
 
bool fcurve_frame_has_keyframe (const FCurve *fcu, float frame)
 Lesser Keyframe Checking API call.
 
bool fcurve_is_changed (PointerRNA ptr, PropertyRNA *prop, FCurve *fcu, const AnimationEvalContext *anim_eval_context)
 Lesser Keyframe Checking API call.
 
bool id_frame_has_keyframe (ID *id, float frame)
 Main Keyframe Checking API call.
 

Drivers

enum  eCreateDriverFlags { CREATEDRIVER_WITH_DEFAULT_DVAR = (1 << 0) , CREATEDRIVER_WITH_FMODIFIER = (1 << 1) }
 
enum  eCreateDriver_MappingTypes {
  CREATEDRIVER_MAPPING_1_N = 0 , CREATEDRIVER_MAPPING_1_1 = 1 , CREATEDRIVER_MAPPING_N_N = 2 , CREATEDRIVER_MAPPING_NONE = 3 ,
  CREATEDRIVER_MAPPING_NONE_ALL = 4
}
 
enum  eDriverFCurveCreationMode { DRIVER_FCURVE_LOOKUP_ONLY = 0 , DRIVER_FCURVE_KEYFRAMES = 1 , DRIVER_FCURVE_GENERATOR = 2 , DRIVER_FCURVE_EMPTY = 3 }
 
const EnumPropertyItem prop_driver_create_mapping_types []
 
FCurveverify_driver_fcurve (ID *id, const char rna_path[], int array_index, eDriverFCurveCreationMode creation_mode)
 
FCurvealloc_driver_fcurve (const char rna_path[], int array_index, eDriverFCurveCreationMode creation_mode)
 
int ANIM_add_driver_with_target (ReportList *reports, ID *dst_id, const char dst_path[], int dst_index, ID *src_id, const char src_path[], int src_index, short flag, int driver_type, short mapping_type)
 Main Driver Management API calls.
 
int ANIM_add_driver (ReportList *reports, ID *id, const char rna_path[], int array_index, short flag, int type)
 Main Driver Management API calls.
 
bool ANIM_remove_driver (ID *id, const char rna_path[], int array_index)
 Main Driver Management API calls.
 
void ANIM_drivers_copybuf_free ()
 
void ANIM_driver_vars_copybuf_free ()
 
bool ANIM_driver_can_paste ()
 
bool ANIM_copy_driver (ReportList *reports, ID *id, const char rna_path[], int array_index, short flag)
 Main Driver Management API calls.
 
bool ANIM_paste_driver (ReportList *reports, ID *id, const char rna_path[], int array_index, short flag)
 Main Driver Management API calls.
 
bool ANIM_driver_vars_can_paste ()
 
bool ANIM_driver_vars_copy (ReportList *reports, FCurve *fcu)
 
bool ANIM_driver_vars_paste (ReportList *reports, FCurve *fcu, bool replace)
 
void ANIM_copy_as_driver (ID *target_id, const char *target_path, const char *var_name)
 

Keying Sets

using cbKeyingSet_Poll = bool (*)(KeyingSetInfo *ksi, bContext *C)
 
using cbKeyingSet_Iterator = void (*)(KeyingSetInfo *ksi, bContext *C, KeyingSet *ks)
 
using cbKeyingSet_Generate
 
void ANIM_relative_keyingset_add_source (blender::Vector< PointerRNA > &sources, ID *id, StructRNA *srna, void *data)
 
void ANIM_relative_keyingset_add_source (blender::Vector< PointerRNA > &sources, ID *id)
 
blender::animrig::ModifyKeyReturn ANIM_validate_keyingset (bContext *C, blender::Vector< PointerRNA > *sources, KeyingSet *keyingset)
 
int ANIM_apply_keyingset (bContext *C, blender::Vector< PointerRNA > *sources, KeyingSet *keyingset, blender::animrig::ModifyKeyMode mode, float cfra)
 
KeyingSetANIM_builtin_keyingset_get_named (const char name[])
 
KeyingSetInfoANIM_keyingset_info_find_name (const char name[])
 
bool ANIM_keyingset_find_id (KeyingSet *keyingset, ID *id)
 
void ANIM_keyingset_info_register (KeyingSetInfo *keyingset_info)
 
void ANIM_keyingset_info_unregister (Main *bmain, KeyingSetInfo *keyingset_info)
 
void ANIM_keyingset_infos_exit ()
 
KeyingSetANIM_scene_get_active_keyingset (const Scene *scene)
 
int ANIM_scene_get_keyingset_index (Scene *scene, KeyingSet *keyingset)
 
KeyingSetANIM_get_keyingset_for_autokeying (const Scene *scene, const char *transformKSName)
 
void ANIM_keyingset_visit_for_search (const bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *edit_text, blender::FunctionRef< void(StringPropertySearchVisitParams)> visit_fn)
 
void ANIM_keyingset_visit_for_search_no_poll (const bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *edit_text, blender::FunctionRef< void(StringPropertySearchVisitParams)> visit_fn)
 
const EnumPropertyItemANIM_keying_sets_enum_itemf (bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free)
 
KeyingSetANIM_keyingset_get_from_enum_type (Scene *scene, int type)
 
KeyingSetANIM_keyingset_get_from_idname (Scene *scene, const char *idname)
 
bool ANIM_keyingset_context_ok_poll (bContext *C, KeyingSet *keyingset)
 

Macro Definition Documentation

◆ ANIM_KS_AVAILABLE_ID

#define ANIM_KS_AVAILABLE_ID   "Available"

Definition at line 461 of file ED_keyframing.hh.

Referenced by ANIM_get_keyingset_for_autokeying().

◆ ANIM_KS_LOC_ROT_SCALE_CPROP_ID

#define ANIM_KS_LOC_ROT_SCALE_CPROP_ID   "LocRotScaleCProp"

Definition at line 460 of file ED_keyframing.hh.

◆ ANIM_KS_LOC_ROT_SCALE_ID

#define ANIM_KS_LOC_ROT_SCALE_ID   "LocRotScale"

Definition at line 459 of file ED_keyframing.hh.

Referenced by pose_clear_transforms_exec().

◆ ANIM_KS_LOCATION_ID

◆ ANIM_KS_ROTATION_ID

#define ANIM_KS_ROTATION_ID   "Rotation"

◆ ANIM_KS_SCALING_ID

#define ANIM_KS_SCALING_ID   "Scaling"

◆ ANIM_KS_WHOLE_CHARACTER_ID

#define ANIM_KS_WHOLE_CHARACTER_ID   "WholeCharacter"

◆ ANIM_KS_WHOLE_CHARACTER_SELECTED_ID

#define ANIM_KS_WHOLE_CHARACTER_SELECTED_ID   "WholeCharacterSelected"

Definition at line 463 of file ED_keyframing.hh.

Typedef Documentation

◆ cbKeyingSet_Generate

Initial value:

Property Specifier Callback for KeyingSets (called from iterators)

Definition at line 76 of file ED_keyframing.hh.

◆ cbKeyingSet_Iterator

using cbKeyingSet_Iterator = void (*)(KeyingSetInfo *ksi, bContext *C, KeyingSet *ks)

Context Iterator Callback for KeyingSets.

Definition at line 74 of file ED_keyframing.hh.

◆ cbKeyingSet_Poll

using cbKeyingSet_Poll = bool (*)(KeyingSetInfo *ksi, bContext *C)

Polling Callback for KeyingSets.

Definition at line 72 of file ED_keyframing.hh.

Enumeration Type Documentation

◆ eCreateDriver_MappingTypes

Heuristic to use for connecting target properties to driven ones

Enumerator
CREATEDRIVER_MAPPING_1_N 

1 to Many - Use the specified index, and drive all elements with it

CREATEDRIVER_MAPPING_1_1 

1 to 1 - Only for the specified index on each side

CREATEDRIVER_MAPPING_N_N 

Many to Many - Match up the indices one by one (only for drivers on vectors/arrays)

CREATEDRIVER_MAPPING_NONE 

None (Single Prop): Do not create driver with any targets; these will get added later instead

CREATEDRIVER_MAPPING_NONE_ALL 

None (All Properties): Do not create driver with any targets; these will get added later instead

Definition at line 259 of file ED_keyframing.hh.

◆ eCreateDriverFlags

Flags for use by driver creation calls

Enumerator
CREATEDRIVER_WITH_DEFAULT_DVAR 

create drivers with a default variable for nicer UI

CREATEDRIVER_WITH_FMODIFIER 

Create drivers with Generator FModifier (for backwards compatibility).

Definition at line 251 of file ED_keyframing.hh.

◆ eDriverFCurveCreationMode

Enumerator
DRIVER_FCURVE_LOOKUP_ONLY 

Don't add anything if not found.

DRIVER_FCURVE_KEYFRAMES 

Add with keyframes, for visual tweaking.

DRIVER_FCURVE_GENERATOR 

Add with generator, for script backwards compatibility.

DRIVER_FCURVE_EMPTY 

Add without data, for pasting.

Definition at line 283 of file ED_keyframing.hh.

Function Documentation

◆ alloc_driver_fcurve()

◆ ANIM_add_driver()

◆ ANIM_add_driver_with_target()

int ANIM_add_driver_with_target ( ReportList * reports,
ID * dst_id,
const char dst_path[],
int dst_index,
ID * src_id,
const char src_path[],
int src_index,
short flag,
int driver_type,
short mapping_type )

Main Driver Management API calls.

Add a new driver for the specified property on the given ID block, and make it be driven by the specified target.

This is intended to be used in conjunction with a modal "eyedropper" for picking the variable that is going to be used to drive this one.

Parameters
flageCreateDriverFlags
driver_typeeDriver_Types
mapping_typeeCreateDriver_MappingTypes

Definition at line 285 of file drivers.cc.

References add_driver_with_target(), ANIM_add_driver(), BKE_reportf(), CREATEDRIVER_MAPPING_1_1, CREATEDRIVER_MAPPING_1_N, CREATEDRIVER_MAPPING_N_N, CREATEDRIVER_MAPPING_NONE, CREATEDRIVER_WITH_DEFAULT_DVAR, flag, len, ID::name, ptr, RNA_id_pointer_create(), RNA_path_resolve_property(), RNA_property_array_check(), RNA_property_array_length(), and RPT_ERROR.

Referenced by driverdropper_sample().

◆ ANIM_apply_keyingset()

int ANIM_apply_keyingset ( bContext * C,
blender::Vector< PointerRNA > * sources,
KeyingSet * keyingset,
blender::animrig::ModifyKeyMode mode,
float cfra )

Use the specified KeyingSet and context info (if required) to add/remove various Keyframes on the specified frame.

Modify keyframes for the channels specified by the KeyingSet. This takes into account many of the different combinations of using KeyingSets.

Returns
the number of channels that key-frames were added or an #eModifyKey_Returns value (always a negative number).

Definition at line 1134 of file keyingsets.cc.

References ANIM_validate_keyingset(), BKE_reportf(), BLI_assert, CTX_data_scene(), CTX_wm_reports(), error(), insert_key_to_keying_set_path(), INSERTKEY_NOFLAGS, int, KeyingSet::keyingflag, KeyingSet::keyingoverride, keyingset_apply_keying_flags(), LISTBASE_FOREACH, KeyingSet::name, KeyingSet::paths, and RPT_WARNING.

Referenced by blender::animrig::autokeyframe_object(), blender::animrig::autokeyframe_object(), blender::animrig::autokeyframe_pchan(), blender::animrig::autokeyframe_pose_channel(), delete_key_using_keying_set(), ED_view3d_camera_autokey(), insert_key_with_keyingset(), pose_clear_transform_generic_exec(), poseAnim_mapping_autoKeyframe(), and poselib_keytag_pose().

◆ ANIM_builtin_keyingset_get_named()

KeyingSet * ANIM_builtin_keyingset_get_named ( const char name[])

Find builtin KeyingSet by name.

Returns
The first builtin KeyingSet with the given name

Definition at line 581 of file keyingsets.cc.

References builtin_keyingsets, LISTBASE_FOREACH, printf, and STREQ.

Referenced by ANIM_get_keyingset_for_autokeying().

◆ ANIM_copy_as_driver()

void ANIM_copy_as_driver ( ID * target_id,
const char * target_path,
const char * var_name )

◆ ANIM_copy_driver()

bool ANIM_copy_driver ( ReportList * reports,
ID * id,
const char rna_path[],
int array_index,
short flag )

Main Driver Management API calls.

Make a copy of the driver for the specified property on the given ID block.

Definition at line 580 of file drivers.cc.

References ANIM_drivers_copybuf_free(), BKE_fcurve_copy(), BKE_reportf(), channeldriver_copypaste_buf, FCurve::driver, DRIVER_FCURVE_LOOKUP_ONLY, ptr, RNA_id_pointer_create(), FCurve::rna_path, RNA_path_resolve_property(), RPT_ERROR, and verify_driver_fcurve().

Referenced by copy_driver_button_exec().

◆ ANIM_driver_can_paste()

bool ANIM_driver_can_paste ( )

Returns whether there is a driver in the copy/paste buffer to paste.

Definition at line 573 of file drivers.cc.

References channeldriver_copypaste_buf.

Referenced by ui_popup_context_menu_for_button().

◆ ANIM_driver_vars_can_paste()

bool ANIM_driver_vars_can_paste ( )

Checks if there are driver variables in the copy/paste buffer.

Definition at line 701 of file drivers.cc.

References BLI_listbase_is_empty(), and driver_vars_copybuf.

◆ ANIM_driver_vars_copy()

bool ANIM_driver_vars_copy ( ReportList * reports,
FCurve * fcu )

◆ ANIM_driver_vars_copybuf_free()

void ANIM_driver_vars_copybuf_free ( )

Clear copy-paste buffer for driver variable sets.

Note
This function frees any MEM_calloc'ed copy/paste buffer data.

Definition at line 685 of file drivers.cc.

References BLI_listbase_clear(), driver_free_variable(), driver_vars_copybuf, ListBase::first, and DriverVar::next.

Referenced by ANIM_copy_as_driver(), ANIM_driver_vars_copy(), and WM_exit_ex().

◆ ANIM_driver_vars_paste()

◆ ANIM_drivers_copybuf_free()

void ANIM_drivers_copybuf_free ( )

Clear copy-paste buffer for drivers.

Note
This function frees any MEM_calloc'ed copy/paste buffer data.

Definition at line 564 of file drivers.cc.

References BKE_fcurve_free(), and channeldriver_copypaste_buf.

Referenced by ANIM_copy_as_driver(), ANIM_copy_driver(), and WM_exit_ex().

◆ ANIM_get_keyingset_for_autokeying()

◆ ANIM_keying_sets_enum_itemf()

const EnumPropertyItem * ANIM_keying_sets_enum_itemf ( bContext * C,
PointerRNA * ptr,
PropertyRNA * prop,
bool * r_free )

◆ ANIM_keyingset_context_ok_poll()

bool ANIM_keyingset_context_ok_poll ( bContext * C,
KeyingSet * keyingset )

◆ ANIM_keyingset_find_id()

bool ANIM_keyingset_find_id ( KeyingSet * keyingset,
ID * id )

Check if the ID appears in the paths specified by the KeyingSet.

Definition at line 666 of file keyingsets.cc.

References BLI_findptr(), ELEM, offsetof, and KeyingSet::paths.

Referenced by insert_key_with_keyingset().

◆ ANIM_keyingset_get_from_enum_type()

KeyingSet * ANIM_keyingset_get_from_enum_type ( Scene * scene,
int type )

Get the keying set from enum values generated in ANIM_keying_sets_enum_itemf.

Type is the Keying Set the user specified to use when calling the operator:

Parameters
type
  • == 0: use scene's active Keying Set.
  • > 0: use a user-defined Keying Set from the active scene.
  • < 0: use a builtin Keying Set.

Definition at line 846 of file keyingsets.cc.

References BLI_findlink(), and builtin_keyingsets.

Referenced by insert_key_exec(), and keyingset_get_from_op_with_error().

◆ ANIM_keyingset_get_from_idname()

KeyingSet * ANIM_keyingset_get_from_idname ( Scene * scene,
const char * idname )

Definition at line 861 of file keyingsets.cc.

References BLI_findstring(), builtin_keyingsets, and offsetof.

Referenced by keyingset_get_from_op_with_error().

◆ ANIM_keyingset_info_find_name()

KeyingSetInfo * ANIM_keyingset_info_find_name ( const char name[])

Find KeyingSet type info given a name.

Definition at line 570 of file keyingsets.cc.

References BLI_findstring(), keyingset_type_infos, and offsetof.

Referenced by ANIM_keyingset_context_ok_poll(), and ANIM_validate_keyingset().

◆ ANIM_keyingset_info_register()

void ANIM_keyingset_info_register ( KeyingSetInfo * keyingset_info)

◆ ANIM_keyingset_info_unregister()

void ANIM_keyingset_info_unregister ( Main * bmain,
KeyingSetInfo * keyingset_info )

Remove the given KeyingSetInfo from the list of type infos, and also remove the builtin set if appropriate.

Definition at line 626 of file keyingsets.cc.

References BKE_keyingset_free_paths(), BLI_freelinkN(), BLI_remlink(), BLI_remlink_safe(), builtin_keyingsets, ListBase::first, KeyingSetInfo::idname, keyingset_type_infos, LISTBASE_FOREACH_MUTABLE, MEM_freeN(), scene, Main::scenes, and STREQ.

◆ ANIM_keyingset_infos_exit()

void ANIM_keyingset_infos_exit ( )

◆ ANIM_keyingset_visit_for_search()

void ANIM_keyingset_visit_for_search ( const bContext * C,
PointerRNA * ptr,
PropertyRNA * prop,
const char * edit_text,
blender::FunctionRef< void(StringPropertySearchVisitParams)> visit_fn )

Definition at line 794 of file keyingsets.cc.

References anim_keyingset_visit_for_search_impl().

◆ ANIM_keyingset_visit_for_search_no_poll()

void ANIM_keyingset_visit_for_search_no_poll ( const bContext * C,
PointerRNA * ptr,
PropertyRNA * prop,
const char * edit_text,
blender::FunctionRef< void(StringPropertySearchVisitParams)> visit_fn )

◆ ANIM_paste_driver()

bool ANIM_paste_driver ( ReportList * reports,
ID * id,
const char rna_path[],
int array_index,
short flag )

Main Driver Management API calls.

Add a new driver for the specified property on the given ID block or replace an existing one with the driver + driver-curve data from the buffer.

Definition at line 628 of file drivers.cc.

References FCurve::bezt, BKE_report(), BKE_reportf(), channeldriver_copypaste_buf, copy_fmodifiers(), FCurve::driver, DRIVER_FCURVE_EMPTY, FCurve::extend, fcurve_copy_driver(), FCurve::fpt, MEM_dupallocN, FCurve::modifiers, ptr, RNA_id_pointer_create(), RNA_path_resolve_property(), RPT_ERROR, FCurve::totvert, and verify_driver_fcurve().

Referenced by paste_driver_button_exec().

◆ ANIM_relative_keyingset_add_source() [1/2]

void ANIM_relative_keyingset_add_source ( blender::Vector< PointerRNA > & sources,
ID * id )

◆ ANIM_relative_keyingset_add_source() [2/2]

◆ ANIM_remove_driver()

bool ANIM_remove_driver ( ID * id,
const char rna_path[],
int array_index )

Main Driver Management API calls.

Remove the driver for the specified property on the given ID block.

Returns
Whether any driver was removed.

Definition at line 523 of file drivers.cc.

References BKE_animdata_from_id(), BKE_fcurve_free(), BKE_fcurve_iter_step(), BLI_remlink(), DRIVER_FCURVE_LOOKUP_ONLY, AnimData::drivers, ListBase::first, FCurve::next, and verify_driver_fcurve().

Referenced by blender::ed::outliner::do_outliner_drivers_editop(), graph_driver_delete_invalid_exec(), pyrna_struct_driver_remove(), and remove_driver_button_exec().

◆ ANIM_scene_get_active_keyingset()

◆ ANIM_scene_get_keyingset_index()

int ANIM_scene_get_keyingset_index ( Scene * scene,
KeyingSet * keyingset )

Get the index of the Keying Set provided, for the given Scene.

Definition at line 699 of file keyingsets.cc.

References BLI_findindex(), and builtin_keyingsets.

◆ ANIM_validate_keyingset()

blender::animrig::ModifyKeyReturn ANIM_validate_keyingset ( bContext * C,
blender::Vector< PointerRNA > * sources,
KeyingSet * keyingset )

Given a KeyingSet and context info, validate Keying Set's paths. This is only really necessary with relative/built-in KeyingSets where their list of paths is dynamically generated based on the current context info.

Note
Passing sources as pointer because it can be a nullptr.
Returns
0 if succeeded, otherwise an error code: #eModifyKey_Returns.

Definition at line 933 of file keyingsets.cc.

References ANIM_keyingset_info_find_name(), BKE_keyingset_free_paths(), BLI_listbase_is_empty(), KeyingSet::flag, KeyingSetInfo::iter, KEYINGSET_ABSOLUTE, KeyingSet::paths, KeyingSetInfo::poll, RKS_ITER_overrides_list(), and KeyingSet::typeinfo.

Referenced by ANIM_apply_keyingset(), pose_select_same_keyingset(), and blender::ed::object::select_grouped_keyingset().

◆ ED_keyframes_add()

void ED_keyframes_add ( FCurve * fcu,
int num_keys_to_add )

Add the given number of keyframes to the FCurve. Their coordinates are uninitialized, so the curve should not be used without further attention.

The newly created keys are selected, existing keys are not touched.

This can be used to allocate all the keys at once, and then update them afterwards.

Definition at line 118 of file editors/animation/keyframing.cc.

References FCurve::bezt, BEZT_IPO_BEZ, BLI_assert_msg, BezTriple::f1, BezTriple::f2, BezTriple::f3, BezTriple::h1, BezTriple::h2, HD_AUTO_ANIM, BezTriple::ipo, MEM_recallocN, SELECT, and FCurve::totvert.

Referenced by blender::bke::tests::testcurve_with_duplicates().

◆ fcurve_frame_has_keyframe()

bool fcurve_frame_has_keyframe ( const FCurve * fcu,
float frame )

Lesser Keyframe Checking API call.

Checks if some F-Curve has a keyframe for a given frame.

Note
Used for the buttons to check for keyframes.

Definition at line 1367 of file editors/animation/keyframing.cc.

References FCurve::bezt, BKE_fcurve_bezt_binarysearch_index(), ELEM, FCURVE_MUTED, FCurve::flag, and FCurve::totvert.

Referenced by achannel_setting_slider_cb(), achannel_setting_slider_nla_curve_cb(), assigned_action_has_keyframe_at(), and ui_but_anim_flag().

◆ fcurve_is_changed()

bool fcurve_is_changed ( PointerRNA ptr,
PropertyRNA * prop,
FCurve * fcu,
const AnimationEvalContext * anim_eval_context )

Lesser Keyframe Checking API call.

  • Returns whether the current value of a given property differs from the interpolated value.
  • Used for button drawing.

Definition at line 1392 of file editors/animation/keyframing.cc.

References FCurve::array_index, calculate_fcurve(), compare_ff_relative(), blender::animrig::get_rna_values(), PathResolvedRNA::prop, PathResolvedRNA::prop_index, PathResolvedRNA::ptr, and ptr.

Referenced by ui_but_anim_flag().

◆ id_frame_has_keyframe()

bool id_frame_has_keyframe ( ID * id,
float frame )

Main Keyframe Checking API call.

Checks whether a keyframe exists for the given ID-block one the given frame. It is recommended to call this method over the other keyframe-checkers directly, in case some detail of the implementation changes...

Parameters
frameThe value of this is quite often result of BKE_scene_ctime_get()

Definition at line 1472 of file editors/animation/keyframing.cc.

References assigned_action_has_keyframe_at(), BKE_animdata_from_id(), GS, ID_OB, ID_SCE, and object_frame_has_keyframe().

Referenced by blender::animrig::autokeyframe_cfra_can_key(), and draw_selected_name().

◆ update_autoflags_fcurve()

void update_autoflags_fcurve ( FCurve * fcu,
bContext * C,
ReportList * reports,
PointerRNA * ptr )

Lesser Key-framing API call.

Update integer/discrete flags of the FCurve (used when creating/inserting keyframes, but also through RNA when editing an ID prop, see #37103).

Definition at line 82 of file editors/animation/keyframing.cc.

References BKE_report(), BKE_reportf(), PointerRNA::data, FCurve::flag, NA_EDITED, ID::name, NC_ANIMATION, ND_KEYFRAME, PointerRNA::owner_id, ptr, FCurve::rna_path, RNA_path_resolve_property(), RPT_, RPT_ERROR, blender::animrig::update_autoflags_fcurve_direct(), and WM_event_add_notifier().

◆ verify_driver_fcurve()

FCurve * verify_driver_fcurve ( ID * id,
const char rna_path[],
int array_index,
eDriverFCurveCreationMode creation_mode )

Get (or add relevant data to be able to do so) F-Curve from the driver stack, for the given Animation Data block. This assumes that all the destinations are valid.

Note
This low-level function shouldn't be used directly for most tools, although there are special cases where this approach is preferable.

Definition at line 50 of file drivers.cc.

References alloc_driver_fcurve(), BKE_animdata_ensure_id(), BKE_animdata_from_id(), BKE_fcurve_find(), BLI_addtail(), DRIVER_FCURVE_LOOKUP_ONLY, AnimData::drivers, and ELEM.

Referenced by add_driver_with_target(), ANIM_add_driver(), ANIM_copy_driver(), ANIM_paste_driver(), ANIM_remove_driver(), and ui_but_anim_expression_create().

Variable Documentation

◆ prop_driver_create_mapping_types

const EnumPropertyItem prop_driver_create_mapping_types[]
extern

Mapping Types enum for operators.

Note
Used by ANIM_OT_driver_button_add and UI_OT_eyedropper_driver.

Definition at line 828 of file drivers.cc.

Referenced by ANIM_OT_driver_button_add_menu(), driver_mapping_type_itemf(), and UI_OT_eyedropper_driver().