21#include "RNA_prototypes.hh"
68 return scene->toolsettings->autokey_mode &
AUTOKEY_ON;
76 return scene->toolsettings->autokey_mode == mode;
78 return U.autokey_mode == mode;
155 combined_result.
merge(result);
259 combined_result.
merge(result);
273 const bool only_if_property_keyed)
285 const int rnaindex_check = (rnaindex == -1) ? 0 : rnaindex;
287 C,
ptr, prop, rnaindex_check,
nullptr, &action, &driven, &special);
291 if (fcu ==
nullptr && (driven || special || only_if_property_keyed)) {
299 bool changed =
false;
326 if (only_if_property_keyed) {
333 const std::optional<std::string> group = (fcu && fcu->
grp) ? std::optional(fcu->
grp->
name) :
335 const std::string path = fcu ? fcu->
rna_path :
339 const std::optional<int> array_index = rnaindex < 0 ? std::nullopt : std::optional(rnaindex);
345 {{path, {}, array_index}},
Functions to insert, delete or modify keyframes.
Functionality to interact with keying sets.
AnimationEvalContext BKE_animsys_eval_context_construct(struct Depsgraph *depsgraph, float eval_time) ATTR_WARN_UNUSED_RESULT
ReportList * CTX_wm_reports(const bContext *C)
Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
Main * CTX_data_main(const bContext *C)
FCurve * BKE_fcurve_find_by_rna_context_ui(bContext *C, const PointerRNA *ptr, PropertyRNA *prop, int rnaindex, AnimData **r_animdata, bAction **r_action, bool *r_driven, bool *r_special)
float BKE_scene_frame_get(const Scene *scene)
@ AUTOKEY_FLAG_INSERTNEEDED
@ AUTOKEY_FLAG_ONLYKEYINGSET
@ AUTOKEY_FLAG_INSERTAVAILABLE
void merge(const CombinedKeyingResult &other)
int get_count(const SingleKeyingResult result) const
void generate_reports(ReportList *reports, eReportType report_level=RPT_ERROR)
const Depsgraph * depsgraph
bool id_frame_has_keyframe(ID *id, float frame)
Main Keyframe Checking API call.
void ANIM_relative_keyingset_add_source(blender::Vector< PointerRNA > &sources, ID *id, StructRNA *srna, void *data)
KeyingSet * ANIM_scene_get_active_keyingset(const Scene *scene)
int ANIM_apply_keyingset(bContext *C, blender::Vector< PointerRNA > *sources, KeyingSet *keyingset, const blender::animrig::ModifyKeyMode mode, const float cfra)
void autokeyframe_object(bContext *C, Scene *scene, Object *ob, Span< RNAPath > rna_paths)
bool is_autokey_on(const Scene *scene)
bool autokeyframe_cfra_can_key(const Scene *scene, ID *id)
bool is_autokey_mode(const Scene *scene, eAutokey_Mode mode)
static eInsertKeyFlags get_autokey_flags(Scene *scene)
CombinedKeyingResult insert_keyframes(Main *bmain, PointerRNA *struct_pointer, std::optional< StringRefNull > channel_group, const blender::Span< RNAPath > rna_paths, std::optional< float > scene_frame, const AnimationEvalContext &anim_eval_context, eBezTriple_KeyframeType key_type, eInsertKeyFlags insert_key_flags)
Main key-frame insertion API.
bool autokeyframe_pchan(bContext *C, Scene *scene, Object *ob, bPoseChannel *pchan, KeyingSet *ks)
bool autokeyframe_property(bContext *C, Scene *scene, PointerRNA *ptr, PropertyRNA *prop, int rnaindex, float cfra, bool only_if_property_keyed)
bool insert_keyframe_direct(ReportList *reports, PointerRNA ptr, PropertyRNA *prop, FCurve *fcu, const AnimationEvalContext *anim_eval_context, eBezTriple_KeyframeType keytype, NlaKeyframingContext *nla_context, eInsertKeyFlags flag)
Secondary Insert Key-framing API call.
bool is_keying_flag(const Scene *scene, eKeying_Flag flag)
void autokeyframe_pose_channel(bContext *C, Scene *scene, Object *ob, bPoseChannel *pose_channel, Span< RNAPath > rna_paths, short targetless_ik)
PointerRNA RNA_id_pointer_create(ID *id)
std::optional< std::string > RNA_path_from_ID_to_property(const PointerRNA *ptr, PropertyRNA *prop)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)