Blender
V3.3
|
Go to the source code of this file.
Classes | |
struct | KeyingSetInfo |
Functions | |
Key-Framing Management | |
eInsertKeyFlags | ANIM_get_keyframing_flags (struct Scene *scene, bool use_autokey_mode) |
struct bAction * | ED_id_action_ensure (struct Main *bmain, struct ID *id) |
struct FCurve * | ED_action_fcurve_ensure (struct Main *bmain, struct bAction *act, const char group[], struct PointerRNA *ptr, const char rna_path[], int array_index) |
struct FCurve * | ED_action_fcurve_find (struct bAction *act, const char rna_path[], int array_index) |
void | update_autoflags_fcurve (struct FCurve *fcu, struct bContext *C, struct ReportList *reports, struct PointerRNA *ptr) |
Lesser Key-framing API call. More... | |
int | insert_bezt_fcurve (struct FCurve *fcu, const struct BezTriple *bezt, eInsertKeyFlags flag) |
Lesser Key-framing API call. More... | |
int | insert_vert_fcurve (struct FCurve *fcu, float x, float y, eBezTriple_KeyframeType keyframe_type, eInsertKeyFlags flag) |
Main Key-framing API call. More... | |
bool | insert_keyframe_direct (struct ReportList *reports, struct PointerRNA ptr, struct PropertyRNA *prop, struct FCurve *fcu, const struct AnimationEvalContext *anim_eval_context, eBezTriple_KeyframeType keytype, struct NlaKeyframingContext *nla, eInsertKeyFlags flag) |
Secondary Insert Key-framing API call. More... | |
int | insert_keyframe (struct Main *bmain, struct ReportList *reports, struct ID *id, struct bAction *act, const char group[], const char rna_path[], int array_index, const struct AnimationEvalContext *anim_eval_context, eBezTriple_KeyframeType keytype, struct ListBase *nla_cache, eInsertKeyFlags flag) |
Main Insert Key-framing API call. More... | |
int | delete_keyframe (struct Main *bmain, struct ReportList *reports, struct ID *id, struct bAction *act, const char rna_path[], int array_index, float cfra) |
Main Delete Key-Framing API call. More... | |
Auto-Key-Framing | |
| |
#define | IS_AUTOKEY_ON(scene) ((scene) ? ((scene)->toolsettings->autokey_mode & AUTOKEY_ON) : (U.autokey_mode & AUTOKEY_ON)) |
#define | IS_AUTOKEY_MODE(scene, mode) |
#define | IS_AUTOKEY_FLAG(scene, flag) |
bool | autokeyframe_cfra_can_key (const struct Scene *scene, struct ID *id) |
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 } |
typedef enum eCreateDriverFlags | eCreateDriverFlags |
typedef enum eCreateDriver_MappingTypes | eCreateDriver_MappingTypes |
typedef enum eDriverFCurveCreationMode | eDriverFCurveCreationMode |
EnumPropertyItem | prop_driver_create_mapping_types [] |
struct FCurve * | verify_driver_fcurve (struct ID *id, const char rna_path[], int array_index, eDriverFCurveCreationMode creation_mode) |
struct FCurve * | alloc_driver_fcurve (const char rna_path[], int array_index, eDriverFCurveCreationMode creation_mode) |
int | ANIM_add_driver_with_target (struct ReportList *reports, struct ID *dst_id, const char dst_path[], int dst_index, struct ID *src_id, const char src_path[], int src_index, short flag, int driver_type, short mapping_type) |
Main Driver Management API calls. More... | |
int | ANIM_add_driver (struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag, int type) |
Main Driver Management API calls. More... | |
bool | ANIM_remove_driver (struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag) |
Main Driver Management API calls. More... | |
void | ANIM_drivers_copybuf_free (void) |
void | ANIM_driver_vars_copybuf_free (void) |
bool | ANIM_driver_can_paste (void) |
bool | ANIM_copy_driver (struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag) |
Main Driver Management API calls. More... | |
bool | ANIM_paste_driver (struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag) |
Main Driver Management API calls. More... | |
bool | ANIM_driver_vars_can_paste (void) |
bool | ANIM_driver_vars_copy (struct ReportList *reports, struct FCurve *fcu) |
bool | ANIM_driver_vars_paste (struct ReportList *reports, struct FCurve *fcu, bool replace) |
void | ANIM_copy_as_driver (struct ID *target_id, const char *target_path, const char *var_name) |
#define ANIM_KS_AVAILABLE_ID "Available" |
Definition at line 684 of file ED_keyframing.h.
#define ANIM_KS_LOC_ROT_SCALE_CPROP_ID "LocRotScaleCProp" |
Definition at line 683 of file ED_keyframing.h.
#define ANIM_KS_LOC_ROT_SCALE_ID "LocRotScale" |
Definition at line 682 of file ED_keyframing.h.
#define ANIM_KS_LOCATION_ID "Location" |
Definition at line 679 of file ED_keyframing.h.
#define ANIM_KS_ROTATION_ID "Rotation" |
Definition at line 680 of file ED_keyframing.h.
#define ANIM_KS_SCALING_ID "Scaling" |
Definition at line 681 of file ED_keyframing.h.
#define ANIM_KS_WHOLE_CHARACTER_ID "WholeCharacter" |
Definition at line 685 of file ED_keyframing.h.
#define ANIM_KS_WHOLE_CHARACTER_SELECTED_ID "WholeCharacterSelected" |
Definition at line 686 of file ED_keyframing.h.
Check if a flag is set for auto-key-framing (per scene takes precedence).
Definition at line 589 of file ED_keyframing.h.
Check the mode for auto-keyframing (per scene takes precedence).
Definition at line 585 of file ED_keyframing.h.
#define IS_AUTOKEY_ON | ( | scene | ) | ((scene) ? ((scene)->toolsettings->autokey_mode & AUTOKEY_ON) : (U.autokey_mode & AUTOKEY_ON)) |
Check if auto-key-framing is enabled (per scene takes precedence).
Definition at line 582 of file ED_keyframing.h.
typedef void(* cbKeyingSet_Generate) (struct KeyingSetInfo *ksi, struct bContext *C, struct KeyingSet *ks, struct PointerRNA *ptr) |
Definition at line 211 of file ED_keyframing.h.
typedef void(* cbKeyingSet_Iterator) (struct KeyingSetInfo *ksi, struct bContext *C, struct KeyingSet *ks) |
Definition at line 207 of file ED_keyframing.h.
typedef bool(* cbKeyingSet_Poll) (struct KeyingSetInfo *ksi, struct bContext *C) |
Definition at line 205 of file ED_keyframing.h.
typedef enum eAnimFilterFlags eAnimFilterFlags |
Filter flags for id_frame_has_keyframe.
v3d->keyflags
). typedef enum eCreateDriver_MappingTypes eCreateDriver_MappingTypes |
typedef enum eCreateDriverFlags eCreateDriverFlags |
typedef enum eDriverFCurveCreationMode eDriverFCurveCreationMode |
typedef enum eModifyKey_Modes eModifyKey_Modes |
typedef enum eModifyKey_Returns eModifyKey_Returns |
typedef struct KeyingSetInfo KeyingSetInfo |
enum eAnimFilterFlags |
Filter flags for id_frame_has_keyframe.
v3d->keyflags
). Enumerator | |
---|---|
ANIMFILTER_KEYS_LOCAL | |
ANIMFILTER_KEYS_MUTED | |
ANIMFILTER_KEYS_ACTIVE | |
ANIMFILTER_KEYS_NOMAT | |
ANIMFILTER_KEYS_NOSKEY |
Definition at line 639 of file ED_keyframing.h.
Definition at line 407 of file ED_keyframing.h.
enum eCreateDriverFlags |
Enumerator | |
---|---|
CREATEDRIVER_WITH_DEFAULT_DVAR | create drivers with a default variable for nicer UI |
CREATEDRIVER_WITH_FMODIFIER | create drivers with Generator FModifier (for backwards compat) |
Definition at line 399 of file ED_keyframing.h.
Enumerator | |
---|---|
DRIVER_FCURVE_LOOKUP_ONLY | |
DRIVER_FCURVE_KEYFRAMES | |
DRIVER_FCURVE_GENERATOR | |
DRIVER_FCURVE_EMPTY |
Definition at line 431 of file ED_keyframing.h.
enum eModifyKey_Modes |
Enumerator | |
---|---|
MODIFYKEY_MODE_INSERT | |
MODIFYKEY_MODE_DELETE |
Definition at line 258 of file ED_keyframing.h.
enum eModifyKey_Returns |
Enumerator | |
---|---|
MODIFYKEY_INVALID_CONTEXT | |
MODIFYKEY_MISSING_TYPEINFO |
Definition at line 264 of file ED_keyframing.h.
struct FCurve* alloc_driver_fcurve | ( | const char | rna_path[], |
int | array_index, | ||
eDriverFCurveCreationMode | creation_mode | ||
) |
Definition at line 91 of file drivers.c.
References add_fmodifier(), FCurve::array_index, FCurve::auto_smoothing, BEZT_KEYTYPE_KEYFRAME, BKE_fcurve_create(), BKE_fcurve_handles_recalc(), BLI_strdup(), FCurve::driver, DRIVER_FCURVE_EMPTY, DRIVER_FCURVE_GENERATOR, DRIVER_FCURVE_LOOKUP_ONLY, ELEM, FCurve::extend, FCURVE_EXTRAPOLATE_LINEAR, FCURVE_SELECTED, FCURVE_VISIBLE, FCurve::flag, FMODIFIER_TYPE_GENERATOR, insert_vert_fcurve(), INSERTKEY_FAST, INSERTKEY_NO_USERPREF, MEM_callocN, FCurve::modifiers, and FCurve::rna_path.
Referenced by ANIM_copy_as_driver(), and verify_driver_fcurve().
int ANIM_add_driver | ( | struct ReportList * | reports, |
struct ID * | id, | ||
const char | rna_path[], | ||
int | array_index, | ||
short | flag, | ||
int | type | ||
) |
Main Driver Management API calls.
Add a new driver for the specified property on the given ID block
Definition at line 395 of file drivers.c.
References FCurve::array_index, BKE_reportf(), BLI_snprintf(), BLI_str_rstrip_float_zero(), BLI_strncpy(), CREATEDRIVER_WITH_DEFAULT_DVAR, CREATEDRIVER_WITH_FMODIFIER, FCurve::driver, driver_add_new_variable(), driver_change_variable_type(), DRIVER_TYPE_PYTHON, DVAR_TYPE_TRANSFORM_CHAN, ChannelDriver::expression, FCurve::flag, id, ID::name, NULL, PROP_BOOLEAN, PROP_FLOAT, PROP_INT, ptr, RNA_id_pointer_create(), FCurve::rna_path, RNA_path_resolve_property(), RNA_property_array_length(), RNA_property_boolean_get(), RNA_property_boolean_get_index(), RNA_property_float_get(), RNA_property_float_get_index(), RNA_property_int_get(), RNA_property_int_get_index(), RNA_property_type(), RPT_ERROR, type, ChannelDriver::type, and verify_driver_fcurve().
Referenced by add_driver_button_invoke(), add_driver_button_none(), ANIM_add_driver_with_target(), do_outliner_drivers_editop(), and pyrna_struct_driver_add().
int ANIM_add_driver_with_target | ( | struct ReportList * | reports, |
struct ID * | dst_id, | ||
const char | dst_path[], | ||
int | dst_index, | ||
struct 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.
flag | eCreateDriverFlags |
driver_type | eDriver_Types |
mapping_type | eCreateDriver_MappingTypes |
Definition at line 281 of file drivers.c.
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, FCurve::flag, len, MIN2, 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().
int ANIM_apply_keyingset | ( | struct bContext * | C, |
ListBase * | dsources, | ||
struct bAction * | act, | ||
struct KeyingSet * | ks, | ||
short | 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.
Definition at line 1038 of file keyingsets.c.
References ANIM_get_keyframing_flags(), ANIM_validate_keyingset(), KS_Path::array_index, BKE_animsys_eval_context_construct(), BKE_animsys_free_nla_keyframing_context_cache(), BKE_reportf(), BLI_assert, C, CTX_data_depsgraph_pointer(), CTX_data_main(), CTX_data_scene(), CTX_wm_reports(), DEG_id_tag_update(), delete_keyframe(), depsgraph, error(), ListBase::first, KS_Path::flag, KS_Path::group, KS_Path::groupmode, GS, KS_Path::id, Object::id, ID_OB, ID_RECALC_ANIMATION_NO_FLUSH, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, insert_keyframe(), ToolSettings::keyframe_type, KS_Path::keyingflag, KeyingSet::keyingflag, KS_Path::keyingoverride, KeyingSet::keyingoverride, keyingset_apply_keying_flags(), KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_KSNAME, KSP_GROUP_NONE, MODIFYKEY_MODE_DELETE, MODIFYKEY_MODE_INSERT, NA_ADDED, KeyingSet::name, ID::name, NC_ANIMATION, ND_KEYFRAME, KS_Path::next, NULL, KeyingSet::paths, ptr, RNA_id_pointer_create(), KS_Path::rna_path, RNA_path_resolve_property(), RNA_property_array_length(), RPT_WARNING, scene, Scene::toolsettings, and WM_main_add_notifier().
Referenced by autokeyframe_object(), autokeyframe_pose(), delete_key_using_keying_set(), ED_autokeyframe_object(), ED_autokeyframe_pchan(), ED_view3d_camera_autokey(), insert_key_exec(), pose_clear_transform_generic_exec(), poseAnim_mapping_autoKeyframe(), poselib_add_exec(), and poselib_keytag_pose().
Find builtin KeyingSet by name.
Definition at line 531 of file keyingsets.c.
References builtin_keyingsets, ListBase::first, KeyingSet::idname, KeyingSet::next, NULL, and STREQ.
Referenced by ANIM_get_keyingset_for_autokeying(), autokeyframe_object(), autokeyframe_pose(), pose_flip_quats_exec(), and poselib_add_exec().
Create a driver & variable that reads the specified property, and store it in the buffers for Paste Driver and Paste Variables.
Definition at line 792 of file drivers.c.
References alloc_driver_fcurve(), ANIM_driver_vars_copybuf_free(), ANIM_drivers_copybuf_free(), BLI_strncpy(), channeldriver_copypaste_buf, FCurve::driver, driver_add_new_variable(), DRIVER_FCURVE_KEYFRAMES, driver_variables_copy(), driver_vars_copybuf, ChannelDriver::expression, GS, DriverTarget::id, DriverTarget::idtype, MEM_dupallocN, DriverVar::name, ID::name, NULL, DriverTarget::rna_path, DriverVar::targets, and ChannelDriver::variables.
Referenced by copy_as_driver_button_exec().
bool ANIM_copy_driver | ( | struct ReportList * | reports, |
struct ID * | id, | ||
const char | rna_path[], | ||
int | array_index, | ||
short | flag | ||
) |
Returns whether there is a driver in the copy/paste buffer to paste.
Definition at line 580 of file drivers.c.
References channeldriver_copypaste_buf, and NULL.
Referenced by ui_popup_context_menu_for_button().
Checks if there are driver variables in the copy/paste buffer.
Definition at line 708 of file drivers.c.
References BLI_listbase_is_empty(), and driver_vars_copybuf.
bool ANIM_driver_vars_copy | ( | struct ReportList * | reports, |
struct FCurve * | fcu | ||
) |
Copy the given driver's variables to the buffer.
Definition at line 715 of file drivers.c.
References ANIM_driver_vars_copybuf_free(), BKE_report(), BLI_listbase_is_empty(), FCurve::driver, driver_variables_copy(), driver_vars_copybuf, ELEM, NULL, RPT_ERROR, and ChannelDriver::variables.
Referenced by graph_driver_vars_copy_exec().
Clear copy-paste buffer for driver variable sets.
Definition at line 692 of file drivers.c.
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().
bool ANIM_driver_vars_paste | ( | struct ReportList * | reports, |
struct FCurve * | fcu, | ||
bool | replace | ||
) |
Paste the variables in the buffer to the given FCurve.
Definition at line 737 of file drivers.c.
References FCurve::driver, and NULL.
Referenced by graph_driver_vars_paste_exec().
Clear copy-paste buffer for drivers.
Definition at line 571 of file drivers.c.
References BKE_fcurve_free(), channeldriver_copypaste_buf, and NULL.
Referenced by ANIM_copy_as_driver(), ANIM_copy_driver(), and WM_exit_ex().
eInsertKeyFlags ANIM_get_keyframing_flags | ( | struct Scene * | scene, |
bool | use_autokey_mode | ||
) |
Get the active settings for key-framing settings from context (specifically the given scene)
use_autokey_mode | include settings from key-framing mode in the result (i.e. replace only). |
Definition at line 82 of file keyframing.c.
References INSERTKEY_CYCLE_AWARE, INSERTKEY_MATRIX, INSERTKEY_NEEDED, INSERTKEY_NOFLAGS, INSERTKEY_REPLACE, INSERTKEY_XYZ2RGB, IS_AUTOKEY_FLAG, IS_AUTOKEY_MODE, and scene.
Referenced by achannel_setting_slider_cb(), achannel_setting_slider_nla_curve_cb(), achannel_setting_slider_shapekey_cb(), add_default_keyingset_exec(), add_keyingset_button_exec(), ANIM_apply_keyingset(), autokeyframe_object(), autokeyframe_pose(), ED_autokeyframe_property(), insert_action_keys(), insert_graph_keys(), and insert_key_button_exec().
struct KeyingSet* ANIM_get_keyingset_for_autokeying | ( | const struct Scene * | scene, |
const char * | transformKSName | ||
) |
Get Keying Set to use for Auto-Key-Framing some transforms.
const struct EnumPropertyItem* ANIM_keying_sets_enum_itemf | ( | struct bContext * | C, |
struct PointerRNA * | ptr, | ||
struct PropertyRNA * | prop, | ||
bool * | r_free | ||
) |
Dynamically populate an enum of Keying Sets.
Check if KeyingSet can be used in the current context.
Definition at line 878 of file keyingsets.c.
References ANIM_keyingset_info_find_name(), C, KeyingSet::flag, KEYINGSET_ABSOLUTE, NULL, KeyingSetInfo::poll, and KeyingSet::typeinfo.
Referenced by ANIM_keying_sets_enum_itemf(), and anim_keyingset_visit_for_search_impl().
Check if the ID appears in the paths specified by the KeyingSet.
Definition at line 632 of file keyingsets.c.
References BLI_findptr(), ELEM, NULL, and KeyingSet::paths.
Referenced by insert_key_exec().
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:
type |
|
Definition at line 847 of file keyingsets.c.
References Scene::active_keyingset, BLI_findlink(), builtin_keyingsets, Scene::keyingsets, NULL, scene, and type.
Referenced by keyingset_get_from_op_with_error().
Definition at line 864 of file keyingsets.c.
References BLI_findstring(), builtin_keyingsets, Scene::keyingsets, NULL, and scene.
Referenced by keyingset_get_from_op_with_error().
KeyingSetInfo* ANIM_keyingset_info_find_name | ( | const char | name[] | ) |
Find KeyingSet type info given a name.
Definition at line 520 of file keyingsets.c.
References BLI_findstring(), keyingset_type_infos, and NULL.
Referenced by ANIM_keyingset_context_ok_poll(), and ANIM_validate_keyingset().
void ANIM_keyingset_info_register | ( | KeyingSetInfo * | ksi | ) |
Add the given KeyingSetInfo to the list of type infos, and create an appropriate builtin set too.
Definition at line 566 of file keyingsets.c.
References BKE_keyingset_add(), BLI_addtail(), BLI_strncpy(), builtin_keyingsets, KeyingSetInfo::description, KeyingSet::description, KeyingSetInfo::idname, KeyingSetInfo::keyingflag, keyingset_type_infos, KeyingSetInfo::name, and KeyingSet::typeinfo.
void ANIM_keyingset_info_unregister | ( | struct Main * | bmain, |
KeyingSetInfo * | ksi | ||
) |
Remove the given KeyingSetInfo from the list of type infos, and also remove the builtin set if appropriate.
Definition at line 585 of file keyingsets.c.
References BKE_keyingset_free(), BLI_freelinkN(), BLI_remlink(), BLI_remlink_safe(), builtin_keyingsets, ListBase::first, Scene::id, KeyingSetInfo::idname, keyingset_type_infos, Scene::keyingsets, MEM_freeN, KeyingSet::next, ID::next, scene, Main::scenes, STREQ, and KeyingSet::typeinfo.
Definition at line 613 of file keyingsets.c.
References BKE_keyingsets_free(), BLI_freelinkN(), builtin_keyingsets, ExtensionRNA::data, ListBase::first, ExtensionRNA::free, keyingset_type_infos, KeyingSetInfo::next, next, and KeyingSetInfo::rna_ext.
Referenced by WM_exit_ex().
void ANIM_keyingset_visit_for_search | ( | const struct bContext * | C, |
struct PointerRNA * | ptr, | ||
struct PropertyRNA * | prop, | ||
const char * | edit_text, | ||
StringPropertySearchVisitFunc | visit_fn, | ||
void * | visit_user_data | ||
) |
void ANIM_keyingset_visit_for_search_no_poll | ( | const struct bContext * | C, |
struct PointerRNA * | ptr, | ||
struct PropertyRNA * | prop, | ||
const char * | edit_text, | ||
StringPropertySearchVisitFunc | visit_fn, | ||
void * | visit_user_data | ||
) |
bool ANIM_paste_driver | ( | struct ReportList * | reports, |
struct ID * | id, | ||
const char | rna_path[], | ||
int | array_index, | ||
short | flag | ||
) |
void ANIM_relative_keyingset_add_source | ( | ListBase * | dsources, |
struct ID * | id, | ||
struct StructRNA * | srna, | ||
void * | data | ||
) |
Add another data source for Relative Keying Sets to be evaluated with.
Definition at line 924 of file keyingsets.c.
References BLI_addtail(), data, ELEM, MEM_callocN, NULL, tRKS_DSource::ptr, RNA_id_pointer_create(), and RNA_pointer_create().
Referenced by autokeyframe_object(), autokeyframe_pose(), ED_autokeyframe_object(), ED_autokeyframe_pchan(), ED_view3d_camera_autokey(), pose_clear_transform_generic_exec(), poseAnim_mapping_autoKeyframe(), and poselib_keytag_pose().
bool ANIM_remove_driver | ( | struct ReportList * | reports, |
struct ID * | id, | ||
const char | rna_path[], | ||
int | array_index, | ||
short | flag | ||
) |
Get the active Keying Set for the given scene.
Get the index of the Keying Set provided, for the given Scene.
Definition at line 665 of file keyingsets.c.
References BLI_findindex(), builtin_keyingsets, Scene::keyingsets, NULL, and scene.
eModifyKey_Returns ANIM_validate_keyingset | ( | struct bContext * | C, |
ListBase * | dsources, | ||
struct KeyingSet * | ks | ||
) |
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.
Definition at line 954 of file keyingsets.c.
References ANIM_keyingset_info_find_name(), BKE_keyingset_free(), BLI_listbase_is_empty(), C, KeyingSet::flag, KeyingSetInfo::iter, KEYINGSET_ABSOLUTE, MODIFYKEY_INVALID_CONTEXT, MODIFYKEY_MISSING_TYPEINFO, NULL, KeyingSet::paths, KeyingSetInfo::poll, RKS_ITER_overrides_list(), and KeyingSet::typeinfo.
Referenced by ANIM_apply_keyingset(), pose_select_same_keyingset(), and select_grouped_keyingset().
Auto-keyframing feature - checks for whether anything should be done for the current frame.
int delete_keyframe | ( | struct Main * | bmain, |
struct ReportList * | reports, | ||
struct ID * | id, | ||
struct bAction * | act, | ||
const char | rna_path[], | ||
int | array_index, | ||
float | cfra | ||
) |
Main Delete Key-Framing API call.
Use this to delete keyframe on current frame for relevant channel. Will perform checks just in case.
Definition at line 1723 of file keyframing.c.
References AnimData::action, BKE_animdata_from_id(), BKE_fcurve_is_protected(), BKE_idtype_idcode_to_name(), BKE_nla_tweakedit_remap(), BKE_report(), BKE_reportf(), deg_tag_after_keyframe_delete(), delete_keyframe_fcurve(), ED_action_fcurve_find(), ELEM, GS, id, ID::name, NLATIME_CONVERT_UNMAP, NULL, ptr, ret, RNA_id_pointer_create(), FCurve::rna_path, RNA_path_resolve_property(), RNA_property_array_length(), RPT_ERROR, and RPT_WARNING.
Referenced by ANIM_apply_keyingset(), delete_key_button_exec(), and pyrna_struct_keyframe_delete().
struct FCurve* ED_action_fcurve_ensure | ( | struct Main * | bmain, |
struct bAction * | act, | ||
const char | group[], | ||
struct PointerRNA * | ptr, | ||
const char | rna_path[], | ||
int | array_index | ||
) |
Get (or add relevant data to be able to do so) F-Curve from the Active Action, for the given Animation Data block. This assumes that all the destinations are valid.
Definition at line 173 of file keyframing.c.
References action_group_colors_sync(), action_groups_add_channel(), action_groups_add_new(), FCurve::array_index, FCurve::auto_smoothing, BKE_action_group_find_name(), BKE_fcurve_create(), BKE_fcurve_find(), BLI_addtail(), BLI_findlink(), BLI_listbase_is_empty(), BLI_strdup(), bAction::curves, bActionGroup::customCol, PointerRNA::data, DEG_relations_tag_update(), ELEM, FCURVE_ACTIVE, FCURVE_SELECTED, FCURVE_VISIBLE, FCurve::flag, NULL, PointerRNA::owner_id, Object::pose, ptr, FCurve::rna_path, and PointerRNA::type.
Referenced by achannel_setting_slider_shapekey_cb(), ED_object_parent_set(), followpath_path_animate_exec(), gpencil_stroke_path_animation(), and insert_keyframe_fcurve_value().
struct FCurve* ED_action_fcurve_find | ( | struct bAction * | act, |
const char | rna_path[], | ||
int | array_index | ||
) |
Find the F-Curve from the Active Action, for the given Animation Data block. This assumes that all the destinations are valid.
Definition at line 164 of file keyframing.c.
References BKE_fcurve_find(), bAction::curves, ELEM, and NULL.
Referenced by clear_keyframe(), delete_keyframe(), and insert_keyframe_fcurve_value().
bool ED_autokeyframe_object | ( | struct bContext * | C, |
struct Scene * | scene, | ||
struct Object * | ob, | ||
struct KeyingSet * | ks | ||
) |
Definition at line 3070 of file keyframing.c.
References ANIM_apply_keyingset(), ANIM_relative_keyingset_add_source(), autokeyframe_cfra_can_key(), BLI_freelistN(), C, RenderData::cfra, Object::id, MODIFYKEY_MODE_INSERT, NULL, Scene::r, and scene.
Referenced by object_clear_transform_generic_exec(), snap_sel_to_grid_exec(), and snap_selected_to_location().
bool ED_autokeyframe_pchan | ( | struct bContext * | C, |
struct Scene * | scene, | ||
struct Object * | ob, | ||
struct bPoseChannel * | pchan, | ||
struct KeyingSet * | ks | ||
) |
Definition at line 3090 of file keyframing.c.
References ANIM_apply_keyingset(), ANIM_relative_keyingset_add_source(), autokeyframe_cfra_can_key(), BLI_freelistN(), C, RenderData::cfra, Object::id, MODIFYKEY_MODE_INSERT, NULL, Scene::r, and scene.
Referenced by pose_flip_quats_exec(), pose_paste_exec(), snap_sel_to_grid_exec(), and snap_selected_to_location().
bool ED_autokeyframe_property | ( | struct bContext * | C, |
struct Scene * | scene, | ||
PointerRNA * | ptr, | ||
PropertyRNA * | prop, | ||
int | rnaindex, | ||
float | cfra, | ||
bool | only_if_property_keyed | ||
) |
Use for auto-key-framing
only_if_property_keyed | if true, auto-key-framing only creates keyframes on already keyed properties. This is by design when using buttons. For other callers such as gizmos or VSE preview transform, creating new animation/keyframes also on non-keyed properties is desired. |
Definition at line 3111 of file keyframing.c.
References ANIM_get_keyframing_flags(), FCurve::array_index, autokeyframe_cfra_can_key(), BKE_animsys_eval_context_construct(), BKE_fcurve_find_by_rna_context_ui(), BLI_assert, C, CTX_data_depsgraph_pointer(), CTX_data_main(), CTX_wm_reports(), depsgraph, FCurve::grp, id, insert_keyframe(), insert_keyframe_direct(), INSERTKEY_DRIVER, IS_AUTOKEY_ON, ToolSettings::keyframe_type, MEM_freeN, NA_EDITED, bActionGroup::name, NC_ANIMATION, ND_KEYFRAME, NULL, PointerRNA::owner_id, ptr, FCurve::rna_path, RNA_path_from_ID_to_property(), scene, Scene::toolsettings, and WM_event_add_notifier().
Referenced by autokeyframe_sequencer_image(), ui_but_anim_autokey(), and WM_gizmo_target_property_anim_autokey().
Get (or add relevant data to be able to do so) the Active Action for the given Animation Data block, given an ID block where the Animation Data should reside.
Definition at line 123 of file keyframing.c.
References AnimData::action, BKE_action_add(), BKE_animdata_action_ensure_idroot(), BKE_animdata_ensure_id(), BKE_animdata_from_id(), BLI_snprintf(), DEG_id_tag_update(), DEG_relations_tag_update(), id, bAction::id, ID_RECALC_ANIMATION_NO_FLUSH, ID::name, and NULL.
Referenced by achannel_setting_slider_shapekey_cb(), AnimationImporter::add_bone_animation_sampled(), AnimationImporter::apply_matrix_curves(), ED_object_parent_set(), followpath_path_animate_exec(), get_animation_curves(), gpencil_stroke_path_animation(), insert_keyframe(), sequencer_paste_animation(), AnimationImporter::translate_animation_OLD(), and AnimationImporter::translate_Animations().
Lesser Keyframe Checking API call.
Checks if some F-Curve has a keyframe for a given frame.
bool fcurve_is_changed | ( | struct PointerRNA | ptr, |
struct PropertyRNA * | prop, | ||
struct FCurve * | fcu, | ||
const struct AnimationEvalContext * | anim_eval_context | ||
) |
Lesser Keyframe Checking API call.
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...
frame | The value of this is quite often result of BKE_scene_ctime_get() |
Definition at line 3036 of file keyframing.c.
References AnimData::action, action_frame_has_keyframe(), BKE_animdata_from_id(), filter(), GS, id, ID_OB, ID_SCE, ID::name, NULL, and object_frame_has_keyframe().
Referenced by autokeyframe_cfra_can_key(), draw_selected_name(), and object_frame_has_keyframe().
int insert_bezt_fcurve | ( | struct FCurve * | fcu, |
const struct BezTriple * | bezt, | ||
eInsertKeyFlags | flag | ||
) |
Lesser Key-framing API call.
Use this when validation of necessary animation data isn't necessary as it already exists, and there is a BezTriple that can be directly copied into the array.
This function adds a given BezTriple to an F-Curve. It will allocate memory for the array if needed, and will insert the BezTriple into a suitable place in chronological order.
int insert_keyframe | ( | struct Main * | bmain, |
struct ReportList * | reports, | ||
struct ID * | id, | ||
struct bAction * | act, | ||
const char | group[], | ||
const char | rna_path[], | ||
int | array_index, | ||
const struct AnimationEvalContext * | anim_eval_context, | ||
eBezTriple_KeyframeType | keytype, | ||
struct ListBase * | nla_cache, | ||
eInsertKeyFlags | flag | ||
) |
Main Insert Key-framing API call.
Use this to create any necessary animation data, and then insert a keyframe using the current value being keyframed, in the relevant place.
flag | Used for special settings that alter the behavior of the keyframe insertion. These include the 'visual' key-framing modes, quick refresh, and extra keyframe filtering. |
array_index | The index to key or -1 keys all array indices. |
bool insert_keyframe_direct | ( | struct ReportList * | reports, |
struct PointerRNA | ptr, | ||
struct PropertyRNA * | prop, | ||
struct FCurve * | fcu, | ||
const struct AnimationEvalContext * | anim_eval_context, | ||
eBezTriple_KeyframeType | keytype, | ||
struct NlaKeyframingContext * | nla, | ||
eInsertKeyFlags | flag | ||
) |
Secondary Insert Key-framing API call.
Use this when validation of necessary animation data is not necessary, since an RNA-pointer to the necessary data being keyframed, and a pointer to the F-Curve to use have both been provided.
This function can't keyframe quaternion channels on some NLA strip types.
keytype | The "keyframe type" (eBezTriple_KeyframeType), as shown in the Dope Sheet. |
flag | Used for special settings that alter the behavior of the keyframe insertion. These include the 'visual' key-framing modes, quick refresh, and extra keyframe filtering. |
int insert_vert_fcurve | ( | struct FCurve * | fcu, |
float | x, | ||
float | y, | ||
eBezTriple_KeyframeType | keyframe_type, | ||
eInsertKeyFlags | flag | ||
) |
Main Key-framing API call.
Use this when validation of necessary animation data isn't necessary as it already exists. It will insert a keyframe using the current value being keyframed. Returns the index at which a keyframe was added (or -1 if failed).
This function is a wrapper for insert_bezt_fcurve(), and should be used when adding a new keyframe to a curve, when the keyframe doesn't exist anywhere else yet. It returns the index at which the keyframe was added.
keyframe_type | The type of keyframe (eBezTriple_KeyframeType). |
flag | Optional flags (eInsertKeyFlags) for controlling how keys get added and/or whether updates get done. |
Definition at line 545 of file keyframing.c.
References Freestyle::a, BezTriple::amplitude, BezTriple::back, BEZKEYTYPE, FCurve::bezt, BEZT_IPO_BEZ, BEZT_IPO_CONST, BEZT_IPO_LIN, BKE_fcurve_active_keyframe_set(), BKE_fcurve_handles_recalc(), BezTriple::f1, BezTriple::f2, BezTriple::f3, FCURVE_DISCRETE_VALUES, FCURVE_INT_VALUES, FCurve::flag, BezTriple::h1, BezTriple::h2, HD_AUTO_ANIM, insert_bezt_fcurve(), INSERTKEY_FAST, INSERTKEY_NO_USERPREF, INSERTKEY_OVERWRITE_FULL, INSERTKEY_REPLACE, BezTriple::ipo, BezTriple::period, SELECT, subdivide_nonauto_handles(), FCurve::totvert, BezTriple::vec, x, and y.
Referenced by BCAnimationCurve::add_value(), alloc_driver_fcurve(), BCAnimationCurve::clean_handles(), graphkeys_click_insert_exec(), insert_fcurve_key(), insert_graph_keys(), insert_keyframe_value(), sample_fcurve(), and blender::bke::tests::TEST().
void update_autoflags_fcurve | ( | struct FCurve * | fcu, |
struct bContext * | C, | ||
struct ReportList * | reports, | ||
struct 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 T37103).
Definition at line 274 of file keyframing.c.
References BKE_report(), BKE_reportf(), C, PointerRNA::data, FCurve::flag, NA_EDITED, ID::name, NC_ANIMATION, ND_KEYFRAME, NULL, PointerRNA::owner_id, ptr, FCurve::rna_path, RNA_path_resolve_property(), RPT_ERROR, TIP_, update_autoflags_fcurve_direct(), and WM_event_add_notifier().
struct FCurve* verify_driver_fcurve | ( | struct 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.
Definition at line 50 of file drivers.c.
References alloc_driver_fcurve(), BKE_animdata_ensure_id(), BKE_animdata_from_id(), BKE_fcurve_find(), BLI_addtail(), DRIVER_FCURVE_LOOKUP_ONLY, AnimData::drivers, ELEM, and NULL.
Referenced by add_driver_with_target(), ANIM_add_driver(), ANIM_copy_driver(), ANIM_paste_driver(), ANIM_remove_driver(), and ui_but_anim_expression_create().
|
extern |
Mapping Types enum for operators.
Definition at line 835 of file drivers.c.
Referenced by ANIM_OT_driver_button_add_menu(), driver_mapping_type_itemf(), and UI_OT_eyedropper_driver().