62 if (scene ==
nullptr) {
75 if (scene ==
nullptr) {
115 ot->name =
"Add Empty Keying Set";
116 ot->idname =
"ANIM_OT_keying_set_add";
117 ot->description =
"Add a new (empty) keying set to the active Scene";
162 ot->name =
"Remove Active Keying Set";
163 ot->idname =
"ANIM_OT_keying_set_remove";
164 ot->description =
"Remove the active keying set";
204 ot->name =
"Add Empty Keying Set Path";
205 ot->idname =
"ANIM_OT_keying_set_path_add";
206 ot->description =
"Add empty path to active keying set";
229 if (!keyingset_path) {
246 ot->name =
"Remove Active Keying Set Path";
247 ot->idname =
"ANIM_OT_keying_set_path_remove";
248 ot->description =
"Remove active Path from active keying set";
264 int index = 0, pflag = 0;
287 &scene->
keyingsets,
"ButtonKeyingSet",
"Button Keying Set",
flag, keyingflag);
302 bool changed =
false;
336 ot->name =
"Add to Keying Set";
337 ot->idname =
"ANIM_OT_keyingset_button_add";
338 ot->description =
"Add current UI-active property to current keying set";
348 RNA_def_boolean(
ot->srna,
"all",
true,
"All",
"Add all elements of the array to a Keying Set");
382 bool changed =
false;
383 if (
ptr.owner_id &&
ptr.data && prop) {
389 if (keyingset_path) {
409 ot->name =
"Remove from Keying Set";
410 ot->idname =
"ANIM_OT_keyingset_button_remove";
411 ot->description =
"Remove current UI-active property from current keying set";
437 layout->
op_enum(
"ANIM_OT_keying_set_active_set",
"type");
469 keyingset = keyingset->
next, enum_index++)
475 item_tmp.
value = enum_index;
486 keyingset = keyingset->
next, enum_index--)
493 item_tmp.
value = enum_index;
519 item_tmp.identifier =
"__ACTIVE__";
520 item_tmp.name =
"Clear Active Keying Set";
537 ot->name =
"Set Active Keying Set";
538 ot->idname =
"ANIM_OT_keying_set_active_set";
539 ot->description =
"Set a new active keying set";
565 if (keyingset ==
nullptr) {
597 if (use_poll && (
C ==
nullptr)) {
606 visit_params.
text =
"__ACTIVE__";
607 visit_params.
info =
"Active Keying Set";
608 visit_fn(visit_params);
618 visit_params.
text = keyingset->idname;
619 visit_params.
info = keyingset->name;
620 visit_fn(visit_params);
630 visit_params.
text = keyingset->idname;
631 visit_params.
info = keyingset->name;
632 visit_fn(visit_params);
675 item_tmp.identifier =
"__ACTIVE__";
676 item_tmp.name =
"Active Keying Set";
705 if (keyingset ==
nullptr) {
726 if (keyingset_info ==
nullptr) {
732 return keyingset_info->
poll(keyingset_info,
C);
Functions to insert, delete or modify keyframes.
Functionality to interact with keying sets.
struct KS_Path * BKE_keyingset_find_path(struct KeyingSet *ks, struct ID *id, const char group_name[], const char rna_path[], int array_index, int group_mode)
void BKE_keyingset_free_paths(struct KeyingSet *ks)
struct KeyingSet * BKE_keyingset_add(struct ListBase *list, const char idname[], const char name[], short flag, short keyingflag)
struct KS_Path * BKE_keyingset_add_path(struct KeyingSet *ks, struct ID *id, const char group_name[], const char rna_path[], int array_index, short flag, short groupmode)
void BKE_keyingset_free_path(struct KeyingSet *ks, struct KS_Path *ksp)
Scene * CTX_data_scene(const bContext *C)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void * BLI_findstring(const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_freelinkN(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_listbase_count(const ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
bool ED_operator_areaactive(bContext *C)
Read Guarded memory(de)allocation.
void UI_popup_menu_end(bContext *C, uiPopupMenu *pup)
uiPopupMenu * UI_popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL()
uiBut * UI_context_active_but_prop_get(const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index)
uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
ListBase builtin_keyingsets
void ANIM_keyingset_visit_for_search_no_poll(const bContext *C, PointerRNA *, PropertyRNA *, const char *, blender::FunctionRef< void(StringPropertySearchVisitParams)> visit_fn)
int ANIM_scene_get_keyingset_index(Scene *scene, KeyingSet *keyingset)
void ANIM_OT_keying_set_add(wmOperatorType *ot)
static wmOperatorStatus remove_active_ks_path_exec(bContext *C, wmOperator *op)
static bool keyingset_poll_active_edit(bContext *C)
static wmOperatorStatus remove_keyingset_button_exec(bContext *C, wmOperator *op)
KeyingSet * ANIM_keyingset_get_from_idname(Scene *scene, const char *idname)
void ANIM_OT_keying_set_path_remove(wmOperatorType *ot)
bool ANIM_keyingset_context_ok_poll(bContext *C, KeyingSet *keyingset)
void ANIM_keyingset_visit_for_search(const bContext *C, PointerRNA *, PropertyRNA *, const char *, blender::FunctionRef< void(StringPropertySearchVisitParams)> visit_fn)
static void build_keyingset_enum(bContext *C, EnumPropertyItem **item, int *totitem, bool *r_free)
static bool keyingset_poll_activePath_edit(bContext *C)
void ANIM_OT_keyingset_button_add(wmOperatorType *ot)
static const EnumPropertyItem * keyingset_set_active_enum_itemf(bContext *C, PointerRNA *, PropertyRNA *, bool *r_free)
void ANIM_OT_keying_set_remove(wmOperatorType *ot)
static bool keyingset_poll_default_add(bContext *C)
static wmOperatorStatus remove_active_keyingset_exec(bContext *C, wmOperator *op)
static wmOperatorStatus add_empty_ks_path_exec(bContext *C, wmOperator *op)
static wmOperatorStatus keyingset_active_menu_invoke(bContext *C, wmOperator *op, const wmEvent *)
void ANIM_OT_keying_set_active_set(wmOperatorType *ot)
void ANIM_OT_keyingset_button_remove(wmOperatorType *ot)
void ANIM_OT_keying_set_path_add(wmOperatorType *ot)
static void anim_keyingset_visit_for_search_impl(const bContext *C, blender::FunctionRef< void(StringPropertySearchVisitParams)> visit_fn, const bool use_poll)
KeyingSet * ANIM_keyingset_get_from_enum_type(Scene *scene, int type)
static wmOperatorStatus add_default_keyingset_exec(bContext *C, wmOperator *)
static wmOperatorStatus keyingset_active_menu_exec(bContext *C, wmOperator *op)
const EnumPropertyItem * ANIM_keying_sets_enum_itemf(bContext *C, PointerRNA *, PropertyRNA *, bool *r_free)
static wmOperatorStatus add_keyingset_button_exec(bContext *C, wmOperator *op)
bool all(VecOp< bool, D >) RET
void * MEM_callocN(size_t len, const char *str)
KeyingSetInfo * keyingset_info_find_name(const char name[])
eInsertKeyFlags get_keyframing_flags(Scene *scene)
bool RNA_property_anim_editable(const PointerRNA *ptr, PropertyRNA *prop_orig)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_enum_item_add_separator(EnumPropertyItem **items, int *totitem)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
std::optional< std::string > RNA_path_from_ID_to_property(const PointerRNA *ptr, PropertyRNA *prop)
const EnumPropertyItem rna_enum_dummy_DEFAULT_items[]
std::optional< std::string > info
void op_enum(blender::StringRefNull opname, blender::StringRefNull propname, IDProperty *properties, blender::wm::OpCallContext context, eUI_Item_Flag flag, const int active=-1)
struct ReportList * reports
struct wmOperatorType * type
void WM_event_add_notifier(const bContext *C, uint type, void *reference)