|
Blender V4.5
|
#include <cstdio>#include <fmt/format.h>#include "MEM_guardedalloc.h"#include "BLI_string.h"#include "BLT_translation.hh"#include "DNA_ID.h"#include "DNA_anim_types.h"#include "DNA_armature_types.h"#include "DNA_scene_types.h"#include "BKE_action.hh"#include "BKE_anim_data.hh"#include "BKE_animsys.h"#include "BKE_armature.hh"#include "BKE_context.hh"#include "BKE_fcurve.hh"#include "BKE_global.hh"#include "BKE_idtype.hh"#include "BKE_lib_id.hh"#include "BKE_nla.hh"#include "BKE_report.hh"#include "BKE_scene.hh"#include "DEG_depsgraph.hh"#include "DEG_depsgraph_query.hh"#include "ED_anim_api.hh"#include "ED_keyframing.hh"#include "ED_object.hh"#include "ED_screen.hh"#include "ANIM_action.hh"#include "ANIM_action_iterators.hh"#include "ANIM_animdata.hh"#include "ANIM_armature.hh"#include "ANIM_bone_collections.hh"#include "ANIM_driver.hh"#include "ANIM_fcurve.hh"#include "ANIM_keyframing.hh"#include "ANIM_keyingsets.hh"#include "ANIM_rna.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "WM_api.hh"#include "WM_types.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "RNA_enum_types.hh"#include "RNA_prototypes.hh"#include "anim_intern.hh"Go to the source code of this file.
Enumerations | |
| enum | { COMMONKEY_MODE_INSERT = 0 , COMMONKEY_MODE_DELETE } |
| anonymous enum |
| Enumerator | |
|---|---|
| COMMONKEY_MODE_INSERT | |
| COMMONKEY_MODE_DELETE | |
Definition at line 142 of file editors/animation/keyframing.cc.
| void ANIM_OT_keyframe_clear_button | ( | wmOperatorType * | ot | ) |
Definition at line 1281 of file editors/animation/keyframing.cc.
References clear_key_button_exec(), modify_key_op_poll(), OPTYPE_INTERNAL, OPTYPE_UNDO, ot, and RNA_def_boolean().
Referenced by ED_operatortypes_anim().
| void ANIM_OT_keyframe_clear_v3d | ( | wmOperatorType * | ot | ) |
Definition at line 764 of file editors/animation/keyframing.cc.
References clear_anim_v3d_exec(), clear_anim_v3d_invoke(), ED_operator_areaactive(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and WM_operator_properties_confirm_or_exec().
Referenced by ED_operatortypes_anim().
| void ANIM_OT_keyframe_delete | ( | wmOperatorType * | ot | ) |
Definition at line 605 of file editors/animation/keyframing.cc.
References ANIM_keying_sets_enum_itemf(), delete_key_exec(), modify_key_op_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, PROP_HIDDEN, RNA_def_enum(), RNA_def_enum_funcs(), RNA_def_property_flag(), and rna_enum_dummy_DEFAULT_items.
Referenced by ED_operatortypes_anim().
| void ANIM_OT_keyframe_delete_button | ( | wmOperatorType * | ot | ) |
Definition at line 1217 of file editors/animation/keyframing.cc.
References delete_key_button_exec(), modify_key_op_poll(), OPTYPE_INTERNAL, OPTYPE_UNDO, ot, and RNA_def_boolean().
Referenced by ED_operatortypes_anim().
| void ANIM_OT_keyframe_delete_by_name | ( | wmOperatorType * | ot | ) |
Definition at line 630 of file editors/animation/keyframing.cc.
References ANIM_keyingset_visit_for_search_no_poll(), delete_key_exec(), MAX_ID_NAME, modify_key_op_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, PROP_HIDDEN, PROP_STRING_SEARCH_SUGGESTION, RNA_def_property_flag(), RNA_def_property_string_search_func_runtime(), and RNA_def_string().
Referenced by ED_operatortypes_anim().
| void ANIM_OT_keyframe_delete_v3d | ( | wmOperatorType * | ot | ) |
Definition at line 952 of file editors/animation/keyframing.cc.
References delete_key_v3d_exec(), delete_key_v3d_invoke(), ED_operator_areaactive(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and WM_operator_properties_confirm_or_exec().
Referenced by ED_operatortypes_anim().
| void ANIM_OT_keyframe_insert | ( | wmOperatorType * | ot | ) |
Definition at line 396 of file editors/animation/keyframing.cc.
References ANIM_keying_sets_enum_itemf(), insert_key_exec(), insert_key_invoke(), modify_key_op_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, PROP_HIDDEN, RNA_def_enum(), RNA_def_enum_funcs(), RNA_def_property_flag(), and rna_enum_dummy_DEFAULT_items.
Referenced by ED_operatortypes_anim().
| void ANIM_OT_keyframe_insert_button | ( | wmOperatorType * | ot | ) |
Definition at line 1110 of file editors/animation/keyframing.cc.
References insert_key_button_exec(), modify_key_op_poll(), OPTYPE_INTERNAL, OPTYPE_UNDO, ot, and RNA_def_boolean().
Referenced by ED_operatortypes_anim().
| void ANIM_OT_keyframe_insert_by_name | ( | wmOperatorType * | ot | ) |
Definition at line 433 of file editors/animation/keyframing.cc.
References ANIM_keyingset_visit_for_search_no_poll(), keyframe_insert_with_keyingset_exec(), MAX_ID_NAME, modify_key_op_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, PROP_HIDDEN, PROP_STRING_SEARCH_SUGGESTION, RNA_def_property_flag(), RNA_def_property_string_search_func_runtime(), and RNA_def_string().
Referenced by ED_operatortypes_anim().
| void ANIM_OT_keyframe_insert_menu | ( | wmOperatorType * | ot | ) |
Definition at line 519 of file editors/animation/keyframing.cc.
References ANIM_keying_sets_enum_itemf(), ED_operator_areaactive(), insert_key_menu_invoke(), keyframe_insert_with_keyingset_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, PROP_HIDDEN, RNA_def_boolean(), RNA_def_enum(), RNA_def_enum_funcs(), RNA_def_property_flag(), and rna_enum_dummy_DEFAULT_items.
Referenced by ED_operatortypes_anim().
Definition at line 661 of file editors/animation/keyframing.cc.
References BKE_pose_channel_find_name(), BLI_str_quoted_substr(), bPoseChannel::bone, BONE_SELECTED, Bone::flag, Object::mode, bPoseChannel::name, OB_MODE_POSE, Object::pose, and FCurve::rna_path.
Referenced by clear_anim_v3d_exec().
|
static |
Definition at line 782 of file editors/animation/keyframing.cc.
References BKE_fcurve_is_protected(), BKE_pose_channel_find_name(), BKE_reportf(), BLI_str_quoted_substr(), bPoseChannel::bone, blender::animrig::bone_is_visible_pchan(), BONE_SELECTED, Object::data, Bone::flag, Object::id, Object::mode, bPoseChannel::name, ID::name, OB_MODE_POSE, Object::pose, reports, FCurve::rna_path, and RPT_WARNING.
Referenced by delete_key_v3d_without_keying_set().
|
static |
Definition at line 691 of file editors/animation/keyframing.cc.
References AnimData::action, blender::animrig::action_fcurve_remove(), blender::animrig::animdata_fcurve_delete(), blender::animrig::animdata_remove_empty_action(), C, can_delete_fcurve(), CTX_DATA_BEGIN, DEG_id_tag_update(), blender::animrig::foreach_fcurve_in_action_slot(), ID_RECALC_ANIMATION_NO_FLUSH, ID_RECALC_TRANSFORM, blender::animrig::Action::is_action_layered(), and AnimData::slot_handle.
Referenced by ANIM_OT_keyframe_clear_v3d(), and clear_anim_v3d_invoke().
|
static |
Definition at line 748 of file editors/animation/keyframing.cc.
References ALERT_ICON_NONE, BLT_I18NCONTEXT_OPERATOR_DEFAULT, C, clear_anim_v3d_exec(), CTX_IFACE_, IFACE_, wmOperator::ptr, RNA_boolean_get(), and WM_operator_confirm_ex().
Referenced by ANIM_OT_keyframe_clear_v3d().
|
static |
Definition at line 1237 of file editors/animation/keyframing.cc.
References all(), C, blender::animrig::clear_keyframe(), CTX_data_main(), G, G_DEBUG, RNAPath::index, NA_REMOVED, NC_ANIMATION, ND_KEYFRAME, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, printf, ptr, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RNA_path_from_ID_to_property(), UI_context_active_but_prop_get(), UI_context_update_anim_flag(), and WM_event_add_notifier().
Referenced by ANIM_OT_keyframe_clear_button().
|
static |
Definition at line 228 of file editors/animation/keyframing.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), blender::animrig::get_keyable_id_property_paths(), ptr, ROT_MODE_AXISANGLE, ROT_MODE_QUAT, ROT_MODE_XYZ, ROT_MODE_XZY, ROT_MODE_YXZ, ROT_MODE_YZX, ROT_MODE_ZXY, ROT_MODE_ZYX, bPoseChannel::rotmode, Object::rotmode, U, USER_ANIM_KEY_CHANNEL_CUSTOM_PROPERTIES, USER_ANIM_KEY_CHANNEL_LOCATION, USER_ANIM_KEY_CHANNEL_ROTATION, USER_ANIM_KEY_CHANNEL_ROTATION_MODE, and USER_ANIM_KEY_CHANNEL_SCALE.
Referenced by insert_key().
|
static |
Definition at line 1130 of file editors/animation/keyframing.cc.
References all(), FCurve::bezt, BKE_fcurve_bezt_binarysearch_index(), BKE_fcurve_delete_key(), BKE_fcurve_find(), BKE_fcurve_handles_recalc(), BKE_fcurve_is_protected(), BKE_idtype_idcode_to_name(), BKE_nlastrip_has_curves_for_property(), BKE_reportf(), BKE_scene_frame_get(), C, CTX_data_main(), CTX_data_scene(), blender::animrig::delete_keyframe(), NlaStrip::fcurves, G, G_DEBUG, GS, i, RNAPath::index, NA_REMOVED, ID::name, NlaStrip::name, NC_ANIMATION, ND_KEYFRAME, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, printf, ptr, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RNA_path_from_ID_to_property(), RNA_property_identifier(), RPT_WARNING, FCurve::totvert, UI_context_active_but_prop_get(), UI_context_update_anim_flag(), and WM_event_add_notifier().
Referenced by ANIM_OT_keyframe_delete_button().
|
static |
Definition at line 554 of file editors/animation/keyframing.cc.
References C, CTX_data_scene(), delete_key_using_keying_set(), keyingset_get_from_op_with_error(), OPERATOR_CANCELLED, wmOperatorType::prop, and wmOperator::type.
Referenced by ANIM_OT_keyframe_delete(), and ANIM_OT_keyframe_delete_by_name().
|
static |
Definition at line 565 of file editors/animation/keyframing.cc.
References blender::animrig::apply_keyingset(), BKE_report(), BKE_reportf(), BKE_scene_frame_get(), C, CTX_data_scene(), blender::animrig::DELETE_KEY, wmOperator::flag, G, G_DEBUG, NA_REMOVED, KeyingSet::name, NC_ANIMATION, ND_KEYFRAME, OP_IS_INVOKE, OPERATOR_CANCELLED, OPERATOR_FINISHED, printf, wmOperator::reports, RPT_ERROR, RPT_INFO, RPT_WARNING, and WM_event_add_notifier().
Referenced by delete_key_exec(), and delete_key_v3d_exec().
|
static |
Definition at line 924 of file editors/animation/keyframing.cc.
References C, CTX_data_scene(), delete_key_using_keying_set(), delete_key_v3d_without_keying_set(), and blender::animrig::scene_get_active_keyingset().
Referenced by ANIM_OT_keyframe_delete_v3d(), and delete_key_v3d_invoke().
|
static |
Definition at line 936 of file editors/animation/keyframing.cc.
References ALERT_ICON_NONE, C, delete_key_v3d_exec(), IFACE_, wmOperator::ptr, RNA_boolean_get(), and WM_operator_confirm_ex().
Referenced by ANIM_OT_keyframe_delete_v3d().
|
static |
Definition at line 829 of file editors/animation/keyframing.cc.
References AnimData::action, blender::animrig::action_fcurve_remove(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BKE_fcurve_is_empty(), BKE_nla_tweakedit_remap(), BKE_scene_frame_get(), C, can_delete_key(), CTX_DATA_BEGIN, CTX_data_scene(), DEG_id_tag_update(), blender::animrig::delete_keyframe_fcurve_legacy(), blender::animrig::fcurve_delete_keyframe_at_time(), wmOperator::flag, blender::animrig::foreach_fcurve_in_action_slot(), ID_RECALC_ANIMATION_NO_FLUSH, ID_RECALC_TRANSFORM, if(), blender::animrig::Action::is_action_layered(), FCurve::next, NLATIME_CONVERT_UNMAP, OP_IS_INVOKE, wmOperator::reports, and AnimData::slot_handle.
Referenced by delete_key_v3d_exec().
| 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 114 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().
| bool fcurve_is_changed | ( | PointerRNA | ptr, |
| PropertyRNA * | prop, | ||
| FCurve * | fcu, | ||
| const AnimationEvalContext * | anim_eval_context ) |
Lesser Keyframe Checking API call.
Definition at line 1304 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, ptr, and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by ui_but_anim_flag().
|
static |
Definition at line 283 of file editors/animation/keyframing.cc.
References C, CTX_data_mode_enum(), CTX_data_selected_objects(), CTX_data_selected_pose_bones(), CTX_MODE_OBJECT, and CTX_MODE_POSE.
Referenced by insert_key().
|
static |
Definition at line 303 of file editors/animation/keyframing.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), Vector< T, InlineBufferCapacity, Allocator >::as_span(), BKE_animsys_eval_context_construct(), BKE_id_is_editable(), BKE_reportf(), BKE_scene_frame_get(), C, construct_rna_paths(), CTX_data_depsgraph_pointer(), CTX_data_main(), CTX_data_scene(), DEG_id_tag_update(), depsgraph, blender::animrig::CombinedKeyingResult::generate_reports(), blender::animrig::CombinedKeyingResult::get_count(), blender::animrig::get_keyframing_flags(), get_selection(), id_can_have_animdata(), ID_RECALC_ANIMATION_NO_FLUSH, blender::animrig::insert_keyframes(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), ToolSettings::keyframe_type, blender::animrig::CombinedKeyingResult::merge(), NA_ADDED, ID::name, NC_ANIMATION, ND_KEYFRAME, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, RPT_WARNING, blender::animrig::SUCCESS, Scene::toolsettings, and WM_event_add_notifier().
Referenced by insert_key_exec().
|
static |
Definition at line 972 of file editors/animation/keyframing.cc.
References AnimData::action, all(), ANIM_deselect_keys_in_animation_editors(), BKE_animdata_from_id(), BKE_animsys_eval_context_construct(), BKE_fcurve_find(), BKE_fcurve_find_by_rna_context_ui(), BKE_report(), BKE_reportf(), BKE_scene_frame_get(), C, CTX_data_depsgraph_pointer(), CTX_data_main(), CTX_data_scene(), blender::animrig::default_channel_group_for_path(), DEG_id_tag_update(), blender::animrig::evaluate_driver_from_rna_pointer(), NlaStrip::fcurves, flag, blender::animrig::get_keyframing_flags(), bAction::id, ID_RECALC_ANIMATION_NO_FLUSH, blender::animrig::insert_keyframe_direct(), blender::animrig::insert_keyframes(), INSERTKEY_NOFLAGS, ToolSettings::keyframe_type, NA_ADDED, NC_ANIMATION, ND_KEYFRAME, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, ptr, wmOperator::ptr, wmOperator::reports, result, RNA_boolean_get(), RNA_id_pointer_create(), RNA_path_from_ID_to_property(), RNA_property_anim_editable(), RNA_property_identifier(), RPT_ERROR, RPT_WARNING, blender::animrig::SUCCESS, Scene::toolsettings, UI_BUT_DRIVEN, UI_but_flag_is_set(), UI_context_active_but_prop_get(), UI_context_update_anim_flag(), and WM_event_add_notifier().
Referenced by ANIM_OT_keyframe_insert_button().
|
static |
Definition at line 372 of file editors/animation/keyframing.cc.
References ANIM_deselect_keys_in_animation_editors(), ANIM_keyingset_get_from_enum_type(), C, CTX_data_scene(), insert_key(), insert_key_with_keyingset(), wmOperator::ptr, and RNA_enum_get().
Referenced by ANIM_OT_keyframe_insert(), and insert_key_invoke().
|
static |
Definition at line 386 of file editors/animation/keyframing.cc.
References C, CTX_data_ensure_evaluated_depsgraph(), and insert_key_exec().
Referenced by ANIM_OT_keyframe_insert().
|
static |
Definition at line 463 of file editors/animation/keyframing.cc.
References Scene::active_keyingset, BLI_assert, C, CTX_data_scene(), wmOperatorType::exec, free(), i, EnumPropertyItem::icon, EnumPropertyItem::identifier, MEM_freeN(), EnumPropertyItem::name, uiLayout::op(), OPERATOR_INTERFACE, wmOperator::ptr, RNA_boolean_get(), RNA_enum_set(), RNA_property_enum_items_gettexted(), RNA_string_set(), RNA_struct_find_property(), uiLayout::separator(), wmOperator::type, UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), and WM_operatortype_name().
Referenced by ANIM_OT_keyframe_insert_menu().
|
static |
Definition at line 168 of file editors/animation/keyframing.cc.
References blender::animrig::apply_keyingset(), BKE_report(), BKE_reportf(), BKE_scene_frame_get(), C, CTX_data_edit_object(), CTX_data_scene(), Object::data, wmOperator::flag, G, G_DEBUG, blender::animrig::INSERT, blender::animrig::keyingset_find_id(), blender::ed::object::mode_set(), NA_ADDED, KeyingSet::name, NC_ANIMATION, ND_KEYFRAME, OB_MODE_EDIT, OB_MODE_OBJECT, OP_IS_INVOKE, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, RPT_INFO, RPT_WARNING, and WM_event_add_notifier().
Referenced by insert_key_exec(), and keyframe_insert_with_keyingset_exec().
|
static |
Definition at line 421 of file editors/animation/keyframing.cc.
References ANIM_deselect_keys_in_animation_editors(), C, CTX_data_scene(), insert_key_with_keyingset(), keyingset_get_from_op_with_error(), OPERATOR_CANCELLED, wmOperatorType::prop, and wmOperator::type.
Referenced by ANIM_OT_keyframe_insert_by_name(), and ANIM_OT_keyframe_insert_menu().
|
static |
Use for insert/delete key-frame.
Definition at line 1328 of file editors/animation/keyframing.cc.
References Scene::active_keyingset, ANIM_keyingset_get_from_enum_type(), ANIM_keyingset_get_from_idname(), BKE_report(), BKE_reportf(), BLI_assert, MAX_ID_NAME, PROP_ENUM, PROP_STRING, wmOperator::ptr, wmOperator::reports, RNA_property_enum_get(), RNA_property_string_get(), RNA_property_type(), RPT_ERROR, and STREQ.
Referenced by delete_key_exec(), and keyframe_insert_with_keyingset_exec().
|
static |
Polling callback for use with ANIM_*_keyframe() operators This is based on the standard ED_operator_areaactive callback, except that it does special checks for a few space-types too.
Definition at line 152 of file editors/animation/keyframing.cc.
References C, CTX_data_scene(), CTX_wm_area(), and ELEM.
Referenced by ANIM_OT_keyframe_clear_button(), ANIM_OT_keyframe_delete(), ANIM_OT_keyframe_delete_button(), ANIM_OT_keyframe_delete_by_name(), ANIM_OT_keyframe_insert(), ANIM_OT_keyframe_insert_button(), and ANIM_OT_keyframe_insert_by_name().
| 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 78 of file editors/animation/keyframing.cc.
References BKE_report(), BKE_reportf(), C, FCurve::flag, NA_EDITED, NC_ANIMATION, ND_KEYFRAME, ptr, reports, FCurve::rna_path, RNA_path_resolve_property(), RNA_property_type(), RPT_, RPT_ERROR, blender::animrig::update_autoflags_fcurve_direct(), and WM_event_add_notifier().