64 if (scene ==
nullptr) {
77 if (scene ==
nullptr) {
88 return ((keyingset) && (keyingset->
paths.first_) && (keyingset->
active_path > 0));
117 ot->
name =
"Add Empty Keying Set";
118 ot->
idname =
"ANIM_OT_keying_set_add";
119 ot->
description =
"Add a new (empty) keying set to the active Scene";
164 ot->
name =
"Remove Active Keying Set";
165 ot->
idname =
"ANIM_OT_keying_set_remove";
192 KS_Path *keyingset_path = MEM_new<KS_Path>(
"KeyingSetPath Empty");
206 ot->
name =
"Add Empty Keying Set Path";
207 ot->
idname =
"ANIM_OT_keying_set_path_add";
208 ot->
description =
"Add empty path to active keying set";
231 if (!keyingset_path) {
248 ot->
name =
"Remove Active Keying Set Path";
249 ot->
idname =
"ANIM_OT_keying_set_path_remove";
250 ot->
description =
"Remove active Path from active keying set";
279 const auto get_or_create_keyingset = [&]() ->
KeyingSet * {
292 &scene->
keyingsets,
"ButtonKeyingSet",
"Button Keying Set", flag, keyingflag);
308 bool changed =
false;
321 KeyingSet *keyingset = get_or_create_keyingset();
345 ot->
name =
"Add to Keying Set";
346 ot->
idname =
"ANIM_OT_keyingset_button_add";
347 ot->
description =
"Add current UI-active property to current keying set";
357 RNA_def_boolean(ot->
srna,
"all",
true,
"All",
"Add all elements of the array to a Keying Set");
391 bool changed =
false;
398 if (keyingset_path) {
418 ot->
name =
"Remove from Keying Set";
419 ot->
idname =
"ANIM_OT_keyingset_button_remove";
420 ot->
description =
"Remove current UI-active property from current keying set";
443 layout.
op_enum(
"ANIM_OT_keying_set_active_set",
"type");
444 popup_menu_end(
C, pup);
474 for (keyingset = scene->
keyingsets.first(); keyingset;
475 keyingset = keyingset->
next, enum_index++)
481 item_tmp.
value = enum_index;
492 keyingset = keyingset->
next, enum_index--)
499 item_tmp.
value = enum_index;
525 item_tmp.identifier =
"__ACTIVE__";
526 item_tmp.name =
"Clear Active Keying Set";
543 ot->
name =
"Set Active Keying Set";
544 ot->
idname =
"ANIM_OT_keying_set_active_set";
571 if (keyingset ==
nullptr) {
603 if (use_poll && (
C ==
nullptr)) {
612 visit_params.
text =
"__ACTIVE__";
613 visit_params.
info =
"Active Keying Set";
614 visit_fn(visit_params);
626 visit_fn(visit_params);
636 visit_params.
text = keyingset.idname;
637 visit_params.
info = keyingset.name;
638 visit_fn(visit_params);
680 item_tmp.identifier =
"__ACTIVE__";
681 item_tmp.name =
"Active Keying Set";
710 if (keyingset ==
nullptr) {
731 if (keyingset_info ==
nullptr) {
737 return keyingset_info->
poll(keyingset_info,
C);
Functions to insert, delete or modify keyframes.
Functionality to interact with keying sets.
Read Blender memory allocation and freeing.
bool all(VecOp< bool, D >) RET
KeyingSetInfo * keyingset_info_find_name(const char name[])
eInsertKeyFlags get_keyframing_flags(Scene *scene)
PopupMenu * popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL()
Button * context_active_but_prop_get(const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
const EnumPropertyItem * ANIM_keying_sets_enum_itemf(bContext *C, PointerRNA *, PropertyRNA *, bool *r_free)
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
int RNA_enum_get(PointerRNA *ptr, const char *name)
void ANIM_keyingset_visit_for_search(const bContext *C, PointerRNA *, PropertyRNA *, const char *, FunctionRef< void(StringPropertySearchVisitParams)> visit_fn)
void ANIM_keyingset_visit_for_search_no_poll(const bContext *C, PointerRNA *, PropertyRNA *, const char *, FunctionRef< void(StringPropertySearchVisitParams)> visit_fn)
static wmOperatorStatus add_keyingset_button_exec(bContext *C, wmOperator *op)
static bool keyingset_poll_default_add(bContext *C)
std::optional< std::string > RNA_path_from_ID_to_property(const PointerRNA *ptr, PropertyRNA *prop)
KeyingSet * BKE_keyingset_add(ListBaseT< KeyingSet > *list, const char idname[], const char name[], eKS_Settings flag, eInsertKeyFlags keyingflag)
void ANIM_OT_keying_set_path_remove(wmOperatorType *ot)
static wmOperatorStatus remove_active_keyingset_exec(bContext *C, wmOperator *op)
void BKE_keyingset_free_path(KeyingSet *ks, KS_Path *ksp)
bool ED_operator_areaactive(bContext *C)
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 * BLI_findstring(const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BKE_keyingset_free_paths(KeyingSet *ks)
void ANIM_OT_keying_set_active_set(wmOperatorType *ot)
static wmOperatorStatus keyingset_active_menu_invoke(bContext *C, wmOperator *op, const wmEvent *)
void ANIM_OT_keyingset_button_add(wmOperatorType *ot)
KeyingSet * ANIM_keyingset_get_from_enum_type(Scene *scene, int type)
KeyingSet * ANIM_keyingset_get_from_idname(Scene *scene, const char *idname)
static wmOperatorStatus add_empty_ks_path_exec(bContext *C, wmOperator *op)
static wmOperatorStatus add_default_keyingset_exec(bContext *C, wmOperator *)
void ANIM_OT_keyingset_button_remove(wmOperatorType *ot)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
bool RNA_property_anim_editable(const PointerRNA *ptr, PropertyRNA *prop_orig)
int ANIM_scene_get_keyingset_index(Scene *scene, KeyingSet *keyingset)
void BKE_report(ReportList *reports, eReportType type, const char *message)
void ANIM_OT_keying_set_path_add(wmOperatorType *ot)
void BLI_freelinkN(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
static wmOperatorStatus keyingset_active_menu_exec(bContext *C, wmOperator *op)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
const EnumPropertyItem rna_enum_dummy_DEFAULT_items[]
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
static wmOperatorStatus remove_keyingset_button_exec(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
static wmOperatorStatus remove_active_ks_path_exec(bContext *C, wmOperator *op)
ListBaseT< KeyingSet > builtin_keyingsets
static const EnumPropertyItem * keyingset_set_active_enum_itemf(bContext *C, PointerRNA *, PropertyRNA *, bool *r_free)
static bool keyingset_poll_active_edit(bContext *C)
static void anim_keyingset_visit_for_search_impl(const bContext *C, FunctionRef< void(StringPropertySearchVisitParams)> visit_fn, const bool use_poll)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
bool ANIM_keyingset_context_ok_poll(bContext *C, KeyingSet *keyingset)
void RNA_enum_item_add_separator(EnumPropertyItem **items, int *totitem)
void ANIM_OT_keying_set_remove(wmOperatorType *ot)
void ANIM_OT_keying_set_add(wmOperatorType *ot)
Scene * CTX_data_scene(const bContext *C)
KS_Path * BKE_keyingset_find_path(KeyingSet *ks, ID *id, const char group_name[], const char rna_path[], int array_index, int group_mode)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
static void build_keyingset_enum(bContext *C, EnumPropertyItem **item, int *totitem, bool *r_free)
KS_Path * BKE_keyingset_add_path(KeyingSet *ks, ID *id, const char group_name[], const char rna_path[], int array_index, eKSP_Settings flag, eKSP_Grouping groupmode)
static bool keyingset_poll_activePath_edit(bContext *C)
ListBaseT< KS_Path > paths
bool has_owner_id() const
ListBaseT< struct KeyingSet > keyingsets
std::optional< std::string > info
void op_enum(StringRefNull opname, StringRefNull propname, IDProperty *properties, wm::OpCallContext context, eUI_Item_Flag flag, const int active=-1)
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
struct wmOperatorType * type