Blender V5.3
ED_anim_api.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 "BKE_nla.hh"
12
13#include "BKE_action.hh"
14#include "BLI_enum_flags.hh"
15#include "BLI_sys_types.hh"
16
17#include "DNA_listBase.h"
18#include "DNA_screen_types.h"
19#include "DNA_space_types.h"
20
21#include <optional>
22
23namespace blender {
24
25struct AnimData;
26struct Depsgraph;
27struct ID;
28
29struct ARegion;
30struct ARegionType;
31struct FModifier;
32struct Main;
33struct NlaStrip;
34struct NlaTrack;
35struct PanelType;
36struct ReportList;
37struct ScrArea;
38struct SpaceLink;
39struct View2D;
40struct ViewLayer;
41struct rctf;
42struct bContext;
43struct wmKeyConfig;
44
45struct Object;
46struct Scene;
47
48struct bDopeSheet;
49
50struct FCurve;
51struct FModifier;
52struct bAction;
53struct AnimKeylist;
54struct bMotionPath;
55
56namespace ui {
57struct Block;
58}
59
60namespace ed {
62}
63
64struct PointerRNA;
65struct PropertyRNA;
66
67struct MPathTarget;
68
69namespace animrig {
70class Action;
71class Slot;
72class Channelbag;
73} // namespace animrig
74
75/* Motion path needing to be baked (target). */
77 bMotionPath *mpath = nullptr; /* Motion path in question. */
78
79 AnimKeylist *keylist = nullptr; /* Temp, to know where the keyframes are. */
80
81 /* Original (Source Objects) */
82 Object *ob = nullptr; /* Source Object */
83 bPoseChannel *pchan = nullptr; /* Source pose-channel (if applicable). */
84};
85
86/* -------------------------------------------------------------------- */
91
119
185
187
188/* -------------------------------------------------------------------- */
191
261
264 ALE_NONE = 0, /* no keyframe data */
265 ALE_FCURVE, /* F-Curve */
266 ALE_GPFRAME, /* Grease Pencil Frames (Legacy) */
267 ALE_MASKLAY, /* Mask */
268 ALE_NLASTRIP, /* NLA Strips */
269
270 ALE_ALL, /* All channels summary */
271 ALE_SCE, /* Scene summary */
272 ALE_OB, /* Object summary */
273 ALE_ACT, /* Action summary (legacy). */
274 ALE_GROUP, /* Action Group summary (legacy). */
275 ALE_ACTION_LAYERED, /* Action summary (layered). */
276 ALE_ACTION_SLOT, /* Action slot summary. */
277
278 ALE_GREASE_PENCIL_CEL, /* Grease Pencil Cels. */
279 ALE_GREASE_PENCIL_DATA, /* Grease Pencil Cels summary. */
280 ALE_GREASE_PENCIL_GROUP, /* Grease Pencil Layer Groups. */
281};
282
297
298/* used for most tools which change keyframes (flushed by ANIM_animdata_update) */
299#define ANIM_UPDATE_DEFAULT (ANIM_UPDATE_DEPS | ANIM_UPDATE_ORDER | ANIM_UPDATE_HANDLES)
300#define ANIM_UPDATE_DEFAULT_NOHANDLES (ANIM_UPDATE_DEFAULT & ~ANIM_UPDATE_HANDLES)
301
382
384
385/* -------------------------------------------------------------------- */
388
389/* filtering flags - under what circumstances should a channel be returned */
449
451
452/* -------------------------------------------------------------------- */
455
456/* XXX check on all of these flags again. */
457
458/* Dope-sheet only. */
459/* 'Scene' channels */
460#define SEL_SCEC(sce) (CHECK_TYPE_INLINE(sce, Scene *), ((sce->flag & SCE_DS_SELECTED)))
461#define EXPANDED_SCEC(sce) (CHECK_TYPE_INLINE(sce, Scene *), ((sce->flag & SCE_DS_COLLAPSED) == 0))
462/* 'Sub-Scene' channels (flags stored in Data block) */
463#define FILTER_WOR_SCED(wo) (CHECK_TYPE_INLINE(wo, World *), (wo->flag & WO_DS_EXPAND))
464#define FILTER_LS_SCED(linestyle) ((linestyle->flag & LS_DS_EXPAND))
465/* 'Object' channels */
466#define SEL_OBJC(base) (CHECK_TYPE_INLINE(base, Base *), ((base->flag & SELECT)))
467#define EXPANDED_OBJC(ob) \
468 (CHECK_TYPE_INLINE(ob, Object *), (((ob)->nlaflag & OB_ADS_COLLAPSED) == 0))
469/* 'Sub-object' channels (flags stored in Data block) */
470#define FILTER_SKE_OBJD(key) (CHECK_TYPE_INLINE(key, Key *), ((key->flag & KEY_DS_EXPAND)))
471#define FILTER_MAT_OBJD(ma) (CHECK_TYPE_INLINE(ma, Material *), ((ma->flag & MA_DS_EXPAND)))
472#define FILTER_LAM_OBJD(la) (CHECK_TYPE_INLINE(la, Light *), ((la->flag & LA_DS_EXPAND)))
473#define FILTER_CAM_OBJD(ca) (CHECK_TYPE_INLINE(ca, Camera *), ((ca->flag & CAM_DS_EXPAND)))
474#define FILTER_CACHEFILE_OBJD(cf) \
475 (CHECK_TYPE_INLINE(cf, CacheFile *), (((cf)->flag & CACHEFILE_DS_EXPAND)))
476#define FILTER_CUR_OBJD(cu) (CHECK_TYPE_INLINE(cu, Curve *), ((cu->flag & CU_DS_EXPAND)))
477#define FILTER_PART_OBJD(part) \
478 (CHECK_TYPE_INLINE(part, ParticleSettings *), (((part)->flag & PART_DS_EXPAND)))
479#define FILTER_MBALL_OBJD(mb) (CHECK_TYPE_INLINE(mb, MetaBall *), ((mb->flag2 & MB_DS_EXPAND)))
480#define FILTER_ARM_OBJD(arm) (CHECK_TYPE_INLINE(arm, bArmature *), ((arm->flag & ARM_DS_EXPAND)))
481#define FILTER_MESH_OBJD(me) (CHECK_TYPE_INLINE(me, Mesh *), ((me->flag & ME_DS_EXPAND)))
482#define FILTER_LATTICE_OBJD(lt) (CHECK_TYPE_INLINE(lt, Lattice *), ((lt->flag & LT_DS_EXPAND)))
483#define FILTER_SPK_OBJD(spk) (CHECK_TYPE_INLINE(spk, Speaker *), ((spk->flag & SPK_DS_EXPAND)))
484#define FILTER_CURVES_OBJD(ha) (CHECK_TYPE_INLINE(ha, Curves *), ((ha->flag & HA_DS_EXPAND)))
485#define FILTER_POINTS_OBJD(pt) (CHECK_TYPE_INLINE(pt, PointCloud *), ((pt->flag & PT_DS_EXPAND)))
486#define FILTER_VOLUME_OBJD(vo) (CHECK_TYPE_INLINE(vo, Volume *), ((vo->flag & VO_DS_EXPAND)))
487#define FILTER_LIGHTPROBE_OBJD(probe) \
488 (CHECK_TYPE_INLINE(probe, LightProbe *), ((probe->flag & LIGHTPROBE_DS_EXPAND)))
489/* Variable use expanders */
490#define FILTER_NTREE_DATA(ntree) \
491 (CHECK_TYPE_INLINE(ntree, bNodeTree *), (((ntree)->flag & NTREE_DS_EXPAND)))
492#define FILTER_TEX_DATA(tex) (CHECK_TYPE_INLINE(tex, Tex *), ((tex->flag & TEX_DS_EXPAND)))
493
494/* 'Sub-object/Action' channels (flags stored in Action) */
495#define SEL_ACTC(actc) ((actc->flag & ACT_SELECTED))
496#define EXPANDED_ACTC(actc) ((actc->flag & ACT_COLLAPSED) == 0)
497/* 'Sub-AnimData' channels */
498#define EXPANDED_DRVD(adt) ((adt->flag & ADT_DRIVERS_COLLAPSED) == 0)
499#define EXPANDED_ADT(adt) ((adt->flag & ADT_UI_EXPANDED) != 0)
500
501/* Actions (also used for Dope-sheet). */
503#define EDITABLE_AGRP(agrp) (((agrp)->flag & AGRP_PROTECTED) == 0)
504#define EXPANDED_AGRP(ac, agrp) \
505 (((!(ac) || ((ac)->spacetype != SPACE_GRAPH)) && ((agrp)->flag & AGRP_EXPANDED)) || \
506 (((ac) && ((ac)->spacetype == SPACE_GRAPH)) && ((agrp)->flag & AGRP_EXPANDED_G)))
507#define SEL_AGRP(agrp) (((agrp)->flag & AGRP_SELECTED) || ((agrp)->flag & AGRP_ACTIVE))
509#define EDITABLE_FCU(fcu) (((fcu)->flag & FCURVE_PROTECTED) == 0)
510#define SEL_FCU(fcu) ((fcu)->flag & FCURVE_SELECTED)
511
512/* ShapeKey mode only */
513#define EDITABLE_SHAPEKEY(kb) (((kb)->flag & KEYBLOCK_LOCKED) == 0)
514#define SEL_SHAPEKEY(kb) ((kb)->flag & KEYBLOCK_SEL)
515
516/* Grease Pencil only */
518#define EXPANDED_GPD(gpd) ((gpd)->flag & GP_DATA_EXPAND)
520#define EDITABLE_GPL(gpl) (((gpl)->flag & GP_LAYER_LOCKED) == 0)
521#define SEL_GPL(gpl) ((gpl)->flag & GP_LAYER_SELECT)
522
523/* Mask Only */
524#define EXPANDED_MASK(mask) ((mask)->flag & MASK_ANIMF_EXPAND)
526#define EDITABLE_MASK(masklay) (((masklay)->flag & MASK_LAYERFLAG_LOCKED) == 0)
527#define SEL_MASKLAY(masklay) ((masklay)->flag & SELECT)
528
529/* NLA only */
530#define SEL_NLT(nlt) ((nlt)->flag & NLATRACK_SELECTED)
531#define EDITABLE_NLT(nlt) (((nlt)->flag & NLATRACK_PROTECTED) == 0)
532
533/* Movie clip only */
534#define EXPANDED_MCLIP(clip) ((clip)->flag & MCLIP_DATA_EXPAND)
535
536/* Palette only */
537#define EXPANDED_PALETTE(palette) ((palette)->flag & PALETTE_DATA_EXPAND)
538
539/* AnimData - NLA mostly... */
540#define SEL_ANIMDATA(adt) ((adt)->flag & ADT_UI_SELECTED)
541
543
544/* -------------------------------------------------------------------- */
547
549#define NLATRACK_FIRST_TOP(ac) \
550 (ui::view2d_scale_get_y(&(ac)->region->v2d) * -UI_TIME_SCRUB_MARGIN_Y - NLATRACK_SKIP)
551#define NLATRACK_HEIGHT(snla) \
552 (((snla) && ((snla)->flag & SNLA_NOSTRIPCURVES)) ? (0.8f * U.widget_unit) : \
553 (1.2f * U.widget_unit))
554#define NLATRACK_SKIP (0.1f * U.widget_unit)
555#define NLATRACK_STEP(snla) (NLATRACK_HEIGHT(snla) + NLATRACK_SKIP)
557#define NLATRACK_TOT_HEIGHT(ac, item_amount) \
558 (-NLATRACK_FIRST_TOP(ac) + NLATRACK_STEP(((SpaceNla *)(ac)->sl)) * (item_amount + 1))
559
561#define NLATRACK_NAMEWIDTH (10 * U.widget_unit)
562
564
565/* -------------------------------------------------------------------- */
568
589size_t ANIM_animfilter_action_slot(bAnimContext *ac,
590 ListBaseT<bAnimListElem> *anim_data,
591 animrig::Action &action,
592 animrig::Slot &slot,
593 eAnimFilter_Flags filter_mode,
594 ID *animated_id);
595
604size_t ANIM_animdata_filter(bAnimContext *ac,
605 ListBaseT<bAnimListElem> *anim_data,
606 eAnimFilter_Flags filter_mode,
607 void *data,
608 eAnimCont_Types datatype);
609
617bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac);
618
629bool ANIM_animdata_context_getdata(bAnimContext *ac);
630
634void ANIM_animdata_update(bAnimContext *ac, ListBaseT<bAnimListElem> *anim_data);
635
636void ANIM_animdata_freelist(ListBaseT<bAnimListElem> *anim_data);
637
642
643bAction *ANIM_active_action_from_area(const Main &bmain,
644 Scene *scene,
645 ViewLayer *view_layer,
646 const ScrArea *area,
647 ID **r_action_user = nullptr);
648
650
651/* -------------------------------------------------------------------- */
656
662 /* ACHANNEL_ROLE_SPECIAL = 0, */ /* UNUSED */
665};
666
667/* flag-setting behavior */
680
681/* types of settings for AnimChannels */
698
701 /* -- Type data -- */
702 /* name of the channel type, for debugging */
703 const char *channel_type_name;
704 /* "level" or role in hierarchy - for finding the active channel */
706
707 /* -- Drawing -- */
709 void (*get_backdrop_color)(bAnimContext *ac, bAnimListElem *ale, float r_color[3]);
710
714 bool (*get_channel_color)(const bAnimListElem *ale, uint8_t r_color[3]);
715
717 void (*draw_backdrop)(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc);
722
724 void (*name)(bAnimListElem *ale, char *name);
726 bool (*name_prop)(bAnimListElem *ale, PointerRNA *r_ptr, PropertyRNA **r_prop);
728 int (*icon)(bAnimListElem *ale);
729
730 /* -- Settings -- */
734 int (*setting_flag)(bAnimContext *ac, eAnimChannel_Settings setting, bool *r_neg);
740 void *(*setting_ptr)(bAnimListElem *ale, eAnimChannel_Settings setting, short *r_type);
741
750 void (*setting_post_update)(Main &bmain,
751 const bAnimListElem &ale,
752 eAnimChannel_Settings setting);
753};
754
756/* -------------------------------------------------------------------- */
759
765float ANIM_UI_get_channels_total_height(View2D *v2d, int item_count);
768
770
771/* -------------------------------------------------------------------- */
774
779
783void ANIM_channel_debug_print_info(bAnimContext &ac, bAnimListElem *ale, short indent_level);
784
789
794 bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc, size_t channel_index);
799 bAnimContext *ac,
800 bAnimListElem *ale,
801 ui::Block *block,
802 const rctf *rect,
803 size_t channel_index);
804
806
807/* -------------------------------------------------------------------- */
810
816 bAnimListElem *ale,
817 eAnimChannel_Settings setting);
818
823 bAnimListElem *ale,
824 eAnimChannel_Settings setting,
826
838 ListBaseT<bAnimListElem> *anim_data,
839 bAnimListElem *ale_setting,
840 eAnimChannel_Settings setting,
842
844
849
854
859 void *data,
860 eAnimCont_Types datatype,
862 void *channel_data,
863 eAnim_ChannelType channel_type);
864
869
875
877
878/* -------------------------------------------------------------------- */
885
886/* flags for Current Frame Drawing */
889 /* DRAWCFRA_PLAIN = 0, */ /* UNUSED */
893 DRAWCFRA_WIDE = (1 << 1),
894};
895
899void ANIM_draw_cfra(const bContext *C, View2D *v2d, short flag);
900
902
903/* -------------------------------------------------------------------- */
908
912void ANIM_draw_previewrange(const Scene *scene, View2D *v2d, int end_frame_width);
913
917void ANIM_draw_scene_strip_range(const bContext *C, View2D *v2d);
918
920
921/* -------------------------------------------------------------------- */
926
930void ANIM_draw_framerange(Scene *scene, View2D *v2d);
931
937 AnimData *adt, bAction *action, View2D *v2d, float ymin, float ymax);
938
940
941/* -------------------------------------------------------------------- */
946
947bool ANIM_nla_context_track_ptr(const bContext *C, PointerRNA *r_ptr);
948bool ANIM_nla_context_strip_ptr(const bContext *C, PointerRNA *r_ptr);
949
950NlaTrack *ANIM_nla_context_track(const bContext *C);
951NlaStrip *ANIM_nla_context_strip(const bContext *C);
952FCurve *ANIM_graph_context_fcurve(const bContext *C);
953
955using PanelTypePollFn = bool (*)(const bContext *C, PanelType *pt);
957using uiListPanelIDFromDataFunc = void (*)(void *data_link, char *r_idname);
958
963 ID *owner_id,
964 ListBaseT<FModifier> *fmodifiers,
965 uiListPanelIDFromDataFunc panel_id_fn);
966
968 const char *modifier_panel_prefix,
969 PanelTypePollFn poll_function);
971 const char *modifier_panel_prefix,
972 PanelTypePollFn poll_function);
973
975
976/* -------------------------------------------------------------------- */
979
984
990bool ANIM_fmodifiers_copy_to_buf(ListBaseT<FModifier> *modifiers, bool active);
991
996bool ANIM_fmodifiers_paste_from_buf(ListBaseT<FModifier> *modifiers, bool replace, FCurve *curve);
997
999
1000/* -------------------------------------------------------------------- */
1005
1006/* `anim_ipo_utils.cc` */
1007
1021std::optional<int> getname_anim_fcurve(char *name, ID *id, FCurve *fcu);
1022
1028std::string getname_anim_fcurve_for_slot(Main &bmain, const animrig::Slot &slot, FCurve &fcurve);
1029
1033void getcolor_fcurve_rainbow(int cur, int tot, float out[3]);
1034
1036
1037/* -------------------------------------------------------------------- */
1043
1048void nla_action_get_color(AnimData *adt, bAction *act, float color[4]);
1049
1051
1052/* -------------------------------------------------------------------- */
1055
1056/* `anim_draw.cc` */
1057
1065
1072float ANIM_nla_tweakedit_remap(bAnimListElem *ale, float cframe, eNlaTime_ConvertModes mode);
1073
1084void ANIM_nla_mapping_apply_fcurve(AnimData *adt, FCurve *fcu, bool restore, bool only_keys);
1085
1090 FCurve *fcu,
1091 bool restore,
1092 bool only_keys);
1093
1094/* ..... */
1095
1101
1103
1104/* -------------------------------------------------------------------- */
1107
1108/* `anim_draw.cc` */
1109
1121 /* ANIM_UNITCONV_SKIPKNOTS = (1 << 4), */ /* UNUSED */
1129};
1130
1134short ANIM_get_normalization_flags(SpaceLink *space_link);
1138float ANIM_unit_mapping_get_factor(Scene *scene, ID *id, FCurve *fcu, short flag, float *r_offset);
1139
1141
1142/* -------------------------------------------------------------------- */
1145
1152#define ACHANNEL_SET_FLAG(channel, smode, sflag) \
1153 { \
1154 if (smode == ACHANNEL_SETFLAG_INVERT) { \
1155 (channel)->flag ^= (sflag); \
1156 } \
1157 else if (smode == ACHANNEL_SETFLAG_ADD) { \
1158 (channel)->flag |= (sflag); \
1159 } \
1160 else { \
1161 (channel)->flag &= ~(sflag); \
1162 } \
1163 } \
1164 ((void)0)
1165
1172#define ACHANNEL_SET_FLAG_NEG(channel, smode, sflag) \
1173 { \
1174 if (smode == ACHANNEL_SETFLAG_INVERT) { \
1175 (channel)->flag ^= (sflag); \
1176 } \
1177 else if (smode == ACHANNEL_SETFLAG_ADD) { \
1178 (channel)->flag &= ~(sflag); \
1179 } \
1180 else { \
1181 (channel)->flag |= (sflag); \
1182 } \
1183 } \
1184 ((void)0)
1185
1187
1188/* -------------------------------------------------------------------- */
1193
1197void ANIM_id_update(Main *bmain, ID *id);
1201void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale);
1202
1203/* data -> channels syncing */
1204
1208void ANIM_sync_animchannels_to_data(const bContext *C);
1209
1210void ANIM_center_frame(bContext *C, int smooth_viewtx);
1211
1219rctf ANIM_frame_range_view2d_add_xmargin(const View2D &view_2d, rctf view_rect);
1220
1222
1223/* -------------------------------------------------------------------- */
1226
1227/* generic animation channels */
1229void ED_keymap_animchannels(wmKeyConfig *keyconf);
1230
1231/* generic time editing */
1233void ED_keymap_anim(wmKeyConfig *keyconf);
1234
1235/* space_graph */
1237/* space_action */
1239/* space_nla */
1241
1243
1244/* -------------------------------------------------------------------- */
1247
1248/* XXX: Should we be doing these here, or at all? */
1249
1254AnimData *ED_actedit_animdata_from_context(const bContext *C, ID **r_adt_id_owner);
1256 bContext *C, ID *id, AnimData *adt, bAction *act, ReportList *reports, bool force_delete);
1257
1263void ED_drivers_editor_init(bContext *C, ScrArea *area);
1264
1271void ED_anim_ale_fcurve_delete(bAnimContext &ac, bAnimListElem &ale);
1272
1274
1275/* -------------------------------------------------------------------- */
1278
1279namespace ed::motionpath {
1284void tag_for_recalc(bMotionPath &motion_path);
1285} // namespace ed::motionpath
1286
1290Depsgraph *animviz_depsgraph_build(Main *bmain,
1291 Scene *scene,
1292 ViewLayer *view_layer,
1293 Span<MPathTarget> targets);
1294
1299void animviz_update_motionpath_preview(Depsgraph &depsgraph, Span<MPathTarget> targets);
1305
1313void animviz_calc_motionpaths(Depsgraph *depsgraph,
1314 Scene *scene,
1316 int modified_frame);
1317
1326
1332
1334
1335/* -------------------------------------------------------------------- */
1338
1343 Vector<FCurve *> fcurves_;
1344
1345 public:
1346 void insert_fcurve(FCurve &fcurve);
1347 void clear();
1348 Span<FCurve *> fcurves() const;
1353 FCurve *get_fcurve_by_array_index(int array_index) const;
1354};
1355
1356/* FCurves grouped by their RNA path. */
1358/* For each Channelbag FCurves grouped by their RNA path. */
1360
1367bool convert_rotation_keys(const ed::AnimTransformable &transformable,
1368 ChannelbagFCurveMap &channelbag_fcurve_map,
1369 eRotationModes to_mode);
1370
1376 animrig::slot_handle_t slot_handle);
1377
1381void bake_rotation_fcurves(const ChannelbagFCurveMap &channelbag_fcurve_map,
1382 const ed::AnimTransformable &transformable);
1383
1390 ed::AnimTransformable &transformable,
1391 eRotationModes to_mode,
1392 bool bake);
1393
1395
1396} // namespace blender
Blender kernel action and pose functionality.
These structs are the foundation for all linked lists in the library system.
#define C
Definition RandGen.cpp:29
Definition scene.h:133
void insert_fcurve(FCurve &fcurve)
Span< FCurve * > fcurves() const
FCurve * get_fcurve_by_array_index(int array_index) const
decltype(blender::ActionSlot::handle) slot_handle_t
ENUM_OPERATORS(Layer::Flags)
void tag_for_recalc(bMotionPath &motion_path)
BMesh Iterators.
void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc, size_t channel_index)
void ANIM_draw_framerange(Scene *scene, View2D *v2d)
Definition anim_draw.cc:176
short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting)
void animviz_clear_motionpath_preview(Span< MPathTarget > targets)
const bAnimChannelType * ANIM_channel_get_typeinfo(const bAnimListElem *ale)
void ED_keymap_anim(wmKeyConfig *keyconf)
Definition anim_ops.cc:1922
float ANIM_UI_get_channel_name_width()
@ ANIMCONT_CHANNEL
@ ANIMCONT_SHAPEKEY
@ ANIMCONT_DRIVERS
@ ANIMCONT_CACHEFILE
@ ANIMCONT_NONE
@ ANIMCONT_TIMELINE
@ ANIMCONT_ACTION
@ ANIMCONT_DOPESHEET
@ ANIMCONT_FCURVES
@ ANIMCONT_GPENCIL
void ED_nla_postop_refresh(bAnimContext *ac)
Definition nla_edit.cc:66
void ANIM_anim_channels_select_set(bAnimContext *ac, eAnimChannels_SetFlag sel)
void(*)(void *data_link, char *r_idname) uiListPanelIDFromDataFunc
void ANIM_draw_action_framerange(AnimData *adt, bAction *action, View2D *v2d, float ymin, float ymax)
Definition anim_draw.cc:212
@ ANIM_UNITCONV_SELVERTS
@ ANIM_UNITCONV_RESTORE
@ ANIM_UNITCONV_ONLYKEYS
@ ANIM_UNITCONV_NORMALIZE_FREEZE
@ ANIM_UNITCONV_NONE
@ ANIM_UNITCONV_ONLYSEL
@ ANIM_UNITCONV_NORMALIZE
void ANIM_set_active_channel(bAnimContext *ac, void *data, eAnimCont_Types datatype, eAnimFilter_Flags filter, void *channel_data, eAnim_ChannelType channel_type)
void convert_to_rotation_mode(bContext &C, ed::AnimTransformable &transformable, const eRotationModes to_mode, const bool bake)
void ANIM_draw_cfra(const bContext *C, View2D *v2d, short flag)
Definition anim_draw.cc:60
eNlaTime_ConvertModes
Definition BKE_nla.hh:555
bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
float ANIM_nla_tweakedit_remap(bAnimListElem *ale, const float cframe, const eNlaTime_ConvertModes mode)
Definition anim_draw.cc:329
void ANIM_modifier_panels_register_graph_only(ARegionType *region_type, const char *modifier_panel_prefix, PanelTypePollFn poll_function)
eAnimChannels_SetFlag
@ ACHANNEL_SETFLAG_INVERT
@ ACHANNEL_SETFLAG_EXTEND_RANGE
@ ACHANNEL_SETFLAG_CLEAR
@ ACHANNEL_SETFLAG_ADD
@ ACHANNEL_SETFLAG_TOGGLE
void ED_keymap_animchannels(wmKeyConfig *keyconf)
rctf ANIM_frame_range_view2d_add_xmargin(const View2D &view_2d, const rctf view_rect)
Definition anim_draw.cc:848
bool ANIM_nla_mapping_allowed(const bAnimListElem *ale)
Definition anim_draw.cc:279
@ ANIMTYPE_MASKDATABLOCK
@ ANIMTYPE_NLAACTION
@ ANIMTYPE_NLACURVE
@ ANIMTYPE_GREASE_PENCIL_LAYER_GROUP
@ ANIMTYPE_DSPOINTCLOUD
@ ANIMTYPE_DSMCLIP
@ ANIMTYPE_DSLIGHTPROBE
@ ANIMTYPE_DSNTREE
@ ANIMTYPE_GREASE_PENCIL_DATABLOCK
@ ANIMTYPE_FCURVE
@ ANIMTYPE_ANIMDATA
@ ANIMTYPE_DSVOLUME
@ ANIMTYPE_NLATRACK
@ ANIMTYPE_OBJECT
@ ANIMTYPE_GPLAYER
@ ANIMTYPE_GREASE_PENCIL_LAYER
@ ANIMTYPE_DSMBALL
@ ANIMTYPE_DSMESH
@ ANIMTYPE_NUM_TYPES
@ ANIMTYPE_NLACONTROLS
@ ANIMTYPE_DSHAIR
@ ANIMTYPE_FILLDRIVERS
@ ANIMTYPE_SUMMARY
@ ANIMTYPE_FILLACT_LAYERED
@ ANIMTYPE_SHAPEKEY
@ ANIMTYPE_SPECIALDATA__UNUSED
@ ANIMTYPE_ACTION_SLOT
@ ANIMTYPE_DSCACHEFILE
@ ANIMTYPE_MASKLAYER
@ ANIMTYPE_DSGPENCIL
@ ANIMTYPE_DSPART
@ ANIMTYPE_FILLACTD
@ ANIMTYPE_DSSKEY
@ ANIMTYPE_DSLINESTYLE
@ ANIMTYPE_PALETTE
bool ANIM_animdata_context_getdata(bAnimContext *ac)
bAction * ANIM_active_action_from_area(const Main &bmain, Scene *scene, ViewLayer *view_layer, const ScrArea *area, ID **r_action_user)
bool ANIM_animdata_can_have_greasepencil(const eAnimCont_Types type)
void ANIM_nla_mapping_apply_if_needed_fcurve(bAnimListElem *ale, FCurve *fcu, const bool restore, const bool only_keys)
Definition anim_draw.cc:406
void ANIM_animdata_update(bAnimContext *ac, ListBaseT< bAnimListElem > *anim_data)
Definition anim_deps.cc:365
@ ACHANNEL_ROLE_CHANNEL
@ ACHANNEL_ROLE_EXPANDER
void ED_operatortypes_anim()
Definition anim_ops.cc:1860
float ANIM_UI_get_channel_height()
bool ANIM_nla_context_track_ptr(const bContext *C, PointerRNA *r_ptr)
void ED_animedit_unlink_action(bContext *C, ID *id, AnimData *adt, bAction *act, ReportList *reports, bool force_delete)
void ANIM_id_update(Main *bmain, ID *id)
Definition anim_deps.cc:105
void animviz_build_motionpath_targets(Object *ob, Vector< MPathTarget > &r_targets)
float ANIM_UI_get_first_channel_top(View2D *v2d)
eAnimChannel_Settings
@ ACHANNEL_SETTING_EXPAND
@ ACHANNEL_SETTING_MUTE
@ ACHANNEL_SETTING_MOD_OFF
@ ACHANNEL_SETTING_PROTECT
@ ACHANNEL_SETTING_VISIBLE
@ ACHANNEL_SETTING_SOLO
@ ACHANNEL_SETTING_PINNED
@ ACHANNEL_SETTING_ALWAYS_VISIBLE
@ ACHANNEL_SETTING_SELECT
@ ALE_GREASE_PENCIL_GROUP
@ ALE_ACTION_LAYERED
@ ALE_GREASE_PENCIL_DATA
@ ALE_ACTION_SLOT
@ ALE_GREASE_PENCIL_CEL
ChannelbagFCurveMap build_rotation_fcurve_map(animrig::Action &action, const animrig::slot_handle_t slot_handle)
void ANIM_center_frame(bContext *C, int smooth_viewtx)
Definition anim_draw.cc:801
float ANIM_UI_get_channel_button_width()
Depsgraph * animviz_depsgraph_build(Main *bmain, Scene *scene, ViewLayer *view_layer, const Span< MPathTarget > targets)
size_t ANIM_animdata_filter(bAnimContext *ac, ListBaseT< bAnimListElem > *anim_data, const eAnimFilter_Flags filter_mode, void *data, const eAnimCont_Types datatype)
void ED_operatormacros_graph()
Definition graph_ops.cc:518
@ ANIMFILTER_FCURVESONLY
@ ANIMFILTER_TMP_IGNORE_ONLYSEL
@ ANIMFILTER_ANIMDATA
@ ANIMFILTER_FOREDIT
@ ANIMFILTER_LIST_VISIBLE
@ ANIMFILTER_DATA_VISIBLE
@ ANIMFILTER_CURVE_VISIBLE
@ ANIMFILTER_UNSEL
@ ANIMFILTER_ACTGROUPED
@ ANIMFILTER_ACTIVE
@ ANIMFILTER_TMP_PEEK
@ ANIMFILTER_NODUPLIS
@ ANIMFILTER_SELEDIT
@ ANIMFILTER_LIST_CHANNELS
size_t ANIM_animfilter_action_slot(bAnimContext *ac, ListBaseT< bAnimListElem > *anim_data, animrig::Action &action, animrig::Slot &slot, const eAnimFilter_Flags filter_mode, ID *animated_id)
BMesh const char void * data
NlaTrack * ANIM_nla_context_track(const bContext *C)
void ANIM_channel_setting_set(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting, eAnimChannels_SetFlag mode)
bool convert_rotation_keys(const ed::AnimTransformable &transformable, ChannelbagFCurveMap &channelbag_fcurve_map, const eRotationModes to_mode)
void ANIM_fmodifier_panels(const bContext *C, ID *owner_id, ListBaseT< FModifier > *fmodifiers, uiListPanelIDFromDataFunc panel_id_fn)
void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale)
Definition anim_deps.cc:54
bool ANIM_is_active_channel(bAnimListElem *ale)
void ANIM_deselect_keys_in_animation_editors(bContext *C)
Definition anim_deps.cc:487
Map< std::string, SortedFCurveBuffer > RNAFCurveMap
unsigned char uint8_t
Definition BKE_text.h:79
NlaStrip * ANIM_nla_context_strip(const bContext *C)
void animviz_calc_motionpaths(Depsgraph *depsgraph, Scene *scene, MutableSpan< MPathTarget > targets, const int modified_frame)
void nla_action_get_color(AnimData *adt, bAction *act, float color[4])
Definition nla_draw.cc:54
bool ANIM_fmodifiers_paste_from_buf(ListBaseT< FModifier > *modifiers, bool replace, FCurve *curve)
void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListElem *ale, ui::Block *block, const rctf *rect, size_t channel_index)
void ANIM_draw_previewrange(const Scene *scene, View2D *v2d, int end_frame_width)
Definition anim_draw.cc:88
bAction * ANIM_channel_action_get(const bAnimListElem *ale)
float ANIM_UI_get_channel_skip()
void ED_anim_ale_fcurve_delete(bAnimContext &ac, bAnimListElem &ale)
void ED_operatortypes_animchannels()
void animviz_motionpath_compute_range(Object *ob, Scene *scene)
eAnimEditDraw_CurrentFrame
@ DRAWCFRA_UNIT_SECONDS
Map< animrig::Channelbag *, RNAFCurveMap > ChannelbagFCurveMap
void bake_rotation_fcurves(const ChannelbagFCurveMap &channelbag_fcurve_map, const ed::AnimTransformable &transformable)
float ANIM_UI_get_channels_total_height(View2D *v2d, const int item_count)
void ANIM_sync_animchannels_to_data(const bContext *C)
Definition anim_deps.cc:270
void ANIM_fmodifiers_copybuf_free()
void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBaseT< bAnimListElem > *anim_data, bAnimListElem *ale_setting, eAnimChannel_Settings setting, eAnimChannels_SetFlag mode)
void ANIM_channel_debug_print_info(bAnimContext &ac, bAnimListElem *ale, short indent_level)
FCurve * ANIM_graph_context_fcurve(const bContext *C)
void ANIM_animdata_freelist(ListBaseT< bAnimListElem > *anim_data)
Definition anim_deps.cc:472
std::optional< int > getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
float ANIM_unit_mapping_get_factor(Scene *scene, ID *id, FCurve *fcu, short flag, float *r_offset)
Definition anim_draw.cc:636
void ANIM_nla_mapping_apply_fcurve(AnimData *adt, FCurve *fcu, bool restore, bool only_keys)
Definition anim_draw.cc:379
void getcolor_fcurve_rainbow(int cur, int tot, float out[3])
void ED_drivers_editor_init(bContext *C, ScrArea *area)
signed int int32_t
Definition BKE_text.h:78
float ANIM_UI_get_keyframe_scale_factor()
void ED_operatormacros_action()
Definition action_ops.cc:75
bool ANIM_fmodifiers_copy_to_buf(ListBaseT< FModifier > *modifiers, bool active)
void ED_operatormacros_nla()
Definition nla_ops.cc:152
void ANIM_modifier_panels_register_graph_and_NLA(ARegionType *region_type, const char *modifier_panel_prefix, PanelTypePollFn poll_function)
AnimData * ED_actedit_animdata_from_context(const bContext *C, ID **r_adt_id_owner)
bool(*)(const bContext *C, PanelType *pt) PanelTypePollFn
std::string getname_anim_fcurve_for_slot(Main &bmain, const animrig::Slot &slot, FCurve &fcurve)
float ANIM_UI_get_channel_step()
void ANIM_draw_scene_strip_range(const bContext *C, View2D *v2d)
Definition anim_draw.cc:119
@ ANIM_UPDATE_ORDER
@ ANIM_UPDATE_DEPS
@ ANIM_UPDATE_HANDLES
bool ANIM_nla_context_strip_ptr(const bContext *C, PointerRNA *r_ptr)
void ANIM_anim_channels_select_toggle(bAnimContext *ac)
void animviz_update_motionpath_preview(Depsgraph &depsgraph, Span< MPathTarget > targets)
void ANIM_frame_channel_y_extents(bContext *C, bAnimContext *ac)
short ANIM_get_normalization_flags(SpaceLink *space_link)
Definition anim_draw.cc:420
AnimKeylist * keylist
bMotionPath * mpath
bPoseChannel * pchan
void(*) name(bAnimListElem *ale, char *name)
bool(*) name_prop(bAnimListElem *ale, PointerRNA *r_ptr, PropertyRNA **r_prop)
bool(*) has_setting(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting)
short(*) get_offset(bAnimContext *ac, bAnimListElem *ale)
short(*) get_indent_level(bAnimContext *ac, bAnimListElem *ale)
int(*) setting_flag(bAnimContext *ac, eAnimChannel_Settings setting, bool *r_neg)
void(*) draw_backdrop(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc)
void(*) get_backdrop_color(bAnimContext *ac, bAnimListElem *ale, float r_color[3])
bool(*) get_channel_color(const bAnimListElem *ale, uint8_t r_color[3])
void(*) setting_post_update(Main &bmain, const bAnimListElem &ale, eAnimChannel_Settings setting)
int(*) icon(bAnimListElem *ale)
eAnimChannel_Role channel_role
ListBaseT< TimeMarker > * markers
eRegion_Type regiontype
eGraphEdit_Mode grapheditor_mode
eAnimEdit_Context dopesheet_mode
eAnimCont_Types datatype
eAnim_ChannelType type
eAnim_Update_Flags update
bAnimListElem * prev
bAnimListElem * next