Blender V4.5
editors/animation/keyingsets.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2009 Blender Authors, Joshua Leung. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include <cfloat>
10#include <cstddef>
11#include <cstring>
12
13#include "MEM_guardedalloc.h"
14
15#include "DNA_anim_types.h"
16#include "DNA_scene_types.h"
17
18#include "BLI_listbase.h"
19
20#include "BKE_animsys.h"
21#include "BKE_context.hh"
22#include "BKE_report.hh"
23
24#include "ANIM_keyframing.hh"
25#include "ANIM_keyingsets.hh"
26
27#include "ED_keyframing.hh"
28#include "ED_screen.hh"
29
30#include "UI_interface.hh"
31#include "UI_resources.hh"
32
33#include "WM_api.hh"
34#include "WM_types.hh"
35
36#include "RNA_access.hh"
37#include "RNA_define.hh"
38#include "RNA_enum_types.hh"
39#include "RNA_path.hh"
40
41#include "anim_intern.hh"
42
43/* ************************************************** */
44/* KEYING SETS - OPERATORS (for use in UI panels) */
45/* These operators are really duplication of existing functionality, but just for completeness,
46 * they're here too, and will give the basic data needed...
47 */
48
49/* poll callback for adding default KeyingSet */
51{
52 /* As long as there's an active Scene, it's fine. */
53 return (CTX_data_scene(C) != nullptr);
54}
55
56/* Poll callback for editing active KeyingSet. */
58{
59 Scene *scene = CTX_data_scene(C);
60
61 if (scene == nullptr) {
62 return false;
63 }
64
65 /* There must be an active KeyingSet (and KeyingSets). */
66 return ((scene->active_keyingset > 0) && (scene->keyingsets.first));
67}
68
69/* poll callback for editing active KeyingSet Path */
71{
72 Scene *scene = CTX_data_scene(C);
73
74 if (scene == nullptr) {
75 return false;
76 }
77 if (scene->active_keyingset <= 0) {
78 return false;
79 }
80
81 KeyingSet *keyingset = static_cast<KeyingSet *>(
82 BLI_findlink(&scene->keyingsets, scene->active_keyingset - 1));
83
84 /* there must be an active KeyingSet and an active path */
85 return ((keyingset) && (keyingset->paths.first) && (keyingset->active_path > 0));
86}
87
88/* Add a Default (Empty) Keying Set ------------------------- */
89
91{
92 Scene *scene = CTX_data_scene(C);
93
94 /* Validate flags
95 * - absolute KeyingSets should be created by default.
96 */
98
100
101 /* Call the API func, and set the active keyingset index. */
102 BKE_keyingset_add(&scene->keyingsets, nullptr, nullptr, flag, keyingflag);
103
105
107
108 return OPERATOR_FINISHED;
109}
110
112{
113 /* Identifiers. */
114 ot->name = "Add Empty Keying Set";
115 ot->idname = "ANIM_OT_keying_set_add";
116 ot->description = "Add a new (empty) keying set to the active Scene";
117
118 /* Callbacks. */
121}
122
123/* Remove 'Active' Keying Set ------------------------- */
124
126{
127 Scene *scene = CTX_data_scene(C);
128
129 /* Verify the Keying Set to use:
130 * - use the active one
131 * - return error if it doesn't exist
132 */
133 if (scene->active_keyingset == 0) {
134 BKE_report(op->reports, RPT_ERROR, "No active Keying Set to remove");
135 return OPERATOR_CANCELLED;
136 }
137
138 if (scene->active_keyingset < 0) {
139 BKE_report(op->reports, RPT_ERROR, "Cannot remove built in keying set");
140 return OPERATOR_CANCELLED;
141 }
142
143 KeyingSet *keyingset = static_cast<KeyingSet *>(
144 BLI_findlink(&scene->keyingsets, scene->active_keyingset - 1));
145
146 /* Free KeyingSet's data, then remove it from the scene. */
147 BKE_keyingset_free_paths(keyingset);
148 BLI_freelinkN(&scene->keyingsets, keyingset);
149
150 /* The active one should now be the previously second-to-last one. */
151 scene->active_keyingset--;
152
154
155 return OPERATOR_FINISHED;
156}
157
159{
160 /* Identifiers. */
161 ot->name = "Remove Active Keying Set";
162 ot->idname = "ANIM_OT_keying_set_remove";
163 ot->description = "Remove the active keying set";
164
165 /* Callbacks. */
168}
169
170/* Add Empty Keying Set Path ------------------------- */
171
173{
174 Scene *scene = CTX_data_scene(C);
175
176 /* Verify the Keying Set to use:
177 * - use the active one
178 * - return error if it doesn't exist
179 */
180 if (scene->active_keyingset == 0) {
181 BKE_report(op->reports, RPT_ERROR, "No active Keying Set to add empty path to");
182 return OPERATOR_CANCELLED;
183 }
184
185 KeyingSet *keyingset = static_cast<KeyingSet *>(
186 BLI_findlink(&scene->keyingsets, scene->active_keyingset - 1));
187
188 /* Don't use the API method for this, since that checks on values... */
189 KS_Path *keyingset_path = MEM_callocN<KS_Path>("KeyingSetPath Empty");
190 BLI_addtail(&keyingset->paths, keyingset_path);
191 keyingset->active_path = BLI_listbase_count(&keyingset->paths);
192
193 keyingset_path->groupmode = KSP_GROUP_KSNAME; /* XXX? */
194 keyingset_path->idtype = ID_OB;
195 keyingset_path->flag = KSP_FLAG_WHOLE_ARRAY;
196
197 return OPERATOR_FINISHED;
198}
199
201{
202 /* Identifiers. */
203 ot->name = "Add Empty Keying Set Path";
204 ot->idname = "ANIM_OT_keying_set_path_add";
205 ot->description = "Add empty path to active keying set";
206
207 /* Callbacks. */
210}
211
212/* Remove Active Keying Set Path ------------------------- */
213
215{
216 Scene *scene = CTX_data_scene(C);
217 KeyingSet *keyingset = static_cast<KeyingSet *>(
218 BLI_findlink(&scene->keyingsets, scene->active_keyingset - 1));
219
220 /* If there is a KeyingSet, find the nominated path to remove. */
221 if (!keyingset) {
222 BKE_report(op->reports, RPT_ERROR, "No active Keying Set to remove a path from");
223 return OPERATOR_CANCELLED;
224 }
225
226 KS_Path *keyingset_path = static_cast<KS_Path *>(
227 BLI_findlink(&keyingset->paths, keyingset->active_path - 1));
228 if (!keyingset_path) {
229 BKE_report(op->reports, RPT_ERROR, "No active Keying Set path to remove");
230 return OPERATOR_CANCELLED;
231 }
232
233 /* Remove the active path from the KeyingSet. */
234 BKE_keyingset_free_path(keyingset, keyingset_path);
235
236 /* The active path should now be the previously second-to-last active one. */
237 keyingset->active_path--;
238
239 return OPERATOR_FINISHED;
240}
241
243{
244 /* Identifiers. */
245 ot->name = "Remove Active Keying Set Path";
246 ot->idname = "ANIM_OT_keying_set_path_remove";
247 ot->description = "Remove active Path from active keying set";
248
249 /* Callbacks. */
252}
253
254/* ************************************************** */
255/* KEYING SETS - OPERATORS (for use in UI menus) */
256
257/* Add to KeyingSet Button Operator ------------------------ */
258
260{
261 PropertyRNA *prop = nullptr;
262 PointerRNA ptr = {};
263 int index = 0, pflag = 0;
264
265 if (!UI_context_active_but_prop_get(C, &ptr, &prop, &index)) {
266 /* Pass event on if no active button found. */
268 }
269
270 /* Verify the Keying Set to use:
271 * - use the active one for now (more control over this can be added later)
272 * - add a new one if it doesn't exist
273 */
274 KeyingSet *keyingset = nullptr;
275 Scene *scene = CTX_data_scene(C);
276 if (scene->active_keyingset == 0) {
277 /* Validate flags
278 * - absolute KeyingSets should be created by default
279 */
281
283
284 /* Call the API func, and set the active keyingset index. */
285 keyingset = BKE_keyingset_add(
286 &scene->keyingsets, "ButtonKeyingSet", "Button Keying Set", flag, keyingflag);
287
289 }
290 else if (scene->active_keyingset < 0) {
291 BKE_report(op->reports, RPT_ERROR, "Cannot add property to built in keying set");
292 return OPERATOR_CANCELLED;
293 }
294 else {
295 keyingset = static_cast<KeyingSet *>(
296 BLI_findlink(&scene->keyingsets, scene->active_keyingset - 1));
297 }
298
299 /* Check if property is able to be added. */
300 const bool all = RNA_boolean_get(op->ptr, "all");
301 bool changed = false;
302 if (ptr.owner_id && ptr.data && prop && RNA_property_anim_editable(&ptr, prop)) {
303 if (const std::optional<std::string> path = RNA_path_from_ID_to_property(&ptr, prop)) {
304 if (all) {
305 pflag |= KSP_FLAG_WHOLE_ARRAY;
306
307 /* We need to set the index for this to 0, even though it may break in some cases, this is
308 * necessary if we want the entire array for most cases to get included without the user
309 * having to worry about where they clicked.
310 */
311 index = 0;
312 }
313
314 /* Add path to this setting. */
316 keyingset, ptr.owner_id, nullptr, path->c_str(), index, pflag, KSP_GROUP_KSNAME);
317 keyingset->active_path = BLI_listbase_count(&keyingset->paths);
318 changed = true;
319 }
320 }
321
322 if (changed) {
324
325 /* Show notification/report header, so that users notice that something changed. */
326 BKE_reportf(op->reports, RPT_INFO, "Property added to Keying Set: '%s'", keyingset->name);
327 }
328
329 return (changed) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
330}
331
333{
334 /* Identifiers. */
335 ot->name = "Add to Keying Set";
336 ot->idname = "ANIM_OT_keyingset_button_add";
337 ot->description = "Add current UI-active property to current keying set";
338
339 /* Callbacks. */
341 // op->poll = ???
342
343 /* Flags. */
345
346 /* Properties. */
347 RNA_def_boolean(ot->srna, "all", true, "All", "Add all elements of the array to a Keying Set");
348}
349
350/* Remove from KeyingSet Button Operator ------------------------ */
351
353{
354 PropertyRNA *prop = nullptr;
355 PointerRNA ptr = {};
356 int index = 0;
357
358 if (!UI_context_active_but_prop_get(C, &ptr, &prop, &index)) {
359 /* Pass event on if no active button found. */
361 }
362
363 /* Verify the Keying Set to use:
364 * - use the active one for now (more control over this can be added later)
365 * - return error if it doesn't exist
366 */
367 Scene *scene = CTX_data_scene(C);
368 if (scene->active_keyingset == 0) {
369 BKE_report(op->reports, RPT_ERROR, "No active Keying Set to remove property from");
370 return OPERATOR_CANCELLED;
371 }
372
373 if (scene->active_keyingset < 0) {
374 BKE_report(op->reports, RPT_ERROR, "Cannot remove property from built in keying set");
375 return OPERATOR_CANCELLED;
376 }
377
378 KeyingSet *keyingset = static_cast<KeyingSet *>(
379 BLI_findlink(&scene->keyingsets, scene->active_keyingset - 1));
380
381 bool changed = false;
382 if (ptr.owner_id && ptr.data && prop) {
383 if (const std::optional<std::string> path = RNA_path_from_ID_to_property(&ptr, prop)) {
384 /* Try to find a path matching this description. */
385 KS_Path *keyingset_path = BKE_keyingset_find_path(
386 keyingset, ptr.owner_id, keyingset->name, path->c_str(), index, KSP_GROUP_KSNAME);
387
388 if (keyingset_path) {
389 BKE_keyingset_free_path(keyingset, keyingset_path);
390 changed = true;
391 }
392 }
393 }
394
395 if (changed) {
397
398 /* Show warning. */
399 BKE_report(op->reports, RPT_INFO, "Property removed from keying set");
400 }
401
402 return (changed) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
403}
404
406{
407 /* Identifiers. */
408 ot->name = "Remove from Keying Set";
409 ot->idname = "ANIM_OT_keyingset_button_remove";
410 ot->description = "Remove current UI-active property from current keying set";
411
412 /* Callbacks. */
414 // op->poll = ???
415
416 /* Flags. */
418}
419
420/* ******************************************* */
421
422/* Change Active KeyingSet Operator ------------------------ */
423/* This operator checks if a menu should be shown
424 * for choosing the KeyingSet to make the active one. */
425
427 wmOperator *op,
428 const wmEvent * /*event*/)
429{
430 uiPopupMenu *pup;
431 uiLayout *layout;
432
433 /* Call the menu, which will call this operator again, hence the canceled. */
434 pup = UI_popup_menu_begin(C, op->type->name, ICON_NONE);
435 layout = UI_popup_menu_layout(pup);
436 uiItemsEnumO(layout, "ANIM_OT_keying_set_active_set", "type");
437 UI_popup_menu_end(C, pup);
438
439 return OPERATOR_INTERFACE;
440}
441
443{
444 Scene *scene = CTX_data_scene(C);
445 const int type = RNA_enum_get(op->ptr, "type");
446
447 /* If type == 0, it will deselect any active keying set. */
448 scene->active_keyingset = type;
449
451
452 return OPERATOR_FINISHED;
453}
454
455/* Build the enum for all keyingsets except the active keyingset. */
456static void build_keyingset_enum(bContext *C, EnumPropertyItem **item, int *totitem, bool *r_free)
457{
458 /* user-defined Keying Sets
459 * - these are listed in the order in which they were defined for the active scene
460 */
461 EnumPropertyItem item_tmp = {0};
462
463 Scene *scene = CTX_data_scene(C);
464 KeyingSet *keyingset;
465 int enum_index = 1;
466 if (scene->keyingsets.first) {
467 for (keyingset = static_cast<KeyingSet *>(scene->keyingsets.first); keyingset;
468 keyingset = keyingset->next, enum_index++)
469 {
470 if (ANIM_keyingset_context_ok_poll(C, keyingset)) {
471 item_tmp.identifier = keyingset->idname;
472 item_tmp.name = keyingset->name;
473 item_tmp.description = keyingset->description;
474 item_tmp.value = enum_index;
475 RNA_enum_item_add(item, totitem, &item_tmp);
476 }
477 }
478
479 RNA_enum_item_add_separator(item, totitem);
480 }
481
482 /* Builtin Keying Sets. */
483 enum_index = -1;
484 for (keyingset = static_cast<KeyingSet *>(builtin_keyingsets.first); keyingset;
485 keyingset = keyingset->next, enum_index--)
486 {
487 /* Only show KeyingSet if context is suitable. */
488 if (ANIM_keyingset_context_ok_poll(C, keyingset)) {
489 item_tmp.identifier = keyingset->idname;
490 item_tmp.name = keyingset->name;
491 item_tmp.description = keyingset->description;
492 item_tmp.value = enum_index;
493 RNA_enum_item_add(item, totitem, &item_tmp);
494 }
495 }
496
497 RNA_enum_item_end(item, totitem);
498 *r_free = true;
499}
500
502 PointerRNA * /*ptr*/,
503 PropertyRNA * /*prop*/,
504 bool *r_free)
505{
506 if (C == nullptr) {
508 }
509
510 /* Active Keying Set.
511 * - only include entry if it exists
512 */
513 Scene *scene = CTX_data_scene(C);
514 EnumPropertyItem *item = nullptr, item_tmp = {0};
515 int totitem = 0;
516 if (scene->active_keyingset) {
517 /* Active Keying Set. */
518 item_tmp.identifier = "__ACTIVE__";
519 item_tmp.name = "Clear Active Keying Set";
520 item_tmp.value = 0;
521 RNA_enum_item_add(&item, &totitem, &item_tmp);
522
523 RNA_enum_item_add_separator(&item, &totitem);
524 }
525
526 build_keyingset_enum(C, &item, &totitem, r_free);
527
528 return item;
529}
530
532{
533 PropertyRNA *prop;
534
535 /* Identifiers. */
536 ot->name = "Set Active Keying Set";
537 ot->idname = "ANIM_OT_keying_set_active_set";
538 ot->description = "Set a new active keying set";
539
540 /* Callbacks. */
544
545 /* Flags. */
547
548 /* Keyingset to use (dynamic enum). */
549 prop = RNA_def_enum(
550 ot->srna, "type", rna_enum_dummy_DEFAULT_items, 0, "Keying Set", "The Keying Set to use");
552}
553
554/* ******************************************* */
555/* KEYING SETS API (for UI) */
556
557/* Getters for Active/Indices ----------------------------- */
558
560{
561 int index;
562
563 /* If no KeyingSet provided, have none. */
564 if (keyingset == nullptr) {
565 return 0;
566 }
567
568 /* Check if the KeyingSet exists in scene list. */
569 if (scene) {
570 /* Get index and if valid, return
571 * - (absolute) Scene KeyingSets are from (>= 1)
572 */
573 index = BLI_findindex(&scene->keyingsets, keyingset);
574 if (index != -1) {
575 return (index + 1);
576 }
577 }
578
579 /* Still here, so try built-ins list too:
580 * - Built-ins are from (<= -1).
581 * - None/Invalid is (= 0).
582 */
583 index = BLI_findindex(&builtin_keyingsets, keyingset);
584 if (index != -1) {
585 return -(index + 1);
586 }
587 return 0;
588}
589
591 const bContext *C,
593 const bool use_poll)
594{
595 /* Poll requires context. */
596 if (use_poll && (C == nullptr)) {
597 return;
598 }
599
600 Scene *scene = C ? CTX_data_scene(C) : nullptr;
601
602 /* Active Keying Set. */
603 if (!use_poll || (scene && scene->active_keyingset)) {
604 StringPropertySearchVisitParams visit_params{};
605 visit_params.text = "__ACTIVE__";
606 visit_params.info = "Active Keying Set";
607 visit_fn(visit_params);
608 }
609
610 /* User-defined Keying Sets. */
611 if (scene && scene->keyingsets.first) {
612 LISTBASE_FOREACH (KeyingSet *, keyingset, &scene->keyingsets) {
613 if (use_poll && !ANIM_keyingset_context_ok_poll((bContext *)C, keyingset)) {
614 continue;
615 }
616 StringPropertySearchVisitParams visit_params{};
617 visit_params.text = keyingset->idname;
618 visit_params.info = keyingset->name;
619 visit_fn(visit_params);
620 }
621 }
622
623 /* Builtin Keying Sets. */
625 if (use_poll && !ANIM_keyingset_context_ok_poll((bContext *)C, keyingset)) {
626 continue;
627 }
628 StringPropertySearchVisitParams visit_params{};
629 visit_params.text = keyingset->idname;
630 visit_params.info = keyingset->name;
631 visit_fn(visit_params);
632 }
633}
634
636 const bContext *C,
637 PointerRNA * /*ptr*/,
638 PropertyRNA * /*prop*/,
639 const char * /*edit_text*/,
641{
642 anim_keyingset_visit_for_search_impl(C, visit_fn, false);
643}
644
646 const bContext *C,
647 PointerRNA * /*ptr*/,
648 PropertyRNA * /*prop*/,
649 const char * /*edit_text*/,
651{
653}
654
655/* Menu of All Keying Sets ----------------------------- */
656
658 PointerRNA * /*ptr*/,
659 PropertyRNA * /*prop*/,
660 bool *r_free)
661{
662 if (C == nullptr) {
664 }
665
666 /* Active Keying Set
667 * - only include entry if it exists
668 */
669 Scene *scene = CTX_data_scene(C);
670 EnumPropertyItem *item = nullptr, item_tmp = {0};
671 int totitem = 0;
672 if (scene->active_keyingset) {
673 /* Active Keying Set. */
674 item_tmp.identifier = "__ACTIVE__";
675 item_tmp.name = "Active Keying Set";
676 item_tmp.value = 0;
677 RNA_enum_item_add(&item, &totitem, &item_tmp);
678
679 RNA_enum_item_add_separator(&item, &totitem);
680 }
681
682 build_keyingset_enum(C, &item, &totitem, r_free);
683
684 return item;
685}
686
688{
689 if (type == 0) {
690 type = scene->active_keyingset;
691 }
692
693 if (type > 0) {
694 return static_cast<KeyingSet *>(BLI_findlink(&scene->keyingsets, type - 1));
695 }
696
697 return static_cast<KeyingSet *>(BLI_findlink(&builtin_keyingsets, -type - 1));
698}
699
701{
702 KeyingSet *keyingset = static_cast<KeyingSet *>(
703 BLI_findstring(&scene->keyingsets, idname, offsetof(KeyingSet, idname)));
704 if (keyingset == nullptr) {
705 keyingset = static_cast<KeyingSet *>(
707 }
708 return keyingset;
709}
710
711/* ******************************************* */
712/* KEYFRAME MODIFICATION */
713
714/* Polling API ----------------------------------------------- */
715
717{
718 if (keyingset->flag & KEYINGSET_ABSOLUTE) {
719 return true;
720 }
721
723
724 /* Get the associated 'type info' for this KeyingSet. */
725 if (keyingset_info == nullptr) {
726 return false;
727 }
728 /* TODO: check for missing callbacks! */
729
730 /* Check if it can be used in the current context. */
731 return keyingset_info->poll(keyingset_info, C);
732}
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)
Definition anim_sys.cc:81
void BKE_keyingset_free_paths(struct KeyingSet *ks)
Definition anim_sys.cc:264
struct KeyingSet * BKE_keyingset_add(struct ListBase *list, const char idname[], const char name[], short flag, short keyingflag)
Definition anim_sys.cc:131
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)
Definition anim_sys.cc:161
void BKE_keyingset_free_path(struct KeyingSet *ks, struct KS_Path *ksp)
Definition anim_sys.cc:224
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)
Definition report.cc:126
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
Definition listbase.cc:586
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
Definition listbase.cc:534
#define LISTBASE_FOREACH(type, var, list)
void * BLI_findstring(const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
Definition listbase.cc:608
void BLI_freelinkN(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:270
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:111
int BLI_listbase_count(const ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
Definition listbase.cc:524
@ ID_OB
eKS_Settings
@ KEYINGSET_ABSOLUTE
eInsertKeyFlags
@ KSP_GROUP_KSNAME
@ KSP_FLAG_WHOLE_ARRAY
@ OPERATOR_CANCELLED
@ OPERATOR_INTERFACE
@ OPERATOR_FINISHED
@ OPERATOR_PASS_THROUGH
bool ED_operator_areaactive(bContext *C)
Read Guarded memory(de)allocation.
#define C
Definition RandGen.cpp:29
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)
void uiItemsEnumO(uiLayout *layout, blender::StringRefNull opname, blender::StringRefNull propname)
@ OPTYPE_UNDO
Definition WM_types.hh:182
@ OPTYPE_REGISTER
Definition WM_types.hh:180
#define ND_KEYINGSET
Definition WM_types.hh:445
#define NC_SCENE
Definition WM_types.hh:375
ListBase builtin_keyingsets
#define offsetof(t, d)
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)
Definition mallocn.cc:118
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)
Definition rna_path.cc:1173
const EnumPropertyItem rna_enum_dummy_DEFAULT_items[]
Definition rna_rna.cc:32
const char * identifier
Definition RNA_types.hh:623
const char * name
Definition RNA_types.hh:627
const char * description
Definition RNA_types.hh:629
short groupmode
cbKeyingSet_Poll poll
char name[64]
char typeinfo[64]
char idname[64]
struct KeyingSet * next
ListBase paths
char description[1024]
void * first
int active_keyingset
ListBase keyingsets
std::optional< std::string > info
Definition RNA_types.hh:682
const char * name
Definition WM_types.hh:1030
struct ReportList * reports
struct wmOperatorType * type
struct PointerRNA * ptr
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
PointerRNA * ptr
Definition wm_files.cc:4226
wmOperatorType * ot
Definition wm_files.cc:4225
uint8_t flag
Definition wm_window.cc:139