Blender V5.0
nla_buttons.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2009 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include <cfloat>
10#include <cstring>
11
12#include "DNA_anim_types.h"
13
14#include "MEM_guardedalloc.h"
15
16#include "BLI_listbase.h"
17#include "BLI_string_utf8.h"
18
19#include "BLT_translation.hh"
20
21#include "BKE_context.hh"
22#include "BKE_fcurve.hh"
23#include "BKE_nla.hh"
24#include "BKE_screen.hh"
25
26#include "WM_api.hh"
27#include "WM_types.hh"
28
29#include "RNA_access.hh"
30#include "RNA_prototypes.hh"
31
32#include "ANIM_action.hh"
33#include "ANIM_action_legacy.hh"
34
35#include "ED_anim_api.hh"
36
37#include "UI_interface_c.hh"
39#include "UI_resources.hh"
40
41#include "nla_intern.hh" /* own include */
42
43using namespace blender;
44
45/* ******************* nla editor space & buttons ************** */
46
47/* -------------- */
48
49static void do_nla_region_buttons(bContext *C, void * /*arg*/, int /*event*/)
50{
51 // Scene *scene = CTX_data_scene(C);
52#if 0
53 switch (event) {
54 /* pass */
55 }
56#endif
57 /* default for now */
60}
61
63 PointerRNA *adt_ptr,
64 PointerRNA *nlt_ptr,
65 PointerRNA *strip_ptr)
66{
67 bAnimContext ac;
68 ListBase anim_data = {nullptr, nullptr};
69 short found = 0; /* not bool, since we need to indicate "found but not ideal" status */
70
71 /* For now, only draw if we could init the anim-context info
72 * (necessary for all animation-related tools)
73 * to work correctly is able to be correctly retrieved. There's no point showing empty panels? */
74 if (ANIM_animdata_get_context(C, &ac) == 0) {
75 return false;
76 }
77
78 /* extract list of active channel(s), of which we should only take the first one
79 * - we need the channels flag to get the active AnimData block when there are no NLA Tracks
80 */
81 /* XXX: double-check active! */
85 ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, eAnimCont_Types(ac.datatype));
86
87 LISTBASE_FOREACH (bAnimListElem *, ale, &anim_data) {
88 switch (ale->type) {
89 case ANIMTYPE_NLATRACK: /* NLA Track - The primary data type which should get caught */
90 {
91 NlaTrack *nlt = static_cast<NlaTrack *>(ale->data);
92 AnimData *adt = ale->adt;
93
94 /* found it, now set the pointers */
95 if (adt_ptr) {
96 /* AnimData pointer */
97 *adt_ptr = RNA_pointer_create_discrete(ale->id, &RNA_AnimData, adt);
98 }
99 if (nlt_ptr) {
100 /* NLA-Track pointer */
101 *nlt_ptr = RNA_pointer_create_discrete(ale->id, &RNA_NlaTrack, nlt);
102 }
103 if (strip_ptr) {
104 /* NLA-Strip pointer */
106 *strip_ptr = RNA_pointer_create_discrete(ale->id, &RNA_NlaStrip, strip);
107 }
108
109 found = 1;
110 break;
111 }
112 case ANIMTYPE_SCENE: /* Top-Level Widgets doubling up as datablocks */
113 case ANIMTYPE_OBJECT:
114 case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
115 case ANIMTYPE_DSLAM:
116 case ANIMTYPE_DSCAM:
118 case ANIMTYPE_DSCUR:
119 case ANIMTYPE_DSSKEY:
120 case ANIMTYPE_DSWOR:
121 case ANIMTYPE_DSNTREE:
122 case ANIMTYPE_DSPART:
123 case ANIMTYPE_DSMBALL:
124 case ANIMTYPE_DSARM:
125 case ANIMTYPE_DSMESH:
126 case ANIMTYPE_DSTEX:
127 case ANIMTYPE_DSLAT:
129 case ANIMTYPE_DSSPK:
131 case ANIMTYPE_PALETTE:
132 case ANIMTYPE_DSHAIR:
136 /* for these channels, we only do AnimData */
137 if (ale->adt && adt_ptr) {
138 ID *id;
139
140 if ((ale->data == nullptr) || (ale->type == ANIMTYPE_OBJECT)) {
141 /* ale->data is not an ID block! */
142 id = ale->id;
143 }
144 else {
145 /* ale->data is always the proper ID block we need,
146 * but ale->id may not be (i.e. for textures) */
147 id = static_cast<ID *>(ale->data);
148 }
149
150 /* AnimData pointer */
151 if (adt_ptr) {
152 *adt_ptr = RNA_pointer_create_discrete(id, &RNA_AnimData, ale->adt);
153 }
154
155 /* set found status to -1, since setting to 1 would break the loop
156 * and potentially skip an active NLA-Track in some cases...
157 */
158 found = -1;
159 }
160 break;
161 }
162 /* Don't set a pointer for NLA Actions.
163 * This will break the dependency graph for the context menu.
164 */
166 break;
167
168 case ANIMTYPE_NONE:
171 case ANIMTYPE_SUMMARY:
172 case ANIMTYPE_GROUP:
173 case ANIMTYPE_FCURVE:
180 case ANIMTYPE_DSMCLIP:
182 case ANIMTYPE_GPLAYER:
189 break;
190 }
191
192 if (found > 0) {
193 break;
194 }
195 }
196
197 /* free temp data */
198 ANIM_animdata_freelist(&anim_data);
199
200 return (found != 0);
201}
202
204{
205 return nla_panel_context(C, nullptr, r_ptr, nullptr);
206}
207
209{
210 return nla_panel_context(C, nullptr, nullptr, r_ptr);
211}
212
214{
215 PointerRNA track_ptr;
216 if (!ANIM_nla_context_track_ptr(C, &track_ptr)) {
217 return nullptr;
218 }
219 return static_cast<NlaTrack *>(track_ptr.data);
220}
221
223{
224 PointerRNA strip_ptr;
225 if (!ANIM_nla_context_strip_ptr(C, &strip_ptr)) {
226 return nullptr;
227 }
228 return static_cast<NlaStrip *>(strip_ptr.data);
229}
230
231#if 0
232static bool nla_panel_poll(const bContext *C, PanelType *pt)
233{
234 return nla_panel_context(C, nullptr, nullptr);
235}
236#endif
237
238static bool nla_animdata_panel_poll(const bContext *C, PanelType * /*pt*/)
239{
241 PointerRNA strip_ptr;
242 return (nla_panel_context(C, &ptr, nullptr, &strip_ptr) && (ptr.data != nullptr) &&
243 (ptr.owner_id != strip_ptr.owner_id));
244}
245
246static bool nla_strip_panel_poll(const bContext *C, PanelType * /*pt*/)
247{
249 return (nla_panel_context(C, nullptr, nullptr, &ptr) && (ptr.data != nullptr));
250}
251
253{
255
256 if (!nla_panel_context(C, nullptr, nullptr, &ptr)) {
257 return false;
258 }
259 if (ptr.data == nullptr) {
260 return false;
261 }
262
263 NlaStrip *strip = static_cast<NlaStrip *>(ptr.data);
264 return eNlaStrip_Type(strip->type) == NLASTRIP_TYPE_CLIP;
265}
266
267static bool nla_strip_eval_panel_poll(const bContext *C, PanelType * /*pt*/)
268{
270
271 if (!nla_panel_context(C, nullptr, nullptr, &ptr)) {
272 return false;
273 }
274 if (ptr.data == nullptr) {
275 return false;
276 }
277
278 NlaStrip *strip = static_cast<NlaStrip *>(ptr.data);
279
280 if (strip->type == NLASTRIP_TYPE_SOUND) {
281 return false;
282 }
283
284 return true;
285}
286
287/* -------------- */
288
289/* active AnimData */
290static void nla_panel_animdata(const bContext *C, Panel *panel)
291{
292 PointerRNA adt_ptr;
293 PointerRNA strip_ptr;
294 // AnimData *adt;
295 uiLayout *layout = panel->layout;
296 uiLayout *row;
297 uiBlock *block;
298
299 /* check context and also validity of pointer */
300 if (!nla_panel_context(C, &adt_ptr, nullptr, &strip_ptr)) {
301 return;
302 }
303
304 if (adt_ptr.owner_id == strip_ptr.owner_id) {
305 return;
306 }
307
308 // adt = adt_ptr.data;
309
310 block = layout->block();
312 layout->use_property_split_set(true);
313 layout->use_property_decorate_set(false);
314
315 /* AnimData Source Properties ----------------------------------- */
316
317 /* icon + id-block name of block where AnimData came from to prevent
318 * accidentally changing the properties of the wrong action
319 */
320 if (adt_ptr.owner_id) {
321 ID *id = adt_ptr.owner_id;
323
324 /* ID-block name > AnimData */
325 row = &layout->row(true);
327
328 row->label(id->name + 2, RNA_struct_ui_icon(id_ptr.type)); /* id-block (src) */
329 row->label("", ICON_RIGHTARROW); /* expander */
330 row->label(IFACE_("Animation Data"), ICON_ANIM_DATA); /* animdata */
331
332 layout->separator();
333 }
334
335 /* Active Action Properties ------------------------------------- */
336 /* action */
337 uiLayout *col = &layout->column(true);
338 uiTemplateID(col, C, &adt_ptr, "action", "ACTION_OT_new", nullptr, "NLA_OT_action_unlink");
340 C,
341 &adt_ptr,
342 "action_slot",
343 &adt_ptr,
344 "action_suitable_slots",
345 nullptr,
346 nullptr,
347 IFACE_("Slot"));
348
349 /* extrapolation */
350 row = &layout->row(true);
351 row->prop(&adt_ptr, "action_extrapolation", UI_ITEM_NONE, IFACE_("Extrapolation"), ICON_NONE);
352
353 /* blending */
354 row = &layout->row(true);
355 row->prop(&adt_ptr, "action_blend_type", UI_ITEM_NONE, IFACE_("Blending"), ICON_NONE);
356
357 /* influence */
358 row = &layout->row(true);
359 row->prop(&adt_ptr, "action_influence", UI_ITEM_NONE, IFACE_("Influence"), ICON_NONE);
360}
361
362/* generic settings for active NLA-Strip */
363static void nla_panel_stripname(const bContext *C, Panel *panel)
364{
365 PointerRNA strip_ptr;
366 uiLayout *layout = panel->layout;
367 uiLayout *row;
368 uiBlock *block;
369
370 if (!nla_panel_context(C, nullptr, nullptr, &strip_ptr)) {
371 return;
372 }
373
374 block = layout->block();
376
377 /* Strip Properties ------------------------------------- */
378 /* strip type */
379 row = &layout->row(false);
380 if (RNA_enum_get(&strip_ptr, "type") == NLASTRIP_TYPE_CLIP) {
381 row->label("", ICON_ANIM);
382 }
383 else if (RNA_enum_get(&strip_ptr, "type") == NLASTRIP_TYPE_TRANSITION) {
384 row->label("", ICON_ARROW_LEFTRIGHT);
385 }
386 else if (RNA_enum_get(&strip_ptr, "type") == NLASTRIP_TYPE_META) {
387 row->label("", ICON_SEQ_STRIP_META);
388 }
389 else if (RNA_enum_get(&strip_ptr, "type") == NLASTRIP_TYPE_SOUND) {
390 row->label("", ICON_SOUND);
391 }
392
393 row->prop(&strip_ptr, "name", UI_ITEM_NONE, "", ICON_NLA);
394
396 row->prop(&strip_ptr, "mute", UI_ITEM_NONE, "", ICON_NONE);
398}
399
400/* generic settings for active NLA-Strip */
401static void nla_panel_properties(const bContext *C, Panel *panel)
402{
403 PointerRNA strip_ptr;
404 uiLayout *layout = panel->layout;
405 uiLayout *column, *row;
406 uiBlock *block;
407 short showEvalProps = 1;
408
409 if (!nla_panel_context(C, nullptr, nullptr, &strip_ptr)) {
410 return;
411 }
412
413 block = layout->block();
415
416 /* Strip Properties ------------------------------------- */
417 /* strip type */
418
419 layout->use_property_split_set(true);
420 layout->use_property_decorate_set(false);
421
422 /* strip extents */
423 column = &layout->column(true);
424 column->prop(&strip_ptr, "frame_start_ui", UI_ITEM_NONE, IFACE_("Frame Start"), ICON_NONE);
425 column->prop(&strip_ptr, "frame_end_ui", UI_ITEM_NONE, IFACE_("End"), ICON_NONE);
426
427 /* Evaluation-Related Strip Properties ------------------ */
428
429 /* sound properties strips don't have these settings */
430 if (RNA_enum_get(&strip_ptr, "type") == NLASTRIP_TYPE_SOUND) {
431 showEvalProps = 0;
432 }
433
434 /* only show if allowed to... */
435 if (showEvalProps) {
436 /* extrapolation */
437 column = &layout->column(false);
438 column->prop(&strip_ptr, "extrapolation", UI_ITEM_NONE, std::nullopt, ICON_NONE);
439 column->prop(&strip_ptr, "blend_type", UI_ITEM_NONE, std::nullopt, ICON_NONE);
440
441 /* Blend in/out + auto-blending:
442 * - blend in/out can only be set when auto-blending is off.
443 */
444
445 layout->separator();
446
447 column = &layout->column(true);
448 column->active_set(RNA_boolean_get(&strip_ptr, "use_auto_blend") == false);
449 column->prop(&strip_ptr, "blend_in", UI_ITEM_NONE, IFACE_("Blend In"), ICON_NONE);
450 column->prop(&strip_ptr, "blend_out", UI_ITEM_NONE, IFACE_("Out"), ICON_NONE);
451
452 row = &column->row(true);
453 row->active_set(RNA_boolean_get(&strip_ptr, "use_animated_influence") == false);
454 row->prop(
455 &strip_ptr, "use_auto_blend", UI_ITEM_NONE, std::nullopt, ICON_NONE); /* XXX as toggle? */
456
457 /* settings */
458 column = &layout->column(true, IFACE_("Playback"));
459 row = &column->row(true);
460 row->active_set(!(RNA_boolean_get(&strip_ptr, "use_animated_influence") ||
461 RNA_boolean_get(&strip_ptr, "use_animated_time")));
462 row->prop(&strip_ptr, "use_reverse", UI_ITEM_NONE, std::nullopt, ICON_NONE);
463
464 column->prop(&strip_ptr, "use_animated_time_cyclic", UI_ITEM_NONE, std::nullopt, ICON_NONE);
465 }
466}
467
468/* action-clip only settings for active NLA-Strip */
469static void nla_panel_actclip(const bContext *C, Panel *panel)
470{
471 PointerRNA strip_ptr;
472 uiLayout *layout = panel->layout;
473 uiLayout *column, *row;
474 uiBlock *block;
475
476 /* check context and also validity of pointer */
477 if (!nla_panel_context(C, nullptr, nullptr, &strip_ptr)) {
478 return;
479 }
480
481 block = layout->block();
483 layout->use_property_split_set(true);
484 layout->use_property_decorate_set(true);
485
486 /* Strip Properties ------------------------------------- */
487 /* action pointer */
488 column = &layout->column(true);
489 column->prop(&strip_ptr, "action", UI_ITEM_NONE, std::nullopt, ICON_ACTION);
490
491 NlaStrip *strip = static_cast<NlaStrip *>(strip_ptr.data);
492 if (strip->act) {
493 BLI_assert(strip_ptr.owner_id);
494
495 animrig::Action &action = strip->act->wrap();
496 ID &animated_id = *strip_ptr.owner_id;
498 PointerRNA animated_id_ptr = RNA_id_pointer_create(&animated_id);
499 column->context_ptr_set("animated_id", &animated_id_ptr);
500 column->context_ptr_set("nla_strip", &strip_ptr);
501 uiTemplateSearch(column,
502 C,
503 &strip_ptr,
504 "action_slot",
505 &strip_ptr,
506 "action_suitable_slots",
507 nullptr,
508 "anim.slot_unassign_from_nla_strip",
509 "Slot");
510 }
511 }
512
513 /* action extents */
514 column = &layout->column(true);
515 column->prop(&strip_ptr, "action_frame_start", UI_ITEM_NONE, IFACE_("Frame Start"), ICON_NONE);
516 column->prop(&strip_ptr, "action_frame_end", UI_ITEM_NONE, IFACE_("End"), ICON_NONE);
517
518 row = &layout->row(false, IFACE_("Sync Length"));
519 row->prop(&strip_ptr, "use_sync_length", UI_ITEM_NONE, "", ICON_NONE);
520 row->op("NLA_OT_action_sync_length", IFACE_("Now"), ICON_FILE_REFRESH);
521
522 /* action usage */
523 column = &layout->column(true);
524 column->active_set(RNA_boolean_get(&strip_ptr, "use_animated_time") == false);
525 column->prop(&strip_ptr, "scale", UI_ITEM_NONE, IFACE_("Playback Scale"), ICON_NONE);
526 column->prop(&strip_ptr, "repeat", UI_ITEM_NONE, std::nullopt, ICON_NONE);
527}
528
529/* evaluation settings for active NLA-Strip */
531{
532 PointerRNA strip_ptr;
533 uiLayout *layout = panel->layout;
534 uiLayout *col;
535 uiBlock *block;
536
537 /* check context and also validity of pointer */
538 if (!nla_panel_context(C, nullptr, nullptr, &strip_ptr)) {
539 return;
540 }
541
542 block = layout->block();
544
545 col = &layout->column(true);
546 col->prop(&strip_ptr, "use_animated_influence", UI_ITEM_NONE, "", ICON_NONE);
547}
548
549/* evaluation settings for active NLA-Strip */
550static void nla_panel_evaluation(const bContext *C, Panel *panel)
551{
552 PointerRNA strip_ptr;
553 uiLayout *layout = panel->layout;
554 uiBlock *block;
555
556 /* check context and also validity of pointer */
557 if (!nla_panel_context(C, nullptr, nullptr, &strip_ptr)) {
558 return;
559 }
560
561 block = layout->block();
563 layout->use_property_split_set(true);
564
565 layout->enabled_set(RNA_boolean_get(&strip_ptr, "use_animated_influence"));
566 layout->prop(&strip_ptr, "influence", UI_ITEM_NONE, std::nullopt, ICON_NONE);
567}
568
570{
571 PointerRNA strip_ptr;
572 uiLayout *layout = panel->layout;
573 uiLayout *col;
574 uiBlock *block;
575
576 /* check context and also validity of pointer */
577 if (!nla_panel_context(C, nullptr, nullptr, &strip_ptr)) {
578 return;
579 }
580
581 block = layout->block();
583
584 col = &layout->column(true);
585 col->prop(&strip_ptr, "use_animated_time", UI_ITEM_NONE, "", ICON_NONE);
586}
587
589{
590 PointerRNA strip_ptr;
591 uiLayout *layout = panel->layout;
592 uiBlock *block;
593
594 /* check context and also validity of pointer */
595 if (!nla_panel_context(C, nullptr, nullptr, &strip_ptr)) {
596 return;
597 }
598
599 block = layout->block();
601 layout->use_property_split_set(true);
602
603 layout->enabled_set(RNA_boolean_get(&strip_ptr, "use_animated_time"));
604 layout->prop(&strip_ptr, "strip_time", UI_ITEM_NONE, std::nullopt, ICON_NONE);
605}
606
607#define NLA_FMODIFIER_PANEL_PREFIX "NLA"
608
609static void nla_fmodifier_panel_id(void *fcm_link, char *r_name)
610{
611 FModifier *fcm = static_cast<FModifier *>(fcm_link);
613 const FModifierTypeInfo *fmi = get_fmodifier_typeinfo(type);
615}
616
617/* F-Modifiers for active NLA-Strip */
618static void nla_panel_modifiers(const bContext *C, Panel *panel)
619{
620 PointerRNA strip_ptr;
621 uiLayout *row;
622 uiBlock *block;
623
624 /* check context and also validity of pointer */
625 if (!nla_panel_context(C, nullptr, nullptr, &strip_ptr)) {
626 return;
627 }
628 NlaStrip *strip = static_cast<NlaStrip *>(strip_ptr.data);
629
630 block = panel->layout->block();
632
633 /* 'add modifier' button at top of panel */
634 {
635 row = &panel->layout->row(false);
636 block = row->block();
637
638 /* FIXME: we need to set the only-active property so that this
639 * will only add modifiers for the active strip (not all selected). */
640 row->op_menu_enum(C, "NLA_OT_fmodifier_add", "type", IFACE_("Add Modifier"), ICON_NONE);
641
642 /* copy/paste (as sub-row) */
643 row = &row->row(true);
644 row->op("NLA_OT_fmodifier_copy", "", ICON_COPYDOWN);
645 row->op("NLA_OT_fmodifier_paste", "", ICON_PASTEDOWN);
646 }
647
649}
650
651/* ******************* general ******************************** */
652
654{
655 PanelType *pt;
656
657 pt = MEM_callocN<PanelType>("spacetype nla panel animdata");
658 STRNCPY_UTF8(pt->idname, "NLA_PT_animdata");
659 STRNCPY_UTF8(pt->label, N_("Animation Data"));
660 STRNCPY_UTF8(pt->category, "Edited Action");
665 BLI_addtail(&art->paneltypes, pt);
666
667 pt = MEM_callocN<PanelType>("spacetype nla panel properties");
668 STRNCPY_UTF8(pt->idname, "NLA_PT_stripname");
669 STRNCPY_UTF8(pt->label, N_("Active Strip Name"));
670 STRNCPY_UTF8(pt->category, "Strip");
675 BLI_addtail(&art->paneltypes, pt);
676
677 PanelType *pt_properties = pt = MEM_callocN<PanelType>("spacetype nla panel properties");
678 STRNCPY_UTF8(pt->idname, "NLA_PT_properties");
679 STRNCPY_UTF8(pt->label, N_("Active Strip"));
680 STRNCPY_UTF8(pt->category, "Strip");
684 BLI_addtail(&art->paneltypes, pt);
685
686 pt = MEM_callocN<PanelType>("spacetype nla panel properties");
687 STRNCPY_UTF8(pt->idname, "NLA_PT_actionclip");
688 STRNCPY_UTF8(pt->label, N_("Action Clip"));
689 STRNCPY_UTF8(pt->category, "Strip");
694 BLI_addtail(&art->paneltypes, pt);
695
696 pt = MEM_callocN<PanelType>("spacetype nla panel evaluation");
697 STRNCPY_UTF8(pt->idname, "NLA_PT_evaluation");
698 STRNCPY_UTF8(pt->parent_id, "NLA_PT_properties");
699 STRNCPY_UTF8(pt->label, N_("Animated Influence"));
700 STRNCPY_UTF8(pt->category, "Strip");
704 pt->parent = pt_properties;
707 BLI_addtail(&pt_properties->children, BLI_genericNodeN(pt));
708 BLI_addtail(&art->paneltypes, pt);
709
710 pt = MEM_callocN<PanelType>("spacetype nla panel animated strip time");
711 STRNCPY_UTF8(pt->idname, "NLA_PT_animated_strip_time");
712 STRNCPY_UTF8(pt->parent_id, "NLA_PT_properties");
713 STRNCPY_UTF8(pt->label, N_("Animated Strip Time"));
714 STRNCPY_UTF8(pt->category, "Strip");
718 pt->parent = pt_properties;
721 BLI_addtail(&pt_properties->children, BLI_genericNodeN(pt));
722 BLI_addtail(&art->paneltypes, pt);
723
724 pt = MEM_callocN<PanelType>("spacetype nla panel modifiers");
725 STRNCPY_UTF8(pt->idname, "NLA_PT_modifiers");
726 STRNCPY_UTF8(pt->label, N_("Modifiers"));
727 STRNCPY_UTF8(pt->category, "Modifiers");
732 BLI_addtail(&art->paneltypes, pt);
733
736}
Functions and classes to work with Actions.
Functions for backward compatibility with the legacy Action API.
const FModifierTypeInfo * get_fmodifier_typeinfo(int type)
NlaStrip * BKE_nlastrip_find_active(NlaTrack *nlt)
#define BKE_ST_MAXNAME
Definition BKE_screen.hh:72
@ PANEL_TYPE_NO_HEADER
@ PANEL_TYPE_DEFAULT_CLOSED
#define BLI_assert(a)
Definition BLI_assert.h:46
LinkData * BLI_genericNodeN(void *data)
Definition listbase.cc:922
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:111
size_t size_t size_t BLI_snprintf_utf8(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
#define STRNCPY_UTF8(dst, src)
#define IFACE_(msgid)
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
eFModifier_Types
eNlaStrip_Type
@ NLASTRIP_TYPE_SOUND
@ NLASTRIP_TYPE_META
@ NLASTRIP_TYPE_TRANSITION
@ NLASTRIP_TYPE_CLIP
@ ANIMTYPE_DSSPK
@ ANIMTYPE_DSTEX
@ ANIMTYPE_SUMMARY
@ ANIMTYPE_DSNTREE
@ ANIMTYPE_NLACURVE
@ ANIMTYPE_SHAPEKEY
@ ANIMTYPE_DSMBALL
@ ANIMTYPE_DSCAM
@ ANIMTYPE_DSLIGHTPROBE
@ ANIMTYPE_DSPOINTCLOUD
@ ANIMTYPE_FILLDRIVERS
@ ANIMTYPE_NONE
@ ANIMTYPE_DSPART
@ ANIMTYPE_DSLINESTYLE
@ ANIMTYPE_GROUP
@ ANIMTYPE_ACTION_SLOT
@ ANIMTYPE_SPECIALDATA__UNUSED
@ ANIMTYPE_GREASE_PENCIL_DATABLOCK
@ ANIMTYPE_DSCUR
@ ANIMTYPE_SCENE
@ ANIMTYPE_DSARM
@ ANIMTYPE_NLACONTROLS
@ ANIMTYPE_GPLAYER
@ ANIMTYPE_MASKDATABLOCK
@ ANIMTYPE_ANIMDATA
@ ANIMTYPE_MASKLAYER
@ ANIMTYPE_DSGPENCIL
@ ANIMTYPE_DSLAT
@ ANIMTYPE_NLAACTION
@ ANIMTYPE_DSMCLIP
@ ANIMTYPE_DSMAT
@ ANIMTYPE_NUM_TYPES
@ ANIMTYPE_DSCACHEFILE
@ ANIMTYPE_DSVOLUME
@ ANIMTYPE_FCURVE
@ ANIMTYPE_DSLAM
@ ANIMTYPE_PALETTE
@ ANIMTYPE_GREASE_PENCIL_LAYER
@ ANIMTYPE_FILLACT_LAYERED
@ ANIMTYPE_FILLACTD
@ ANIMTYPE_OBJECT
@ ANIMTYPE_DSMESH
@ ANIMTYPE_GREASE_PENCIL_LAYER_GROUP
@ ANIMTYPE_NLATRACK
@ ANIMTYPE_DSWOR
@ ANIMTYPE_DSSKEY
@ ANIMTYPE_DSHAIR
eAnimCont_Types
eAnimFilter_Flags
@ ANIMFILTER_ACTIVE
@ ANIMFILTER_DATA_VISIBLE
@ ANIMFILTER_LIST_VISIBLE
@ ANIMFILTER_LIST_CHANNELS
@ ANIMFILTER_FCURVESONLY
Read Guarded memory(de)allocation.
#define C
Definition RandGen.cpp:29
void UI_block_emboss_set(uiBlock *block, blender::ui::EmbossType emboss)
void UI_block_func_handle_set(uiBlock *block, uiBlockHandleFunc func, void *arg)
void uiTemplateID(uiLayout *layout, const bContext *C, PointerRNA *ptr, blender::StringRefNull propname, const char *newop, const char *openop, const char *unlinkop, int filter=UI_TEMPLATE_ID_FILTER_ALL, bool live_icon=false, std::optional< blender::StringRef > text=std::nullopt)
void uiTemplateSearch(uiLayout *layout, const bContext *C, PointerRNA *ptr, blender::StringRefNull propname, PointerRNA *searchptr, const char *searchpropname, const char *newop, const char *unlinkop, std::optional< blender::StringRef > text=std::nullopt)
#define UI_ITEM_NONE
#define NC_SCENE
Definition WM_types.hh:378
#define ND_TRANSFORM
Definition WM_types.hh:456
#define NC_OBJECT
Definition WM_types.hh:379
void ANIM_animdata_freelist(ListBase *anim_data)
Definition anim_deps.cc:463
bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, const eAnimFilter_Flags filter_mode, void *data, const eAnimCont_Types datatype)
void ANIM_modifier_panels_register_graph_and_NLA(ARegionType *region_type, const char *modifier_panel_prefix, PanelTypePollFn poll_function)
void ANIM_fmodifier_panels(const bContext *C, ID *owner_id, ListBase *fmodifiers, uiListPanelIDFromDataFunc panel_id_fn)
uint col
#define filter
void * MEM_callocN(size_t len, const char *str)
Definition mallocn.cc:118
bool action_treat_as_legacy(const bAction &action)
NlaTrack * ANIM_nla_context_track(const bContext *C)
static void nla_panel_animated_influence_header(const bContext *C, Panel *panel)
static bool nla_animdata_panel_poll(const bContext *C, PanelType *)
static void nla_panel_properties(const bContext *C, Panel *panel)
static void nla_panel_modifiers(const bContext *C, Panel *panel)
static void nla_panel_evaluation(const bContext *C, Panel *panel)
static void do_nla_region_buttons(bContext *C, void *, int)
static bool nla_strip_actclip_panel_poll(const bContext *C, PanelType *)
static void nla_panel_animated_strip_time(const bContext *C, Panel *panel)
static void nla_panel_stripname(const bContext *C, Panel *panel)
static void nla_panel_animated_strip_time_header(const bContext *C, Panel *panel)
NlaStrip * ANIM_nla_context_strip(const bContext *C)
bool nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA *nlt_ptr, PointerRNA *strip_ptr)
static void nla_panel_actclip(const bContext *C, Panel *panel)
static bool nla_strip_eval_panel_poll(const bContext *C, PanelType *)
static void nla_fmodifier_panel_id(void *fcm_link, char *r_name)
void nla_buttons_register(ARegionType *art)
static void nla_panel_animdata(const bContext *C, Panel *panel)
bool ANIM_nla_context_strip_ptr(const bContext *C, PointerRNA *r_ptr)
bool ANIM_nla_context_track_ptr(const bContext *C, PointerRNA *r_ptr)
static bool nla_strip_panel_poll(const bContext *C, PanelType *)
#define NLA_FMODIFIER_PANEL_PREFIX
int RNA_struct_ui_icon(const StructRNA *type)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PointerRNA RNA_id_pointer_create(ID *id)
ListBase paneltypes
Definition DNA_ID.h:414
char name[258]
Definition DNA_ID.h:432
ListBase modifiers
bAction * act
void(* draw)(const bContext *C, Panel *panel)
char idname[BKE_ST_MAXNAME]
bool(* poll)(const bContext *C, PanelType *pt)
char translation_context[BKE_ST_MAXNAME]
ListBase children
char category[BKE_ST_MAXNAME]
char label[BKE_ST_MAXNAME]
char parent_id[BKE_ST_MAXNAME]
PanelType * parent
void(* draw_header)(const bContext *C, Panel *panel)
struct uiLayout * layout
ID * owner_id
Definition RNA_types.hh:51
StructRNA * type
Definition RNA_types.hh:52
void * data
Definition RNA_types.hh:53
eAnimCont_Types datatype
PointerRNA op_menu_enum(const bContext *C, wmOperatorType *ot, blender::StringRefNull propname, std::optional< blender::StringRefNull > name, int icon)
void use_property_decorate_set(bool is_sep)
void alignment_set(blender::ui::LayoutAlign alignment)
uiBlock * block() const
void label(blender::StringRef name, int icon)
uiLayout & column(bool align)
void active_set(bool active)
void separator(float factor=1.0f, LayoutSeparatorType type=LayoutSeparatorType::Auto)
void enabled_set(bool enabled)
void context_ptr_set(blender::StringRef name, const PointerRNA *ptr)
uiLayout & row(bool align)
PointerRNA op(wmOperatorType *ot, std::optional< blender::StringRef > name, int icon, blender::wm::OpCallContext context, eUI_Item_Flag flag)
void use_property_split_set(bool value)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)
#define N_(msgid)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
PointerRNA * ptr
Definition wm_files.cc:4238