Blender V5.3
ED_keyframing.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2008 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "DNA_anim_types.h"
12#include "RNA_types.hh"
13
14namespace blender {
15
16struct ID;
17struct Main;
18struct Scene;
19
20struct KeyingSet;
21
23struct FCurve;
24
25struct ReportList;
26struct bContext;
27
28struct EnumPropertyItem;
29struct PointerRNA;
30struct PropertyRNA;
31
32namespace animrig {
33enum class ModifyKeyReturn;
34enum class ModifyKeyMode;
35} // namespace animrig
36
37/* -------------------------------------------------------------------- */
40
48
49/* -------- */
50
60void ED_keyframes_add(FCurve *fcu, int num_keys_to_add);
61
63
64/* -------------------------------------------------------------------- */
67
71int ANIM_scene_get_keyingset_index(Scene *scene, KeyingSet *keyingset);
72
74 PointerRNA *ptr,
75 PropertyRNA *prop,
76 const char *edit_text,
78
80 const bContext *C,
81 PointerRNA *ptr,
82 PropertyRNA *prop,
83 const char *edit_text,
85
90 PointerRNA *ptr,
91 PropertyRNA *prop,
92 bool *r_free);
93
104KeyingSet *ANIM_keyingset_get_from_idname(Scene *scene, const char *idname);
105
110
112
113/* -------------------------------------------------------------------- */
116
122
139
144extern const EnumPropertyItem prop_driver_create_mapping_types[];
145
146/* -------- */
147
156
164FCurve *verify_driver_fcurve(ID *id,
165 const char rna_path[],
166 int array_index,
167 eDriverFCurveCreationMode creation_mode);
168
169FCurve *alloc_driver_fcurve(const char rna_path[],
170 int array_index,
171 eDriverFCurveCreationMode creation_mode);
172
173/* -------- */
174
188int ANIM_add_driver_with_target(ReportList *reports,
189 ID *dst_id,
190 const char dst_path[],
191 int dst_index,
192 ID *src_id,
193 const char src_path[],
194 int src_index,
195 short flag,
196 eDriver_Types driver_type,
197 short mapping_type);
198
199/* -------- */
200
209int ANIM_add_driver(ReportList *reports,
210 ID *id,
211 const char rna_path[],
212 int array_index,
213 short flag,
214 eDriver_Types type);
215
223bool ANIM_remove_driver(ID *id, const char rna_path[], int array_index);
224
225/* -------- */
226
232
238
239/* -------- */
240
245
252 ReportList *reports, ID *id, const char rna_path[], int array_index, short flag);
253
261 ReportList *reports, ID *id, const char rna_path[], int array_index, short flag);
262
263/* -------- */
264
269
273bool ANIM_driver_vars_copy(ReportList *reports, FCurve *fcu);
274
278bool ANIM_driver_vars_paste(ReportList *reports, FCurve *fcu, bool replace);
279
280/* -------- */
281
286void ANIM_copy_as_driver(ID *target_id, const char *target_path, const char *var_name);
287
289
290/* -------------------------------------------------------------------- */
293
300bool fcurve_is_changed(PointerRNA ptr,
301 PropertyRNA *prop,
302 FCurve *fcu,
303 const AnimationEvalContext *anim_eval_context);
304
306
307} // namespace blender
#define C
Definition RandGen.cpp:29
BMesh Iterators.
void ANIM_driver_vars_copybuf_free()
Definition drivers.cc:661
const EnumPropertyItem * ANIM_keying_sets_enum_itemf(bContext *C, PointerRNA *, PropertyRNA *, bool *r_free)
int ANIM_add_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short flag, eDriver_Types type)
Main Driver Management API calls.
Definition drivers.cc:385
void ANIM_keyingset_visit_for_search(const bContext *C, PointerRNA *, PropertyRNA *, const char *, FunctionRef< void(StringPropertySearchVisitParams)> visit_fn)
void ED_keyframes_add(FCurve *fcu, int num_keys_to_add)
void ANIM_keyingset_visit_for_search_no_poll(const bContext *C, PointerRNA *, PropertyRNA *, const char *, FunctionRef< void(StringPropertySearchVisitParams)> visit_fn)
bool ANIM_driver_vars_paste(ReportList *reports, FCurve *fcu, bool replace)
Definition drivers.cc:706
bool ANIM_paste_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short)
Main Driver Management API calls.
Definition drivers.cc:604
bool ANIM_driver_vars_copy(ReportList *reports, FCurve *fcu)
Definition drivers.cc:684
FCurve * verify_driver_fcurve(ID *id, const char rna_path[], const int array_index, eDriverFCurveCreationMode creation_mode)
Definition drivers.cc:53
bool fcurve_is_changed(PointerRNA ptr, PropertyRNA *prop, FCurve *fcu, const AnimationEvalContext *anim_eval_context)
Lesser Keyframe Checking API call.
void update_autoflags_fcurve(FCurve *fcu, bContext *C, ReportList *reports, PointerRNA *ptr)
Lesser Key-framing API call.
bool ANIM_driver_can_paste()
Definition drivers.cc:561
KeyingSet * ANIM_keyingset_get_from_enum_type(Scene *scene, int type)
KeyingSet * ANIM_keyingset_get_from_idname(Scene *scene, const char *idname)
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, eDriver_Types driver_type, short mapping_type)
Main Driver Management API calls.
Definition drivers.cc:274
bool ANIM_copy_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short)
Main Driver Management API calls.
Definition drivers.cc:568
int ANIM_scene_get_keyingset_index(Scene *scene, KeyingSet *keyingset)
bool ANIM_remove_driver(ID *id, const char rna_path[], int array_index)
Main Driver Management API calls.
Definition drivers.cc:511
bool ANIM_keyingset_context_ok_poll(bContext *C, KeyingSet *keyingset)
void ANIM_drivers_copybuf_free()
Definition drivers.cc:552
FCurve * alloc_driver_fcurve(const char rna_path[], const int array_index, eDriverFCurveCreationMode creation_mode)
Definition drivers.cc:94
@ CREATEDRIVER_WITH_DEFAULT_DVAR
void ANIM_copy_as_driver(ID *target_id, const char *target_path, const char *var_name)
Definition drivers.cc:761
const EnumPropertyItem prop_driver_create_mapping_types[]
Definition drivers.cc:804
bool ANIM_driver_vars_can_paste()
Definition drivers.cc:677
eDriverFCurveCreationMode
@ DRIVER_FCURVE_LOOKUP_ONLY
@ DRIVER_FCURVE_EMPTY
@ DRIVER_FCURVE_KEYFRAMES
eCreateDriver_MappingTypes
@ CREATEDRIVER_MAPPING_NONE_ALL
@ CREATEDRIVER_MAPPING_NONE
@ CREATEDRIVER_MAPPING_N_N
@ CREATEDRIVER_MAPPING_1_1
@ CREATEDRIVER_MAPPING_1_N