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)
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))
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))
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))
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)))
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)))
495#define SEL_ACTC(actc) ((actc->flag & ACT_SELECTED))
496#define EXPANDED_ACTC(actc) ((actc->flag & ACT_COLLAPSED) == 0)
498#define EXPANDED_DRVD(adt) ((adt->flag & ADT_DRIVERS_COLLAPSED) == 0)
499#define EXPANDED_ADT(adt) ((adt->flag & ADT_UI_EXPANDED) != 0)
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)
513#define EDITABLE_SHAPEKEY(kb) (((kb)->flag & KEYBLOCK_LOCKED) == 0)
514#define SEL_SHAPEKEY(kb) ((kb)->flag & KEYBLOCK_SEL)
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)
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)
530#define SEL_NLT(nlt) ((nlt)->flag & NLATRACK_SELECTED)
531#define EDITABLE_NLT(nlt) (((nlt)->flag & NLATRACK_PROTECTED) == 0)
534#define EXPANDED_MCLIP(clip) ((clip)->flag & MCLIP_DATA_EXPAND)
537#define EXPANDED_PALETTE(palette) ((palette)->flag & PALETTE_DATA_EXPAND)
540#define SEL_ANIMDATA(adt) ((adt)->flag & ADT_UI_SELECTED)
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))
561#define NLATRACK_NAMEWIDTH (10 * U.widget_unit)
590 ListBaseT<bAnimListElem> *anim_data,
591 animrig::Action &action,
605 ListBaseT<bAnimListElem> *anim_data,
645 ViewLayer *view_layer,
647 ID **r_action_user =
nullptr);
803 size_t channel_index);
838 ListBaseT<bAnimListElem> *anim_data,
937 AnimData *adt, bAction *action, View2D *v2d,
float ymin,
float ymax);
964 ListBaseT<FModifier> *fmodifiers,
968 const char *modifier_panel_prefix,
971 const char *modifier_panel_prefix,
1152#define ACHANNEL_SET_FLAG(channel, smode, sflag) \
1154 if (smode == ACHANNEL_SETFLAG_INVERT) { \
1155 (channel)->flag ^= (sflag); \
1157 else if (smode == ACHANNEL_SETFLAG_ADD) { \
1158 (channel)->flag |= (sflag); \
1161 (channel)->flag &= ~(sflag); \
1172#define ACHANNEL_SET_FLAG_NEG(channel, smode, sflag) \
1174 if (smode == ACHANNEL_SETFLAG_INVERT) { \
1175 (channel)->flag ^= (sflag); \
1177 else if (smode == ACHANNEL_SETFLAG_ADD) { \
1178 (channel)->flag &= ~(sflag); \
1181 (channel)->flag |= (sflag); \
1256 bContext *
C, ID *
id, AnimData *adt, bAction *act, ReportList *reports,
bool force_delete);
1279namespace ed::motionpath {
1316 int modified_frame);
Blender kernel action and pose functionality.
These structs are the foundation for all linked lists in the library system.
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)
void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc, size_t channel_index)
void ANIM_draw_framerange(Scene *scene, View2D *v2d)
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)
float ANIM_UI_get_channel_name_width()
void ED_nla_postop_refresh(bAnimContext *ac)
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)
@ ANIM_UNITCONV_NORMALIZE_FREEZE
@ 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)
bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
float ANIM_nla_tweakedit_remap(bAnimListElem *ale, const float cframe, const eNlaTime_ConvertModes mode)
void ANIM_modifier_panels_register_graph_only(ARegionType *region_type, const char *modifier_panel_prefix, PanelTypePollFn poll_function)
@ ACHANNEL_SETFLAG_INVERT
@ ACHANNEL_SETFLAG_EXTEND_RANGE
@ ACHANNEL_SETFLAG_TOGGLE
void ED_keymap_animchannels(wmKeyConfig *keyconf)
rctf ANIM_frame_range_view2d_add_xmargin(const View2D &view_2d, const rctf view_rect)
bool ANIM_nla_mapping_allowed(const bAnimListElem *ale)
@ ANIMTYPE_GREASE_PENCIL_LAYER_GROUP
@ ANIMTYPE_GREASE_PENCIL_DATABLOCK
@ ANIMTYPE_GREASE_PENCIL_LAYER
@ ANIMTYPE_FILLACT_LAYERED
@ ANIMTYPE_SPECIALDATA__UNUSED
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)
void ANIM_animdata_update(bAnimContext *ac, ListBaseT< bAnimListElem > *anim_data)
void ED_operatortypes_anim()
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)
void animviz_build_motionpath_targets(Object *ob, Vector< MPathTarget > &r_targets)
float ANIM_UI_get_first_channel_top(View2D *v2d)
@ ACHANNEL_SETTING_EXPAND
@ ACHANNEL_SETTING_MOD_OFF
@ ACHANNEL_SETTING_PROTECT
@ ACHANNEL_SETTING_VISIBLE
@ ACHANNEL_SETTING_PINNED
@ ACHANNEL_SETTING_ALWAYS_VISIBLE
@ ACHANNEL_SETTING_SELECT
@ ALE_GREASE_PENCIL_GROUP
ChannelbagFCurveMap build_rotation_fcurve_map(animrig::Action &action, const animrig::slot_handle_t slot_handle)
void ANIM_center_frame(bContext *C, int smooth_viewtx)
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()
@ ANIMFILTER_TMP_IGNORE_ONLYSEL
@ ANIMFILTER_LIST_VISIBLE
@ ANIMFILTER_DATA_VISIBLE
@ ANIMFILTER_CURVE_VISIBLE
@ 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)
bool ANIM_is_active_channel(bAnimListElem *ale)
void ANIM_deselect_keys_in_animation_editors(bContext *C)
Map< std::string, SortedFCurveBuffer > RNAFCurveMap
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])
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)
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
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)
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)
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)
void ANIM_nla_mapping_apply_fcurve(AnimData *adt, FCurve *fcu, bool restore, bool only_keys)
void getcolor_fcurve_rainbow(int cur, int tot, float out[3])
void ED_drivers_editor_init(bContext *C, ScrArea *area)
float ANIM_UI_get_keyframe_scale_factor()
void ED_operatormacros_action()
bool ANIM_fmodifiers_copy_to_buf(ListBaseT< FModifier > *modifiers, bool active)
void ED_operatormacros_nla()
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)
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)
const char * channel_type_name
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
eDopeSheet_FilterFlag2 flag2
eDopeSheet_FilterFlag flag
ListBaseT< TimeMarker > * markers
eGraphEdit_Mode grapheditor_mode
eAnimEdit_Context dopesheet_mode
eAnim_Update_Flags update