Blender  V3.3
ED_anim_api.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2008 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 struct AnimData;
15 struct Depsgraph;
16 struct ID;
17 struct ListBase;
18 
19 struct ARegion;
20 struct ARegionType;
21 struct FModifier;
22 struct Main;
23 struct NlaStrip;
24 struct PanelType;
25 struct ReportList;
26 struct ScrArea;
27 struct SpaceLink;
28 struct View2D;
29 struct bContext;
30 struct wmKeyConfig;
31 
32 struct Object;
33 struct Scene;
34 
35 struct bDopeSheet;
36 
37 struct FCurve;
38 struct FModifier;
39 struct bAction;
40 
41 struct uiBlock;
42 
43 struct PointerRNA;
44 struct PropertyRNA;
45 
46 /* ************************************************ */
47 /* ANIMATION CHANNEL FILTERING */
48 /* anim_filter.c */
49 
50 /* -------------------------------------------------------------------- */
58 typedef struct bAnimContext {
60  void *data;
62  short datatype;
63 
65  short mode;
67  short spacetype;
69  short regiontype;
70 
72  struct ScrArea *area;
74  struct SpaceLink *sl;
76  struct ARegion *region;
77 
79  struct bDopeSheet *ads;
80 
82  struct Main *bmain;
84  struct Scene *scene;
90  struct Object *obact;
93 
96 
98  float yscale_fac;
100 
101 /* Main Data container types */
102 typedef enum eAnimCont_Types {
103  ANIMCONT_NONE = 0, /* invalid or no data */
104  ANIMCONT_ACTION = 1, /* action (bAction) */
105  ANIMCONT_SHAPEKEY = 2, /* shapekey (Key) */
106  ANIMCONT_GPENCIL = 3, /* grease pencil (screen) */
107  ANIMCONT_DOPESHEET = 4, /* dopesheet (bDopesheet) */
108  ANIMCONT_FCURVES = 5, /* animation F-Curves (bDopesheet) */
109  ANIMCONT_DRIVERS = 6, /* drivers (bDopesheet) */
110  ANIMCONT_NLA = 7, /* nla (bDopesheet) */
111  ANIMCONT_CHANNEL = 8, /* animation channel (bAnimListElem) */
112  ANIMCONT_MASK = 9, /* mask dopesheet */
113  ANIMCONT_TIMELINE = 10, /* "timeline" editor (bDopeSheet) */
115 
118 /* -------------------------------------------------------------------- */
126 typedef struct bAnimListElem {
128 
130  void *data;
132  int type;
134  int flag;
136  int index;
137 
139  char update;
141  char tag;
142 
144  short datatype;
146  void *key_data;
147 
160  struct ID *id;
162  struct AnimData *adt;
163 
176 
180  void *owner;
182 
189 typedef enum eAnim_ChannelType {
193 
195 
200 
203 
206 
229 
231 
234 
237 
240 
242 
243  /* always as last item, the total number of channel types... */
246 
247 /* types of keyframe data in bAnimListElem */
248 typedef enum eAnim_KeyType {
249  ALE_NONE = 0, /* no keyframe data */
250  ALE_FCURVE, /* F-Curve */
251  ALE_GPFRAME, /* Grease Pencil Frames */
252  ALE_MASKLAY, /* Mask */
253  ALE_NLASTRIP, /* NLA Strips */
254 
255  ALE_ALL, /* All channels summary */
256  ALE_SCE, /* Scene summary */
257  ALE_OB, /* Object summary */
258  ALE_ACT, /* Action summary */
259  ALE_GROUP, /* Action Group summary */
261 
267 typedef enum eAnim_Update_Flags {
268  ANIM_UPDATE_DEPS = (1 << 0), /* referenced data and dependencies get refreshed */
269  ANIM_UPDATE_ORDER = (1 << 1), /* keyframes need to be sorted */
270  ANIM_UPDATE_HANDLES = (1 << 2), /* recalculate handles */
272 
273 /* used for most tools which change keyframes (flushed by ANIM_animdata_update) */
274 #define ANIM_UPDATE_DEFAULT (ANIM_UPDATE_DEPS | ANIM_UPDATE_ORDER | ANIM_UPDATE_HANDLES)
275 #define ANIM_UPDATE_DEFAULT_NOHANDLES (ANIM_UPDATE_DEFAULT & ~ANIM_UPDATE_HANDLES)
276 
279 /* -------------------------------------------------------------------- */
283 /* filtering flags - under what circumstances should a channel be returned */
284 typedef enum eAnimFilter_Flags {
298 
301 
303  ANIMFILTER_ACTIVE = (1 << 4),
306 
308  ANIMFILTER_SEL = (1 << 6),
309  ANIMFILTER_UNSEL = (1 << 7),
310 
312  ANIMFILTER_FOREDIT = (1 << 8),
315  ANIMFILTER_SELEDIT = (1 << 9),
316 
322  ANIMFILTER_ANIMDATA = (1 << 10),
323 
325  ANIMFILTER_NODUPLIS = (1 << 11),
326 
329 
331  ANIMFILTER_TMP_PEEK = (1 << 30),
332 
335 
338 
341 /* -------------------------------------------------------------------- */
345 /* XXX check on all of these flags again. */
346 
347 /* Dopesheet only */
348 /* 'Scene' channels */
349 #define SEL_SCEC(sce) (CHECK_TYPE_INLINE(sce, Scene *), ((sce->flag & SCE_DS_SELECTED)))
350 #define EXPANDED_SCEC(sce) (CHECK_TYPE_INLINE(sce, Scene *), ((sce->flag & SCE_DS_COLLAPSED) == 0))
351 /* 'Sub-Scene' channels (flags stored in Data block) */
352 #define FILTER_WOR_SCED(wo) (CHECK_TYPE_INLINE(wo, World *), (wo->flag & WO_DS_EXPAND))
353 #define FILTER_LS_SCED(linestyle) ((linestyle->flag & LS_DS_EXPAND))
354 /* 'Object' channels */
355 #define SEL_OBJC(base) (CHECK_TYPE_INLINE(base, Base *), ((base->flag & SELECT)))
356 #define EXPANDED_OBJC(ob) \
357  (CHECK_TYPE_INLINE(ob, Object *), (((ob)->nlaflag & OB_ADS_COLLAPSED) == 0))
358 /* 'Sub-object' channels (flags stored in Data block) */
359 #define FILTER_SKE_OBJD(key) (CHECK_TYPE_INLINE(key, Key *), ((key->flag & KEY_DS_EXPAND)))
360 #define FILTER_MAT_OBJD(ma) (CHECK_TYPE_INLINE(ma, Material *), ((ma->flag & MA_DS_EXPAND)))
361 #define FILTER_LAM_OBJD(la) (CHECK_TYPE_INLINE(la, Light *), ((la->flag & LA_DS_EXPAND)))
362 #define FILTER_CAM_OBJD(ca) (CHECK_TYPE_INLINE(ca, Camera *), ((ca->flag & CAM_DS_EXPAND)))
363 #define FILTER_CACHEFILE_OBJD(cf) \
364  (CHECK_TYPE_INLINE(cf, CacheFile *), (((cf)->flag & CACHEFILE_DS_EXPAND)))
365 #define FILTER_CUR_OBJD(cu) (CHECK_TYPE_INLINE(cu, Curve *), ((cu->flag & CU_DS_EXPAND)))
366 #define FILTER_PART_OBJD(part) \
367  (CHECK_TYPE_INLINE(part, ParticleSettings *), (((part)->flag & PART_DS_EXPAND)))
368 #define FILTER_MBALL_OBJD(mb) (CHECK_TYPE_INLINE(mb, MetaBall *), ((mb->flag2 & MB_DS_EXPAND)))
369 #define FILTER_ARM_OBJD(arm) (CHECK_TYPE_INLINE(arm, bArmature *), ((arm->flag & ARM_DS_EXPAND)))
370 #define FILTER_MESH_OBJD(me) (CHECK_TYPE_INLINE(me, Mesh *), ((me->flag & ME_DS_EXPAND)))
371 #define FILTER_LATTICE_OBJD(lt) (CHECK_TYPE_INLINE(lt, Lattice *), ((lt->flag & LT_DS_EXPAND)))
372 #define FILTER_SPK_OBJD(spk) (CHECK_TYPE_INLINE(spk, Speaker *), ((spk->flag & SPK_DS_EXPAND)))
373 #define FILTER_CURVES_OBJD(ha) (CHECK_TYPE_INLINE(ha, Curves *), ((ha->flag & HA_DS_EXPAND)))
374 #define FILTER_POINTS_OBJD(pt) (CHECK_TYPE_INLINE(pt, PointCloud *), ((pt->flag & PT_DS_EXPAND)))
375 #define FILTER_VOLUME_OBJD(vo) (CHECK_TYPE_INLINE(vo, Volume *), ((vo->flag & VO_DS_EXPAND)))
376 #define FILTER_SIMULATION_OBJD(sim) \
377  (CHECK_TYPE_INLINE(sim, Simulation *), ((sim->flag & SIM_DS_EXPAND)))
378 /* Variable use expanders */
379 #define FILTER_NTREE_DATA(ntree) \
380  (CHECK_TYPE_INLINE(ntree, bNodeTree *), (((ntree)->flag & NTREE_DS_EXPAND)))
381 #define FILTER_TEX_DATA(tex) (CHECK_TYPE_INLINE(tex, Tex *), ((tex->flag & TEX_DS_EXPAND)))
382 
383 /* 'Sub-object/Action' channels (flags stored in Action) */
384 #define SEL_ACTC(actc) ((actc->flag & ACT_SELECTED))
385 #define EXPANDED_ACTC(actc) ((actc->flag & ACT_COLLAPSED) == 0)
386 /* 'Sub-AnimData' channels */
387 #define EXPANDED_DRVD(adt) ((adt->flag & ADT_DRIVERS_COLLAPSED) == 0)
388 
389 /* Actions (also used for Dopesheet) */
391 #define EDITABLE_AGRP(agrp) (((agrp)->flag & AGRP_PROTECTED) == 0)
392 #define EXPANDED_AGRP(ac, agrp) \
393  (((!(ac) || ((ac)->spacetype != SPACE_GRAPH)) && ((agrp)->flag & AGRP_EXPANDED)) || \
394  (((ac) && ((ac)->spacetype == SPACE_GRAPH)) && ((agrp)->flag & AGRP_EXPANDED_G)))
395 #define SEL_AGRP(agrp) (((agrp)->flag & AGRP_SELECTED) || ((agrp)->flag & AGRP_ACTIVE))
397 #define EDITABLE_FCU(fcu) ((fcu->flag & FCURVE_PROTECTED) == 0)
398 #define SEL_FCU(fcu) (fcu->flag & FCURVE_SELECTED)
399 
400 /* ShapeKey mode only */
401 #define EDITABLE_SHAPEKEY(kb) ((kb->flag & KEYBLOCK_LOCKED) == 0)
402 #define SEL_SHAPEKEY(kb) (kb->flag & KEYBLOCK_SEL)
403 
404 /* Grease Pencil only */
406 #define EXPANDED_GPD(gpd) (gpd->flag & GP_DATA_EXPAND)
408 #define EDITABLE_GPL(gpl) ((gpl->flag & GP_LAYER_LOCKED) == 0)
409 #define SEL_GPL(gpl) (gpl->flag & GP_LAYER_SELECT)
410 
411 /* Mask Only */
413 #define EXPANDED_MASK(mask) (mask->flag & MASK_ANIMF_EXPAND)
415 #define EDITABLE_MASK(masklay) ((masklay->flag & MASK_LAYERFLAG_LOCKED) == 0)
416 #define SEL_MASKLAY(masklay) (masklay->flag & SELECT)
417 
418 /* NLA only */
419 #define SEL_NLT(nlt) (nlt->flag & NLATRACK_SELECTED)
420 #define EDITABLE_NLT(nlt) ((nlt->flag & NLATRACK_PROTECTED) == 0)
421 
422 /* Movie clip only */
423 #define EXPANDED_MCLIP(clip) (clip->flag & MCLIP_DATA_EXPAND)
424 
425 /* Palette only */
426 #define EXPANDED_PALETTE(palette) (palette->flag & PALETTE_DATA_EXPAND)
427 
428 /* AnimData - NLA mostly... */
429 #define SEL_ANIMDATA(adt) (adt->flag & ADT_UI_SELECTED)
430 
433 /* -------------------------------------------------------------------- */
438 #define ACHANNEL_FIRST_TOP(ac) \
439  (UI_view2d_scale_get_y(&(ac)->region->v2d) * -UI_TIME_SCRUB_MARGIN_Y - ACHANNEL_SKIP)
440 #define ACHANNEL_HEIGHT(ac) (0.8f * (ac)->yscale_fac * U.widget_unit)
441 #define ACHANNEL_SKIP (0.1f * U.widget_unit)
442 #define ACHANNEL_STEP(ac) (ACHANNEL_HEIGHT(ac) + ACHANNEL_SKIP)
444 #define ACHANNEL_TOT_HEIGHT(ac, item_amount) \
445  (-ACHANNEL_FIRST_TOP(ac) + ACHANNEL_STEP(ac) * (item_amount + 1))
446 
448 #define ACHANNEL_NAMEWIDTH (10 * U.widget_unit)
449 
451 #define ACHANNEL_BUTTON_WIDTH (0.8f * U.widget_unit)
452 
455 /* -------------------------------------------------------------------- */
460 #define NLACHANNEL_FIRST_TOP(ac) \
461  (UI_view2d_scale_get_y(&(ac)->region->v2d) * -UI_TIME_SCRUB_MARGIN_Y - NLACHANNEL_SKIP)
462 #define NLACHANNEL_HEIGHT(snla) \
463  (((snla) && ((snla)->flag & SNLA_NOSTRIPCURVES)) ? (0.8f * U.widget_unit) : \
464  (1.2f * U.widget_unit))
465 #define NLACHANNEL_SKIP (0.1f * U.widget_unit)
466 #define NLACHANNEL_STEP(snla) (NLACHANNEL_HEIGHT(snla) + NLACHANNEL_SKIP)
468 #define NLACHANNEL_TOT_HEIGHT(ac, item_amount) \
469  (-NLACHANNEL_FIRST_TOP(ac) + NLACHANNEL_STEP(((SpaceNla *)(ac)->sl)) * (item_amount + 1))
470 
472 #define NLACHANNEL_NAMEWIDTH (10 * U.widget_unit)
473 
475 #define NLACHANNEL_BUTTON_WIDTH (0.8f * U.widget_unit)
476 
479 /* -------------------------------------------------------------------- */
492  ListBase *anim_data,
493  eAnimFilter_Flags filter_mode,
494  void *data,
495  eAnimCont_Types datatype);
496 
505 
514 
518 void ANIM_animdata_update(bAnimContext *ac, ListBase *anim_data);
519 
520 void ANIM_animdata_freelist(ListBase *anim_data);
521 
526 
527 /* ************************************************ */
528 /* ANIMATION CHANNELS LIST */
529 /* anim_channels_*.c */
530 
533 /* -------------------------------------------------------------------- */
538 typedef enum eAnimChannel_Role {
542  /* ACHANNEL_ROLE_SPECIAL = 0, */ /* UNUSED */
546 
547 /* flag-setting behavior */
548 typedef enum eAnimChannels_SetFlag {
558 
559 /* types of settings for AnimChannels */
560 typedef enum eAnimChannel_Settings {
576 
578 typedef struct bAnimChannelType {
579  /* -- Type data -- */
580  /* name of the channel type, for debugging */
581  const char *channel_type_name;
582  /* "level" or role in hierarchy - for finding the active channel */
584 
585  /* -- Drawing -- */
587  void (*get_backdrop_color)(bAnimContext *ac, bAnimListElem *ale, float r_color[3]);
589  void (*draw_backdrop)(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc);
593  short (*get_offset)(bAnimContext *ac, bAnimListElem *ale);
594 
596  void (*name)(bAnimListElem *ale, char *name);
598  bool (*name_prop)(bAnimListElem *ale, struct PointerRNA *ptr, struct PropertyRNA **prop);
600  int (*icon)(bAnimListElem *ale);
601 
602  /* -- Settings -- */
606  int (*setting_flag)(bAnimContext *ac, eAnimChannel_Settings setting, bool *neg);
612  void *(*setting_ptr)(bAnimListElem *ale, eAnimChannel_Settings setting, short *type);
614 
617 /* -------------------------------------------------------------------- */
625 
629 void ANIM_channel_debug_print_info(bAnimListElem *ale, short indent_level);
630 
635 
639 void ANIM_channel_draw(
640  bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc, size_t channel_index);
645  bAnimContext *ac,
646  bAnimListElem *ale,
647  struct uiBlock *block,
648  rctf *rect,
649  size_t channel_index);
650 
653 /* -------------------------------------------------------------------- */
662  bAnimListElem *ale,
663  eAnimChannel_Settings setting);
664 
669  bAnimListElem *ale,
670  eAnimChannel_Settings setting,
671  eAnimChannels_SetFlag mode);
672 
684  ListBase *anim_data,
685  bAnimListElem *ale_setting,
686  eAnimChannel_Settings setting,
687  eAnimChannels_SetFlag mode);
688 
693 
698 
703  void *data,
704  eAnimCont_Types datatype,
706  void *channel_data,
707  eAnim_ChannelType channel_type);
708 
713 void ANIM_fcurve_delete_from_animdata(bAnimContext *ac, struct AnimData *adt, struct FCurve *fcu);
714 
722 
723 /* ************************************************ */
724 /* DRAWING API */
725 /* anim_draw.c */
726 
729 /* -------------------------------------------------------------------- */
735 /* flags for Current Frame Drawing */
738  /* DRAWCFRA_PLAIN = 0, */ /* UNUSED */
742  DRAWCFRA_WIDE = (1 << 1),
744 
748 void ANIM_draw_cfra(const struct bContext *C, struct View2D *v2d, short flag);
749 
752 /* -------------------------------------------------------------------- */
761 void ANIM_draw_previewrange(const struct bContext *C, struct View2D *v2d, int end_frame_width);
762 
765 /* -------------------------------------------------------------------- */
776 void ANIM_draw_framerange(struct Scene *scene, struct View2D *v2d);
777 
783  struct AnimData *adt, struct bAction *action, struct View2D *v2d, float ymin, float ymax);
784 
785 /* ************************************************* */
786 /* F-MODIFIER TOOLS */
787 
790 /* -------------------------------------------------------------------- */
794 bool ANIM_nla_context_track_ptr(const struct bContext *C, struct PointerRNA *r_ptr);
795 bool ANIM_nla_context_strip_ptr(const struct bContext *C, struct PointerRNA *r_ptr);
796 
797 struct NlaTrack *ANIM_nla_context_track(const struct bContext *C);
798 struct NlaStrip *ANIM_nla_context_strip(const struct bContext *C);
800 
802 typedef bool (*PanelTypePollFn)(const struct bContext *C, struct PanelType *pt);
804 typedef void (*uiListPanelIDFromDataFunc)(void *data_link, char *r_idname);
805 
809 void ANIM_fmodifier_panels(const struct bContext *C,
810  struct ID *owner_id,
811  struct ListBase *fmodifiers,
812  uiListPanelIDFromDataFunc panel_id_fn);
813 
815  const char *modifier_panel_prefix,
816  PanelTypePollFn poll_function);
818  const char *modifier_panel_prefix,
819  PanelTypePollFn poll_function);
820 
823 /* -------------------------------------------------------------------- */
831 
837 bool ANIM_fmodifiers_copy_to_buf(ListBase *modifiers, bool active);
838 
843 bool ANIM_fmodifiers_paste_from_buf(ListBase *modifiers, bool replace, struct FCurve *curve);
844 
845 /* ************************************************* */
846 /* ASSORTED TOOLS */
847 
850 /* -------------------------------------------------------------------- */
854 /* anim_ipo_utils.c */
855 
866 int getname_anim_fcurve(char *name, struct ID *id, struct FCurve *fcu);
867 
871 void getcolor_fcurve_rainbow(int cur, int tot, float out[3]);
872 
875 /* -------------------------------------------------------------------- */
886 void nla_action_get_color(struct AnimData *adt, struct bAction *act, float color[4]);
887 
890 /* -------------------------------------------------------------------- */
894 /* anim_draw.c */
895 
902 
908 void ANIM_nla_mapping_apply_fcurve(struct AnimData *adt,
909  struct FCurve *fcu,
910  bool restore,
911  bool only_keys);
912 
913 /* ..... */
914 
920 
923 /* -------------------------------------------------------------------- */
927 /* anim_draw.c */
928 
930 typedef enum eAnimUnitConv_Flags {
939  /* ANIM_UNITCONV_SKIPKNOTS = (1 << 4), */ /* UNUSED */
948 
957  struct Scene *scene, struct ID *id, struct FCurve *fcu, short flag, float *r_offset);
958 
961 /* -------------------------------------------------------------------- */
969 #define BEZKEYTYPE(bezt) ((bezt)->hide)
970 
977 #define ACHANNEL_SET_FLAG(channel, smode, sflag) \
978  { \
979  if (smode == ACHANNEL_SETFLAG_INVERT) { \
980  (channel)->flag ^= (sflag); \
981  } \
982  else if (smode == ACHANNEL_SETFLAG_ADD) { \
983  (channel)->flag |= (sflag); \
984  } \
985  else { \
986  (channel)->flag &= ~(sflag); \
987  } \
988  } \
989  ((void)0)
990 
997 #define ACHANNEL_SET_FLAG_NEG(channel, smode, sflag) \
998  { \
999  if (smode == ACHANNEL_SETFLAG_INVERT) { \
1000  (channel)->flag ^= (sflag); \
1001  } \
1002  else if (smode == ACHANNEL_SETFLAG_ADD) { \
1003  (channel)->flag &= ~(sflag); \
1004  } \
1005  else { \
1006  (channel)->flag |= (sflag); \
1007  } \
1008  } \
1009  ((void)0)
1010 
1013 /* anim_deps.c */
1014 
1015 /* -------------------------------------------------------------------- */
1022 void ANIM_id_update(struct Main *bmain, struct ID *id);
1026 void ANIM_list_elem_update(struct Main *bmain, struct Scene *scene, bAnimListElem *ale);
1027 
1028 /* data -> channels syncing */
1029 
1034 
1035 void ANIM_center_frame(struct bContext *C, int smooth_viewtx);
1036 
1039 /* -------------------------------------------------------------------- */
1043 /* generic animation channels */
1045 void ED_keymap_animchannels(struct wmKeyConfig *keyconf);
1046 
1047 /* generic time editing */
1048 void ED_operatortypes_anim(void);
1049 void ED_keymap_anim(struct wmKeyConfig *keyconf);
1050 
1051 /* space_graph */
1052 void ED_operatormacros_graph(void);
1053 /* space_action */
1054 void ED_operatormacros_action(void);
1055 /* space_nla*/
1056 void ED_operatormacros_nla(void);
1057 
1060 /* -------------------------------------------------------------------- */
1064 /* XXX: Should we be doing these here, or at all? */
1065 
1071  struct ID **r_adt_id_owner);
1072 void ED_animedit_unlink_action(struct bContext *C,
1073  struct ID *id,
1074  struct AnimData *adt,
1075  struct bAction *act,
1076  struct ReportList *reports,
1077  bool force_delete);
1078 
1084 void ED_drivers_editor_init(struct bContext *C, struct ScrArea *area);
1085 
1086 /* ************************************************ */
1087 
1088 typedef enum eAnimvizCalcRange {
1091 
1094 
1098 
1099 struct Depsgraph *animviz_depsgraph_build(struct Main *bmain,
1100  struct Scene *scene,
1101  struct ViewLayer *view_layer,
1102  struct ListBase *targets);
1103 
1105  struct Main *bmain,
1106  struct Scene *scene,
1107  ListBase *targets,
1108  eAnimvizCalcRange range,
1109  bool restore);
1110 
1118 void animviz_motionpath_compute_range(struct Object *ob, struct Scene *scene);
1119 
1124 void animviz_get_object_motionpaths(struct Object *ob, ListBase *targets);
1125 
1128 #ifdef __cplusplus
1129 }
1130 #endif
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
void ED_animedit_unlink_action(struct bContext *C, struct ID *id, struct AnimData *adt, struct bAction *act, struct ReportList *reports, bool force_delete)
Definition: action_data.c:550
eAnimChannels_SetFlag
Definition: ED_anim_api.h:548
@ ACHANNEL_SETFLAG_TOGGLE
Definition: ED_anim_api.h:556
@ ACHANNEL_SETFLAG_ADD
Definition: ED_anim_api.h:552
@ ACHANNEL_SETFLAG_INVERT
Definition: ED_anim_api.h:554
@ ACHANNEL_SETFLAG_CLEAR
Definition: ED_anim_api.h:550
int getname_anim_fcurve(char *name, struct ID *id, struct FCurve *fcu)
void ED_operatortypes_animchannels(void)
bool ANIM_animdata_can_have_greasepencil(const eAnimCont_Types type)
Definition: anim_filter.c:417
void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAnimListElem *ale_setting, eAnimChannel_Settings setting, eAnimChannels_SetFlag mode)
void ANIM_anim_channels_select_set(bAnimContext *ac, eAnimChannels_SetFlag sel)
void ANIM_draw_action_framerange(struct AnimData *adt, struct bAction *action, struct View2D *v2d, float ymin, float ymax)
Definition: anim_draw.c:149
void ED_drivers_editor_init(struct bContext *C, struct ScrArea *area)
Definition: graph_utils.c:38
void ANIM_fmodifier_panels(const struct bContext *C, struct ID *owner_id, struct ListBase *fmodifiers, uiListPanelIDFromDataFunc panel_id_fn)
void animviz_motionpath_compute_range(struct Object *ob, struct Scene *scene)
eAnim_ChannelType
Definition: ED_anim_api.h:189
@ ANIMTYPE_DSSPK
Definition: ED_anim_api.h:222
@ ANIMTYPE_DSTEX
Definition: ED_anim_api.h:219
@ ANIMTYPE_SUMMARY
Definition: ED_anim_api.h:194
@ ANIMTYPE_DSNTREE
Definition: ED_anim_api.h:214
@ ANIMTYPE_NLACURVE
Definition: ED_anim_api.h:202
@ ANIMTYPE_SHAPEKEY
Definition: ED_anim_api.h:230
@ ANIMTYPE_DSMBALL
Definition: ED_anim_api.h:216
@ ANIMTYPE_DSCAM
Definition: ED_anim_api.h:209
@ ANIMTYPE_DSPOINTCLOUD
Definition: ED_anim_api.h:226
@ ANIMTYPE_FILLDRIVERS
Definition: ED_anim_api.h:205
@ ANIMTYPE_NONE
Definition: ED_anim_api.h:190
@ ANIMTYPE_DSPART
Definition: ED_anim_api.h:215
@ ANIMTYPE_DSLINESTYLE
Definition: ED_anim_api.h:221
@ ANIMTYPE_GROUP
Definition: ED_anim_api.h:198
@ ANIMTYPE_SPECIALDATA__UNUSED
Definition: ED_anim_api.h:192
@ ANIMTYPE_DSCUR
Definition: ED_anim_api.h:211
@ ANIMTYPE_SCENE
Definition: ED_anim_api.h:196
@ ANIMTYPE_DSARM
Definition: ED_anim_api.h:217
@ ANIMTYPE_NLACONTROLS
Definition: ED_anim_api.h:201
@ ANIMTYPE_GPLAYER
Definition: ED_anim_api.h:233
@ ANIMTYPE_MASKDATABLOCK
Definition: ED_anim_api.h:235
@ ANIMTYPE_ANIMDATA
Definition: ED_anim_api.h:191
@ ANIMTYPE_MASKLAYER
Definition: ED_anim_api.h:236
@ ANIMTYPE_DSSIMULATION
Definition: ED_anim_api.h:228
@ ANIMTYPE_DSGPENCIL
Definition: ED_anim_api.h:223
@ ANIMTYPE_DSLAT
Definition: ED_anim_api.h:220
@ ANIMTYPE_NLAACTION
Definition: ED_anim_api.h:239
@ ANIMTYPE_DSMCLIP
Definition: ED_anim_api.h:224
@ ANIMTYPE_DSMAT
Definition: ED_anim_api.h:207
@ ANIMTYPE_NUM_TYPES
Definition: ED_anim_api.h:244
@ ANIMTYPE_DSCACHEFILE
Definition: ED_anim_api.h:210
@ ANIMTYPE_DSVOLUME
Definition: ED_anim_api.h:227
@ ANIMTYPE_FCURVE
Definition: ED_anim_api.h:199
@ ANIMTYPE_DSLAM
Definition: ED_anim_api.h:208
@ ANIMTYPE_PALETTE
Definition: ED_anim_api.h:241
@ ANIMTYPE_GPDATABLOCK
Definition: ED_anim_api.h:232
@ ANIMTYPE_FILLACTD
Definition: ED_anim_api.h:204
@ ANIMTYPE_OBJECT
Definition: ED_anim_api.h:197
@ ANIMTYPE_DSMESH
Definition: ED_anim_api.h:218
@ ANIMTYPE_NLATRACK
Definition: ED_anim_api.h:238
@ ANIMTYPE_DSWOR
Definition: ED_anim_api.h:213
@ ANIMTYPE_DSSKEY
Definition: ED_anim_api.h:212
@ ANIMTYPE_DSHAIR
Definition: ED_anim_api.h:225
void ANIM_channel_setting_set(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting, eAnimChannels_SetFlag mode)
void ED_operatormacros_graph(void)
Definition: graph_ops.c:487
void ANIM_list_elem_update(struct Main *bmain, struct Scene *scene, bAnimListElem *ale)
Definition: anim_deps.c:44
void ANIM_channel_draw_widgets(const struct bContext *C, bAnimContext *ac, bAnimListElem *ale, struct uiBlock *block, rctf *rect, size_t channel_index)
void ANIM_fmodifiers_copybuf_free(void)
Definition: fmodifier_ui.c:954
void ANIM_fcurve_delete_from_animdata(bAnimContext *ac, struct AnimData *adt, struct FCurve *fcu)
void ANIM_draw_previewrange(const struct bContext *C, struct View2D *v2d, int end_frame_width)
bool(* PanelTypePollFn)(const struct bContext *C, struct PanelType *pt)
Definition: ED_anim_api.h:802
struct bAnimContext bAnimContext
void nla_action_get_color(struct AnimData *adt, struct bAction *act, float color[4])
Definition: nla_draw.c:52
void ED_nla_postop_refresh(bAnimContext *ac)
Definition: nla_edit.c:59
void ANIM_sync_animchannels_to_data(const struct bContext *C)
struct NlaStrip * ANIM_nla_context_strip(const struct bContext *C)
void ANIM_animdata_freelist(ListBase *anim_data)
Definition: anim_deps.c:397
void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc, size_t channel_index)
void animviz_calc_motionpaths(struct Depsgraph *depsgraph, struct Main *bmain, struct Scene *scene, ListBase *targets, eAnimvizCalcRange range, bool restore)
void ANIM_draw_framerange(struct Scene *scene, struct View2D *v2d)
Definition: anim_draw.c:113
void animviz_get_object_motionpaths(struct Object *ob, ListBase *targets)
eAnimChannel_Role
Definition: ED_anim_api.h:538
@ ACHANNEL_ROLE_CHANNEL
Definition: ED_anim_api.h:544
@ ACHANNEL_ROLE_EXPANDER
Definition: ED_anim_api.h:540
bool ANIM_remove_empty_action_from_animdata(struct AnimData *adt)
void ANIM_nla_mapping_apply_fcurve(struct AnimData *adt, struct FCurve *fcu, bool restore, bool only_keys)
Definition: anim_draw.c:291
eAnim_KeyType
Definition: ED_anim_api.h:248
@ ALE_SCE
Definition: ED_anim_api.h:256
@ ALE_NONE
Definition: ED_anim_api.h:249
@ ALE_GPFRAME
Definition: ED_anim_api.h:251
@ ALE_FCURVE
Definition: ED_anim_api.h:250
@ ALE_NLASTRIP
Definition: ED_anim_api.h:253
@ ALE_ALL
Definition: ED_anim_api.h:255
@ ALE_ACT
Definition: ED_anim_api.h:258
@ ALE_OB
Definition: ED_anim_api.h:257
@ ALE_GROUP
Definition: ED_anim_api.h:259
@ ALE_MASKLAY
Definition: ED_anim_api.h:252
void ED_keymap_animchannels(struct wmKeyConfig *keyconf)
bool ANIM_nla_context_track_ptr(const struct bContext *C, struct PointerRNA *r_ptr)
struct Depsgraph * animviz_depsgraph_build(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, struct ListBase *targets)
void ED_keymap_anim(struct wmKeyConfig *keyconf)
Definition: anim_ops.c:631
float ANIM_unit_mapping_get_factor(struct Scene *scene, struct ID *id, struct FCurve *fcu, short flag, float *r_offset)
Definition: anim_draw.c:485
eAnim_Update_Flags
Definition: ED_anim_api.h:267
@ ANIM_UPDATE_DEPS
Definition: ED_anim_api.h:268
@ ANIM_UPDATE_HANDLES
Definition: ED_anim_api.h:270
@ ANIM_UPDATE_ORDER
Definition: ED_anim_api.h:269
bool ANIM_nla_context_strip_ptr(const struct bContext *C, struct PointerRNA *r_ptr)
eAnimCont_Types
Definition: ED_anim_api.h:102
@ ANIMCONT_DRIVERS
Definition: ED_anim_api.h:109
@ ANIMCONT_FCURVES
Definition: ED_anim_api.h:108
@ ANIMCONT_NLA
Definition: ED_anim_api.h:110
@ ANIMCONT_MASK
Definition: ED_anim_api.h:112
@ ANIMCONT_SHAPEKEY
Definition: ED_anim_api.h:105
@ ANIMCONT_TIMELINE
Definition: ED_anim_api.h:113
@ ANIMCONT_DOPESHEET
Definition: ED_anim_api.h:107
@ ANIMCONT_ACTION
Definition: ED_anim_api.h:104
@ ANIMCONT_NONE
Definition: ED_anim_api.h:103
@ ANIMCONT_GPENCIL
Definition: ED_anim_api.h:106
@ ANIMCONT_CHANNEL
Definition: ED_anim_api.h:111
void ANIM_set_active_channel(bAnimContext *ac, void *data, eAnimCont_Types datatype, eAnimFilter_Flags filter, void *channel_data, eAnim_ChannelType channel_type)
void ANIM_channel_debug_print_info(bAnimListElem *ale, short indent_level)
bool ANIM_animdata_context_getdata(bAnimContext *ac)
Definition: anim_filter.c:349
void getcolor_fcurve_rainbow(int cur, int tot, float out[3])
void ANIM_center_frame(struct bContext *C, int smooth_viewtx)
Definition: anim_draw.c:619
void ANIM_modifier_panels_register_graph_and_NLA(struct ARegionType *region_type, const char *modifier_panel_prefix, PanelTypePollFn poll_function)
Definition: fmodifier_ui.c:921
void(* uiListPanelIDFromDataFunc)(void *data_link, char *r_idname)
Definition: ED_anim_api.h:804
void ANIM_draw_cfra(const struct bContext *C, struct View2D *v2d, short flag)
eAnimChannel_Settings
Definition: ED_anim_api.h:560
@ ACHANNEL_SETTING_ALWAYS_VISIBLE
Definition: ED_anim_api.h:574
@ ACHANNEL_SETTING_PINNED
Definition: ED_anim_api.h:571
@ ACHANNEL_SETTING_MUTE
Definition: ED_anim_api.h:564
@ ACHANNEL_SETTING_PROTECT
Definition: ED_anim_api.h:563
@ ACHANNEL_SETTING_VISIBLE
Definition: ED_anim_api.h:567
@ ACHANNEL_SETTING_EXPAND
Definition: ED_anim_api.h:565
@ ACHANNEL_SETTING_SOLO
Definition: ED_anim_api.h:569
@ ACHANNEL_SETTING_MOD_OFF
Definition: ED_anim_api.h:572
@ ACHANNEL_SETTING_SELECT
Definition: ED_anim_api.h:561
struct bAnimChannelType bAnimChannelType
bool ANIM_fmodifiers_paste_from_buf(ListBase *modifiers, bool replace, struct FCurve *curve)
Definition: fmodifier_ui.c:989
size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, eAnimFilter_Flags filter_mode, void *data, eAnimCont_Types datatype)
Definition: anim_filter.c:3447
void ANIM_anim_channels_select_toggle(bAnimContext *ac)
void ED_operatormacros_nla(void)
Definition: nla_ops.c:143
short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting)
struct AnimData * ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale)
Definition: anim_draw.c:216
bAction * ANIM_channel_action_get(const bAnimListElem *ale)
void ED_operatortypes_anim(void)
Definition: anim_ops.c:591
ENUM_OPERATORS(eAnimFilter_Flags, ANIMFILTER_TMP_IGNORE_ONLYSEL)
const bAnimChannelType * ANIM_channel_get_typeinfo(bAnimListElem *ale)
struct FCurve * ANIM_graph_context_fcurve(const struct bContext *C)
eAnimEditDraw_CurrentFrame
Definition: ED_anim_api.h:736
@ DRAWCFRA_WIDE
Definition: ED_anim_api.h:742
@ DRAWCFRA_UNIT_SECONDS
Definition: ED_anim_api.h:740
struct AnimData * ED_actedit_animdata_from_context(const struct bContext *C, struct ID **r_adt_id_owner)
bool ANIM_animdata_get_context(const struct bContext *C, bAnimContext *ac)
void ED_operatormacros_action(void)
Definition: action_ops.c:75
eAnimvizCalcRange
Definition: ED_anim_api.h:1088
@ ANIMVIZ_CALC_RANGE_FULL
Definition: ED_anim_api.h:1096
@ ANIMVIZ_CALC_RANGE_CURRENT_FRAME
Definition: ED_anim_api.h:1090
@ ANIMVIZ_CALC_RANGE_CHANGED
Definition: ED_anim_api.h:1093
void ANIM_id_update(struct Main *bmain, struct ID *id)
Definition: anim_deps.c:99
bool ANIM_fmodifiers_copy_to_buf(ListBase *modifiers, bool active)
Definition: fmodifier_ui.c:960
struct NlaTrack * ANIM_nla_context_track(const struct bContext *C)
eAnimFilter_Flags
Definition: ED_anim_api.h:284
@ ANIMFILTER_TMP_PEEK
Definition: ED_anim_api.h:331
@ ANIMFILTER_ACTIVE
Definition: ED_anim_api.h:303
@ ANIMFILTER_UNSEL
Definition: ED_anim_api.h:309
@ ANIMFILTER_FOREDIT
Definition: ED_anim_api.h:312
@ ANIMFILTER_ANIMDATA
Definition: ED_anim_api.h:322
@ ANIMFILTER_DATA_VISIBLE
Definition: ED_anim_api.h:292
@ ANIMFILTER_CURVE_VISIBLE
Definition: ED_anim_api.h:297
@ ANIMFILTER_SELEDIT
Definition: ED_anim_api.h:315
@ ANIMFILTER_LIST_VISIBLE
Definition: ED_anim_api.h:295
@ ANIMFILTER_LIST_CHANNELS
Definition: ED_anim_api.h:300
@ ANIMFILTER_NODUPLIS
Definition: ED_anim_api.h:325
@ ANIMFILTER_TMP_IGNORE_ONLYSEL
Definition: ED_anim_api.h:334
@ ANIMFILTER_FCURVESONLY
Definition: ED_anim_api.h:328
@ ANIMFILTER_SEL
Definition: ED_anim_api.h:308
@ ANIMFILTER_ACTGROUPED
Definition: ED_anim_api.h:305
short ANIM_get_normalization_flags(bAnimContext *ac)
Definition: anim_draw.c:318
void ANIM_animdata_update(bAnimContext *ac, ListBase *anim_data)
Definition: anim_deps.c:302
eAnimUnitConv_Flags
Definition: ED_anim_api.h:930
@ ANIM_UNITCONV_NORMALIZE
Definition: ED_anim_api.h:941
@ ANIM_UNITCONV_ONLYSEL
Definition: ED_anim_api.h:936
@ ANIM_UNITCONV_ONLYKEYS
Definition: ED_anim_api.h:934
@ ANIM_UNITCONV_SELVERTS
Definition: ED_anim_api.h:938
@ ANIM_UNITCONV_NORMALIZE_FREEZE
Definition: ED_anim_api.h:946
@ ANIM_UNITCONV_RESTORE
Definition: ED_anim_api.h:932
void ANIM_modifier_panels_register_graph_only(struct ARegionType *region_type, const char *modifier_panel_prefix, PanelTypePollFn poll_function)
Definition: fmodifier_ui.c:933
struct bAnimListElem bAnimListElem
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
#define C
Definition: RandGen.cpp:25
Scene scene
Curve curve
const Depsgraph * depsgraph
SyclQueue void void size_t num_bytes void
DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
static void area(int d1, int d2, int e1, int e2, float weights[2])
bool active
all scheduled work for the GPU.
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
Definition: DNA_ID.h:368
Definition: BKE_main.h:121
char owner_id[BKE_ST_MAXNAME]
Definition: BKE_screen.h:229
short region_type
Definition: BKE_screen.h:234
void(* name)(bAnimListElem *ale, char *name)
Definition: ED_anim_api.h:596
void(* get_backdrop_color)(bAnimContext *ac, bAnimListElem *ale, float r_color[3])
Definition: ED_anim_api.h:587
short(* get_offset)(bAnimContext *ac, bAnimListElem *ale)
Definition: ED_anim_api.h:593
bool(* name_prop)(bAnimListElem *ale, struct PointerRNA *ptr, struct PropertyRNA **prop)
Definition: ED_anim_api.h:598
void(* draw_backdrop)(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc)
Definition: ED_anim_api.h:589
const char * channel_type_name
Definition: ED_anim_api.h:581
bool(* has_setting)(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting)
Definition: ED_anim_api.h:604
short(* get_indent_level)(bAnimContext *ac, bAnimListElem *ale)
Definition: ED_anim_api.h:591
eAnimChannel_Role channel_role
Definition: ED_anim_api.h:583
int(* setting_flag)(bAnimContext *ac, eAnimChannel_Settings setting, bool *neg)
Definition: ED_anim_api.h:606
int(* icon)(bAnimListElem *ale)
Definition: ED_anim_api.h:600
ListBase * markers
Definition: ED_anim_api.h:92
struct ARegion * region
Definition: ED_anim_api.h:76
struct Scene * scene
Definition: ED_anim_api.h:84
short spacetype
Definition: ED_anim_api.h:67
struct bDopeSheet * ads
Definition: ED_anim_api.h:79
short datatype
Definition: ED_anim_api.h:62
void * data
Definition: ED_anim_api.h:60
struct ScrArea * area
Definition: ED_anim_api.h:72
struct Object * obact
Definition: ED_anim_api.h:90
float yscale_fac
Definition: ED_anim_api.h:98
short regiontype
Definition: ED_anim_api.h:69
struct ReportList * reports
Definition: ED_anim_api.h:95
struct ViewLayer * view_layer
Definition: ED_anim_api.h:86
struct Main * bmain
Definition: ED_anim_api.h:82
struct SpaceLink * sl
Definition: ED_anim_api.h:74
struct Depsgraph * depsgraph
Definition: ED_anim_api.h:88
struct ID * fcurve_owner_id
Definition: ED_anim_api.h:175
struct bAnimListElem * next
Definition: ED_anim_api.h:127
void * key_data
Definition: ED_anim_api.h:146
struct AnimData * adt
Definition: ED_anim_api.h:162
struct bAnimListElem * prev
Definition: ED_anim_api.h:127
struct ID * id
Definition: ED_anim_api.h:160
PointerRNA * ptr
Definition: wm_files.c:3480