30#include "RNA_prototypes.hh"
68 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
137 if (ale.adt && adt_ptr) {
147 id =
static_cast<ID *
>(ale.data);
232static bool nla_panel_poll(
const bContext *
C, PanelType *pt)
327 row.
label(
"", ICON_RIGHTARROW);
328 row.
label(
IFACE_(
"Animation Data"), ICON_ANIM_DATA);
336 template_id(&col,
C, &adt_ptr,
"action",
"ACTION_OT_new",
nullptr,
"NLA_OT_action_unlink");
337 template_search(&col,
342 "action_suitable_slots",
375 const int strip_type =
RNA_enum_get(&strip_ptr,
"type");
377 row.
label(
"", ICON_ANIM);
380 row.
label(
"", ICON_ARROW_LEFTRIGHT);
383 row.
label(
"", ICON_SEQ_STRIP_META);
386 row.
label(
"", ICON_SOUND);
400 short showEvalProps = 1;
431 extrapolation_col.
prop(&strip_ptr,
"extrapolation",
UI_ITEM_NONE, std::nullopt, ICON_NONE);
432 extrapolation_col.
prop(&strip_ptr,
"blend_type",
UI_ITEM_NONE, std::nullopt, ICON_NONE);
448 &strip_ptr,
"use_auto_blend",
UI_ITEM_NONE, std::nullopt, ICON_NONE);
455 playback_sub.
prop(&strip_ptr,
"use_reverse",
UI_ITEM_NONE, std::nullopt, ICON_NONE);
457 &strip_ptr,
"use_animated_time_cyclic",
UI_ITEM_NONE, std::nullopt, ICON_NONE);
479 action_col.
prop(&strip_ptr,
"action",
UI_ITEM_NONE, std::nullopt, ICON_ACTION);
489 template_search(&action_col,
494 "action_suitable_slots",
496 "anim.slot_unassign_from_nla_strip",
508 sync_row.
op(
"NLA_OT_action_sync_length",
IFACE_(
"Now"), ICON_FILE_REFRESH);
514 usage_col.
prop(&strip_ptr,
"repeat",
UI_ITEM_NONE, std::nullopt, ICON_NONE);
532 col.
prop(&strip_ptr,
"use_animated_influence",
UI_ITEM_NONE,
"", ICON_NONE);
551 layout.
prop(&strip_ptr,
"influence",
UI_ITEM_NONE, std::nullopt, ICON_NONE);
584 layout.
prop(&strip_ptr,
"strip_time",
UI_ITEM_NONE, std::nullopt, ICON_NONE);
587#define NLA_FMODIFIER_PANEL_PREFIX "NLA"
621 sub.
op(
"NLA_OT_fmodifier_copy",
"", ICON_COPYDOWN);
622 sub.
op(
"NLA_OT_fmodifier_paste",
"", ICON_PASTEDOWN);
681 pt->
parent = pt_properties;
695 pt->
parent = pt_properties;
Functions and classes to work with Actions.
Functions for backward compatibility with the legacy Action API.
#define STRNCPY_UTF8(dst, src)
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
Read Blender memory allocation and freeing.
static bool nla_strip_panel_poll(const bContext *C, PanelType *)
static void nla_panel_animdata(const bContext *C, Panel *panel)
static void nla_panel_evaluation(const bContext *C, Panel *panel)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
size_t size_t size_t BLI_snprintf_utf8(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
int RNA_enum_get(PointerRNA *ptr, const char *name)
PointerRNA RNA_id_pointer_create(ID *id)
bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
static bool nla_strip_actclip_panel_poll(const bContext *C, PanelType *)
@ ANIMTYPE_GREASE_PENCIL_LAYER_GROUP
@ ANIMTYPE_GREASE_PENCIL_DATABLOCK
@ ANIMTYPE_GREASE_PENCIL_LAYER
@ ANIMTYPE_FILLACT_LAYERED
@ ANIMTYPE_SPECIALDATA__UNUSED
static void nla_fmodifier_panel_id(void *fcm_link, char *r_name)
void nla_buttons_register(ARegionType *art)
bool ANIM_nla_context_track_ptr(const bContext *C, PointerRNA *r_ptr)
static void nla_panel_stripname(const bContext *C, Panel *panel)
static void nla_panel_animated_influence_header(const bContext *C, Panel *panel)
static bool nla_strip_eval_panel_poll(const bContext *C, PanelType *)
size_t ANIM_animdata_filter(bAnimContext *ac, ListBaseT< bAnimListElem > *anim_data, const eAnimFilter_Flags filter_mode, void *data, const eAnimCont_Types datatype)
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
@ ANIMFILTER_LIST_VISIBLE
@ ANIMFILTER_DATA_VISIBLE
@ ANIMFILTER_LIST_CHANNELS
NlaStrip * BKE_nlastrip_find_active(NlaTrack *nlt)
NlaTrack * ANIM_nla_context_track(const bContext *C)
void ANIM_fmodifier_panels(const bContext *C, ID *owner_id, ListBaseT< FModifier > *fmodifiers, uiListPanelIDFromDataFunc panel_id_fn)
@ NLASTRIP_TYPE_TRANSITION
static void do_nla_region_buttons(bContext *C, void *, int)
static bool nla_animdata_panel_poll(const bContext *C, PanelType *)
NlaStrip * ANIM_nla_context_strip(const bContext *C)
LinkData * BLI_genericNodeN(void *data)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
static void nla_panel_animated_strip_time_header(const bContext *C, Panel *panel)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
bool nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA *nlt_ptr, PointerRNA *strip_ptr)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
int RNA_struct_ui_icon(const StructRNA *type)
static void nla_panel_modifiers(const bContext *C, Panel *panel)
static void nla_panel_actclip(const bContext *C, Panel *panel)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
@ PANEL_TYPE_DEFAULT_CLOSED
static void nla_panel_animated_strip_time(const bContext *C, Panel *panel)
void ANIM_animdata_freelist(ListBaseT< bAnimListElem > *anim_data)
void ANIM_modifier_panels_register_graph_and_NLA(ARegionType *region_type, const char *modifier_panel_prefix, PanelTypePollFn poll_function)
static void nla_panel_properties(const bContext *C, Panel *panel)
bool ANIM_nla_context_strip_ptr(const bContext *C, PointerRNA *r_ptr)
const FModifierTypeInfo * get_fmodifier_typeinfo(int type)
ListBaseT< PanelType > paneltypes
ListBaseT< FModifier > modifiers
char translation_context[BKE_ST_MAXNAME]
ListBaseT< LinkData > children
char parent_id[BKE_ST_MAXNAME]
void(*) draw(const bContext *C, Panel *panel)
char category[BKE_ST_MAXNAME]
bool(*) poll(const bContext *C, PanelType *pt)
void(*) draw_header(const bContext *C, Panel *panel)
char idname[BKE_ST_MAXNAME]
char label[BKE_ST_MAXNAME]
void enabled_set(bool enabled)
void alignment_set(LayoutAlign alignment)
void use_property_decorate_set(bool is_decorate)
void use_property_split_set(bool is_sep)
PointerRNA op_menu_enum(const bContext *C, wmOperatorType *ot, StringRefNull propname, std::optional< StringRefNull > name, int icon)
void label(StringRef name, int icon)
PointerRNA op(wmOperatorType *ot, std::optional< StringRef > name, int icon, wm::OpCallContext context, eUI_Item_Flag flag)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)
void active_set(bool active)
Layout & column(bool align)
void separator(float factor=1.0f, LayoutSeparatorType type=LayoutSeparatorType::Auto)
void context_ptr_set(StringRef name, const PointerRNA *ptr)