Blender V4.3
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
9#include <cfloat>
10#include <cmath>
11#include <cstdio>
12#include <cstring>
13
14#include "DNA_anim_types.h"
15
16#include "BLI_utildefines.h"
17
18#include "MEM_guardedalloc.h"
19
20#include "BLI_blenlib.h"
21
22#include "BLT_translation.hh"
23
24#include "BKE_context.hh"
25#include "BKE_fcurve.hh"
26#include "BKE_nla.hh"
27#include "BKE_screen.hh"
28
29#include "WM_api.hh"
30#include "WM_types.hh"
31
32#include "RNA_access.hh"
33#include "RNA_prototypes.hh"
34
35#include "ANIM_action.hh"
36#include "ANIM_action_legacy.hh"
37
38#include "ED_anim_api.hh"
39
40#include "UI_interface.hh"
41#include "UI_interface_c.hh"
42#include "UI_resources.hh"
43
44#include "nla_intern.hh" /* own include */
45
46using namespace blender;
47
48/* ******************* nla editor space & buttons ************** */
49
50/* -------------- */
51
52static void do_nla_region_buttons(bContext *C, void * /*arg*/, int /*event*/)
53{
54 // Scene *scene = CTX_data_scene(C);
55#if 0
56 switch (event) {
57 /* pass */
58 }
59#endif
60 /* default for now */
63}
64
66 PointerRNA *adt_ptr,
67 PointerRNA *nlt_ptr,
68 PointerRNA *strip_ptr)
69{
70 bAnimContext ac;
71 ListBase anim_data = {nullptr, nullptr};
72 short found = 0; /* not bool, since we need to indicate "found but not ideal" status */
73
74 /* For now, only draw if we could init the anim-context info
75 * (necessary for all animation-related tools)
76 * to work correctly is able to be correctly retrieved. There's no point showing empty panels? */
77 if (ANIM_animdata_get_context(C, &ac) == 0) {
78 return false;
79 }
80
81 /* extract list of active channel(s), of which we should only take the first one
82 * - we need the channels flag to get the active AnimData block when there are no NLA Tracks
83 */
84 /* XXX: double-check active! */
88 ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, eAnimCont_Types(ac.datatype));
89
90 LISTBASE_FOREACH (bAnimListElem *, ale, &anim_data) {
91 switch (ale->type) {
92 case ANIMTYPE_NLATRACK: /* NLA Track - The primary data type which should get caught */
93 {
94 NlaTrack *nlt = static_cast<NlaTrack *>(ale->data);
95 AnimData *adt = ale->adt;
96
97 /* found it, now set the pointers */
98 if (adt_ptr) {
99 /* AnimData pointer */
100 *adt_ptr = RNA_pointer_create(ale->id, &RNA_AnimData, adt);
101 }
102 if (nlt_ptr) {
103 /* NLA-Track pointer */
104 *nlt_ptr = RNA_pointer_create(ale->id, &RNA_NlaTrack, nlt);
105 }
106 if (strip_ptr) {
107 /* NLA-Strip pointer */
109 *strip_ptr = RNA_pointer_create(ale->id, &RNA_NlaStrip, strip);
110 }
111
112 found = 1;
113 break;
114 }
115 case ANIMTYPE_SCENE: /* Top-Level Widgets doubling up as datablocks */
116 case ANIMTYPE_OBJECT:
117 case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
118 case ANIMTYPE_DSLAM:
119 case ANIMTYPE_DSCAM:
121 case ANIMTYPE_DSCUR:
122 case ANIMTYPE_DSSKEY:
123 case ANIMTYPE_DSWOR:
124 case ANIMTYPE_DSNTREE:
125 case ANIMTYPE_DSPART:
126 case ANIMTYPE_DSMBALL:
127 case ANIMTYPE_DSARM:
128 case ANIMTYPE_DSMESH:
129 case ANIMTYPE_DSTEX:
130 case ANIMTYPE_DSLAT:
132 case ANIMTYPE_DSSPK:
134 case ANIMTYPE_PALETTE:
135 case ANIMTYPE_DSHAIR:
137 case ANIMTYPE_DSVOLUME: {
138 /* for these channels, we only do AnimData */
139 if (ale->adt && adt_ptr) {
140 ID *id;
141
142 if ((ale->data == nullptr) || (ale->type == ANIMTYPE_OBJECT)) {
143 /* ale->data is not an ID block! */
144 id = ale->id;
145 }
146 else {
147 /* ale->data is always the proper ID block we need,
148 * but ale->id may not be (i.e. for textures) */
149 id = static_cast<ID *>(ale->data);
150 }
151
152 /* AnimData pointer */
153 if (adt_ptr) {
154 *adt_ptr = RNA_pointer_create(id, &RNA_AnimData, ale->adt);
155 }
156
157 /* set found status to -1, since setting to 1 would break the loop
158 * and potentially skip an active NLA-Track in some cases...
159 */
160 found = -1;
161 }
162 break;
163 }
164 /* Don't set a pointer for NLA Actions.
165 * This will break the dependency graph for the context menu.
166 */
168 break;
169
170 case ANIMTYPE_NONE:
173 case ANIMTYPE_SUMMARY:
174 case ANIMTYPE_GROUP:
175 case ANIMTYPE_FCURVE:
182 case ANIMTYPE_DSMCLIP:
185 case ANIMTYPE_GPLAYER:
192 break;
193 }
194
195 if (found > 0) {
196 break;
197 }
198 }
199
200 /* free temp data */
201 ANIM_animdata_freelist(&anim_data);
202
203 return (found != 0);
204}
205
207{
208 return nla_panel_context(C, nullptr, r_ptr, nullptr);
209}
210
212{
213 return nla_panel_context(C, nullptr, nullptr, r_ptr);
214}
215
217{
218 PointerRNA track_ptr;
219 if (!ANIM_nla_context_track_ptr(C, &track_ptr)) {
220 return nullptr;
221 }
222 return static_cast<NlaTrack *>(track_ptr.data);
223}
224
226{
227 PointerRNA strip_ptr;
228 if (!ANIM_nla_context_strip_ptr(C, &strip_ptr)) {
229 return nullptr;
230 }
231 return static_cast<NlaStrip *>(strip_ptr.data);
232}
233
234#if 0
235static bool nla_panel_poll(const bContext *C, PanelType *pt)
236{
237 return nla_panel_context(C, nullptr, nullptr);
238}
239#endif
240
241static bool nla_animdata_panel_poll(const bContext *C, PanelType * /*pt*/)
242{
244 PointerRNA strip_ptr;
245 return (nla_panel_context(C, &ptr, nullptr, &strip_ptr) && (ptr.data != nullptr) &&
246 (ptr.owner_id != strip_ptr.owner_id));
247}
248
249static bool nla_strip_panel_poll(const bContext *C, PanelType * /*pt*/)
250{
252 return (nla_panel_context(C, nullptr, nullptr, &ptr) && (ptr.data != nullptr));
253}
254
255static bool nla_strip_actclip_panel_poll(const bContext *C, PanelType * /*pt*/)
256{
258
259 if (!nla_panel_context(C, nullptr, nullptr, &ptr)) {
260 return false;
261 }
262 if (ptr.data == nullptr) {
263 return false;
264 }
265
266 NlaStrip *strip = static_cast<NlaStrip *>(ptr.data);
267 return eNlaStrip_Type(strip->type) == NLASTRIP_TYPE_CLIP;
268}
269
270static bool nla_strip_eval_panel_poll(const bContext *C, PanelType * /*pt*/)
271{
273
274 if (!nla_panel_context(C, nullptr, nullptr, &ptr)) {
275 return false;
276 }
277 if (ptr.data == nullptr) {
278 return false;
279 }
280
281 NlaStrip *strip = static_cast<NlaStrip *>(ptr.data);
282
283 if (strip->type == NLASTRIP_TYPE_SOUND) {
284 return false;
285 }
286
287 return true;
288}
289
290/* -------------- */
291
292/* active AnimData */
293static void nla_panel_animdata(const bContext *C, Panel *panel)
294{
295 PointerRNA adt_ptr;
296 PointerRNA strip_ptr;
297 // AnimData *adt;
298 uiLayout *layout = panel->layout;
299 uiLayout *row;
300 uiBlock *block;
301
302 /* check context and also validity of pointer */
303 if (!nla_panel_context(C, &adt_ptr, nullptr, &strip_ptr)) {
304 return;
305 }
306
307 if (adt_ptr.owner_id == strip_ptr.owner_id) {
308 return;
309 }
310
311 // adt = adt_ptr.data;
312
313 block = uiLayoutGetBlock(layout);
315 uiLayoutSetPropSep(layout, true);
316 uiLayoutSetPropDecorate(layout, false);
317
318 /* AnimData Source Properties ----------------------------------- */
319
320 /* icon + id-block name of block where AnimData came from to prevent
321 * accidentally changing the properties of the wrong action
322 */
323 if (adt_ptr.owner_id) {
324 ID *id = adt_ptr.owner_id;
326
327 /* ID-block name > AnimData */
328 row = uiLayoutRow(layout, true);
330
331 uiItemL(row, id->name + 2, RNA_struct_ui_icon(id_ptr.type)); /* id-block (src) */
332 uiItemL(row, "", ICON_RIGHTARROW); /* expander */
333 uiItemL(row, IFACE_("Animation Data"), ICON_ANIM_DATA); /* animdata */
334
335 uiItemS(layout);
336 }
337
338 /* Active Action Properties ------------------------------------- */
339 /* action */
340 row = uiLayoutRow(layout, true);
341 uiTemplateID(row, C, &adt_ptr, "action", "ACTION_OT_new", nullptr, "NLA_OT_action_unlink");
342
343 /* extrapolation */
344 row = uiLayoutRow(layout, true);
345 uiItemR(row, &adt_ptr, "action_extrapolation", UI_ITEM_NONE, IFACE_("Extrapolation"), ICON_NONE);
346
347 /* blending */
348 row = uiLayoutRow(layout, true);
349 uiItemR(row, &adt_ptr, "action_blend_type", UI_ITEM_NONE, IFACE_("Blending"), ICON_NONE);
350
351 /* influence */
352 row = uiLayoutRow(layout, true);
353 uiItemR(row, &adt_ptr, "action_influence", UI_ITEM_NONE, IFACE_("Influence"), ICON_NONE);
354}
355
356/* generic settings for active NLA-Strip */
357static void nla_panel_stripname(const bContext *C, Panel *panel)
358{
359 PointerRNA strip_ptr;
360 uiLayout *layout = panel->layout;
361 uiLayout *row;
362 uiBlock *block;
363
364 if (!nla_panel_context(C, nullptr, nullptr, &strip_ptr)) {
365 return;
366 }
367
368 block = uiLayoutGetBlock(layout);
370
371 /* Strip Properties ------------------------------------- */
372 /* strip type */
373 row = uiLayoutRow(layout, false);
374 if (RNA_enum_get(&strip_ptr, "type") == NLASTRIP_TYPE_CLIP) {
375 uiItemL(row, "", ICON_ANIM);
376 }
377 else if (RNA_enum_get(&strip_ptr, "type") == NLASTRIP_TYPE_TRANSITION) {
378 uiItemL(row, "", ICON_ARROW_LEFTRIGHT);
379 }
380 else if (RNA_enum_get(&strip_ptr, "type") == NLASTRIP_TYPE_META) {
381 uiItemL(row, "", ICON_SEQ_STRIP_META);
382 }
383 else if (RNA_enum_get(&strip_ptr, "type") == NLASTRIP_TYPE_SOUND) {
384 uiItemL(row, "", ICON_SOUND);
385 }
386
387 uiItemR(row, &strip_ptr, "name", UI_ITEM_NONE, "", ICON_NLA);
388
390 uiItemR(row, &strip_ptr, "mute", UI_ITEM_NONE, "", ICON_NONE);
392}
393
394/* generic settings for active NLA-Strip */
395static void nla_panel_properties(const bContext *C, Panel *panel)
396{
397 PointerRNA strip_ptr;
398 uiLayout *layout = panel->layout;
399 uiLayout *column, *row;
400 uiBlock *block;
401 short showEvalProps = 1;
402
403 if (!nla_panel_context(C, nullptr, nullptr, &strip_ptr)) {
404 return;
405 }
406
407 block = uiLayoutGetBlock(layout);
409
410 /* Strip Properties ------------------------------------- */
411 /* strip type */
412
413 uiLayoutSetPropSep(layout, true);
414 uiLayoutSetPropDecorate(layout, false);
415
416 /* strip extents */
417 column = uiLayoutColumn(layout, true);
418 uiItemR(column, &strip_ptr, "frame_start_ui", UI_ITEM_NONE, IFACE_("Frame Start"), ICON_NONE);
419 uiItemR(column, &strip_ptr, "frame_end_ui", UI_ITEM_NONE, IFACE_("End"), ICON_NONE);
420
421 /* Evaluation-Related Strip Properties ------------------ */
422
423 /* sound properties strips don't have these settings */
424 if (RNA_enum_get(&strip_ptr, "type") == NLASTRIP_TYPE_SOUND) {
425 showEvalProps = 0;
426 }
427
428 /* only show if allowed to... */
429 if (showEvalProps) {
430 /* extrapolation */
431 column = uiLayoutColumn(layout, false);
432 uiItemR(column, &strip_ptr, "extrapolation", UI_ITEM_NONE, nullptr, ICON_NONE);
433 uiItemR(column, &strip_ptr, "blend_type", UI_ITEM_NONE, nullptr, ICON_NONE);
434
435 /* Blend in/out + auto-blending:
436 * - blend in/out can only be set when auto-blending is off.
437 */
438
439 uiItemS(layout);
440
441 column = uiLayoutColumn(layout, true);
442 uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_auto_blend") == false);
443 uiItemR(column, &strip_ptr, "blend_in", UI_ITEM_NONE, IFACE_("Blend In"), ICON_NONE);
444 uiItemR(column, &strip_ptr, "blend_out", UI_ITEM_NONE, IFACE_("Out"), ICON_NONE);
445
446 row = uiLayoutRow(column, true);
447 uiLayoutSetActive(row, RNA_boolean_get(&strip_ptr, "use_animated_influence") == false);
448 uiItemR(
449 row, &strip_ptr, "use_auto_blend", UI_ITEM_NONE, nullptr, ICON_NONE); /* XXX as toggle? */
450
451 /* settings */
452 column = uiLayoutColumnWithHeading(layout, true, IFACE_("Playback"));
453 row = uiLayoutRow(column, true);
455 !(RNA_boolean_get(&strip_ptr, "use_animated_influence") ||
456 RNA_boolean_get(&strip_ptr, "use_animated_time")));
457 uiItemR(row, &strip_ptr, "use_reverse", UI_ITEM_NONE, nullptr, ICON_NONE);
458
459 uiItemR(column, &strip_ptr, "use_animated_time_cyclic", UI_ITEM_NONE, nullptr, ICON_NONE);
460 }
461}
462
463/* action-clip only settings for active NLA-Strip */
464static void nla_panel_actclip(const bContext *C, Panel *panel)
465{
466 PointerRNA strip_ptr;
467 uiLayout *layout = panel->layout;
468 uiLayout *column, *row;
469 uiBlock *block;
470
471 /* check context and also validity of pointer */
472 if (!nla_panel_context(C, nullptr, nullptr, &strip_ptr)) {
473 return;
474 }
475
476 block = uiLayoutGetBlock(layout);
478 uiLayoutSetPropSep(layout, true);
479 uiLayoutSetPropDecorate(layout, true);
480
481 /* Strip Properties ------------------------------------- */
482 /* action pointer */
483 column = uiLayoutColumn(layout, true);
484 uiItemR(column, &strip_ptr, "action", UI_ITEM_NONE, nullptr, ICON_ACTION);
485
486#ifdef WITH_ANIM_BAKLAVA
487 NlaStrip *strip = static_cast<NlaStrip *>(strip_ptr.data);
488 if (strip->act) {
489 BLI_assert(strip_ptr.owner_id);
490
491 animrig::Action &action = strip->act->wrap();
492 ID &animated_id = *strip_ptr.owner_id;
494 PointerRNA animated_id_ptr = RNA_id_pointer_create(&animated_id);
495 uiLayoutSetContextPointer(column, "animated_id", &animated_id_ptr);
496 uiLayoutSetContextPointer(column, "nla_strip", &strip_ptr);
497 uiTemplateSearch(column,
498 C,
499 &strip_ptr,
500 "action_slot",
501 &strip_ptr,
502 "action_slots",
503 nullptr,
504 "anim.slot_unassign_from_nla_strip",
505 "Slot");
506 }
507 }
508#endif
509
510 /* action extents */
511 column = uiLayoutColumn(layout, true);
512 uiItemR(
513 column, &strip_ptr, "action_frame_start", UI_ITEM_NONE, IFACE_("Frame Start"), ICON_NONE);
514 uiItemR(column, &strip_ptr, "action_frame_end", UI_ITEM_NONE, IFACE_("End"), ICON_NONE);
515
516 row = uiLayoutRowWithHeading(layout, false, IFACE_("Sync Length"));
517 uiItemR(row, &strip_ptr, "use_sync_length", UI_ITEM_NONE, "", ICON_NONE);
518 uiItemO(row, IFACE_("Now"), ICON_FILE_REFRESH, "NLA_OT_action_sync_length");
519
520 /* action usage */
521 column = uiLayoutColumn(layout, true);
522 uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_time") == false);
523 uiItemR(column, &strip_ptr, "scale", UI_ITEM_NONE, IFACE_("Playback Scale"), ICON_NONE);
524 uiItemR(column, &strip_ptr, "repeat", UI_ITEM_NONE, nullptr, ICON_NONE);
525}
526
527/* evaluation settings for active NLA-Strip */
529{
530 PointerRNA strip_ptr;
531 uiLayout *layout = panel->layout;
532 uiLayout *col;
533 uiBlock *block;
534
535 /* check context and also validity of pointer */
536 if (!nla_panel_context(C, nullptr, nullptr, &strip_ptr)) {
537 return;
538 }
539
540 block = uiLayoutGetBlock(layout);
542
543 col = uiLayoutColumn(layout, true);
544 uiItemR(col, &strip_ptr, "use_animated_influence", UI_ITEM_NONE, "", ICON_NONE);
545}
546
547/* evaluation settings for active NLA-Strip */
548static void nla_panel_evaluation(const bContext *C, Panel *panel)
549{
550 PointerRNA strip_ptr;
551 uiLayout *layout = panel->layout;
552 uiBlock *block;
553
554 /* check context and also validity of pointer */
555 if (!nla_panel_context(C, nullptr, nullptr, &strip_ptr)) {
556 return;
557 }
558
559 block = uiLayoutGetBlock(layout);
561 uiLayoutSetPropSep(layout, true);
562
563 uiLayoutSetEnabled(layout, RNA_boolean_get(&strip_ptr, "use_animated_influence"));
564 uiItemR(layout, &strip_ptr, "influence", UI_ITEM_NONE, nullptr, ICON_NONE);
565}
566
568{
569 PointerRNA strip_ptr;
570 uiLayout *layout = panel->layout;
571 uiLayout *col;
572 uiBlock *block;
573
574 /* check context and also validity of pointer */
575 if (!nla_panel_context(C, nullptr, nullptr, &strip_ptr)) {
576 return;
577 }
578
579 block = uiLayoutGetBlock(layout);
581
582 col = uiLayoutColumn(layout, true);
583 uiItemR(col, &strip_ptr, "use_animated_time", UI_ITEM_NONE, "", ICON_NONE);
584}
585
586static void nla_panel_animated_strip_time(const bContext *C, Panel *panel)
587{
588 PointerRNA strip_ptr;
589 uiLayout *layout = panel->layout;
590 uiBlock *block;
591
592 /* check context and also validity of pointer */
593 if (!nla_panel_context(C, nullptr, nullptr, &strip_ptr)) {
594 return;
595 }
596
597 block = uiLayoutGetBlock(layout);
599 uiLayoutSetPropSep(layout, true);
600
601 uiLayoutSetEnabled(layout, RNA_boolean_get(&strip_ptr, "use_animated_time"));
602 uiItemR(layout, &strip_ptr, "strip_time", UI_ITEM_NONE, nullptr, ICON_NONE);
603}
604
605#define NLA_FMODIFIER_PANEL_PREFIX "NLA"
606
607static void nla_fmodifier_panel_id(void *fcm_link, char *r_name)
608{
609 FModifier *fcm = static_cast<FModifier *>(fcm_link);
611 const FModifierTypeInfo *fmi = get_fmodifier_typeinfo(type);
613}
614
615/* F-Modifiers for active NLA-Strip */
616static void nla_panel_modifiers(const bContext *C, Panel *panel)
617{
618 PointerRNA strip_ptr;
619 uiLayout *row;
620 uiBlock *block;
621
622 /* check context and also validity of pointer */
623 if (!nla_panel_context(C, nullptr, nullptr, &strip_ptr)) {
624 return;
625 }
626 NlaStrip *strip = static_cast<NlaStrip *>(strip_ptr.data);
627
628 block = uiLayoutGetBlock(panel->layout);
630
631 /* 'add modifier' button at top of panel */
632 {
633 row = uiLayoutRow(panel->layout, false);
634 block = uiLayoutGetBlock(row);
635
636 /* FIXME: we need to set the only-active property so that this
637 * will only add modifiers for the active strip (not all selected). */
638 uiItemMenuEnumO(row, C, "NLA_OT_fmodifier_add", "type", IFACE_("Add Modifier"), ICON_NONE);
639
640 /* copy/paste (as sub-row) */
641 row = uiLayoutRow(row, true);
642 uiItemO(row, "", ICON_COPYDOWN, "NLA_OT_fmodifier_copy");
643 uiItemO(row, "", ICON_PASTEDOWN, "NLA_OT_fmodifier_paste");
644 }
645
647}
648
649/* ******************* general ******************************** */
650
652{
653 PanelType *pt;
654
655 pt = MEM_cnew<PanelType>("spacetype nla panel animdata");
656 STRNCPY(pt->idname, "NLA_PT_animdata");
657 STRNCPY(pt->label, N_("Animation Data"));
658 STRNCPY(pt->category, "Edited Action");
663 BLI_addtail(&art->paneltypes, pt);
664
665 pt = MEM_cnew<PanelType>("spacetype nla panel properties");
666 STRNCPY(pt->idname, "NLA_PT_stripname");
667 STRNCPY(pt->label, N_("Active Strip Name"));
668 STRNCPY(pt->category, "Strip");
673 BLI_addtail(&art->paneltypes, pt);
674
675 PanelType *pt_properties = pt = MEM_cnew<PanelType>("spacetype nla panel properties");
676 STRNCPY(pt->idname, "NLA_PT_properties");
677 STRNCPY(pt->label, N_("Active Strip"));
678 STRNCPY(pt->category, "Strip");
682 BLI_addtail(&art->paneltypes, pt);
683
684 pt = MEM_cnew<PanelType>("spacetype nla panel properties");
685 STRNCPY(pt->idname, "NLA_PT_actionclip");
686 STRNCPY(pt->label, N_("Action Clip"));
687 STRNCPY(pt->category, "Strip");
692 BLI_addtail(&art->paneltypes, pt);
693
694 pt = MEM_cnew<PanelType>("spacetype nla panel evaluation");
695 STRNCPY(pt->idname, "NLA_PT_evaluation");
696 STRNCPY(pt->parent_id, "NLA_PT_properties");
697 STRNCPY(pt->label, N_("Animated Influence"));
698 STRNCPY(pt->category, "Strip");
702 pt->parent = pt_properties;
705 BLI_addtail(&pt_properties->children, BLI_genericNodeN(pt));
706 BLI_addtail(&art->paneltypes, pt);
707
708 pt = MEM_cnew<PanelType>("spacetype nla panel animated strip time");
709 STRNCPY(pt->idname, "NLA_PT_animated_strip_time");
710 STRNCPY(pt->parent_id, "NLA_PT_properties");
711 STRNCPY(pt->label, N_("Animated Strip Time"));
712 STRNCPY(pt->category, "Strip");
716 pt->parent = pt_properties;
719 BLI_addtail(&pt_properties->children, BLI_genericNodeN(pt));
720 BLI_addtail(&art->paneltypes, pt);
721
722 pt = MEM_cnew<PanelType>("spacetype nla panel modifiers");
723 STRNCPY(pt->idname, "NLA_PT_modifiers");
724 STRNCPY(pt->label, N_("Modifiers"));
725 STRNCPY(pt->category, "Modifiers");
730 BLI_addtail(&art->paneltypes, pt);
731
734}
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:66
@ PANEL_TYPE_NO_HEADER
@ PANEL_TYPE_DEFAULT_CLOSED
#define BLI_assert(a)
Definition BLI_assert.h:50
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:110
struct LinkData * BLI_genericNodeN(void *data)
Definition listbase.cc:909
#define STRNCPY(dst, src)
Definition BLI_string.h:593
size_t BLI_snprintf(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
#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_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_GPDATABLOCK
@ 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.
void uiLayoutSetActive(uiLayout *layout, bool active)
void uiTemplateSearch(uiLayout *layout, const bContext *C, PointerRNA *ptr, const char *propname, PointerRNA *searchptr, const char *searchpropname, const char *newop, const char *unlinkop, const char *text=nullptr)
@ UI_EMBOSS
@ UI_EMBOSS_NONE_OR_STATUS
void uiLayoutSetEnabled(uiLayout *layout, bool enabled)
@ UI_LAYOUT_ALIGN_LEFT
void uiItemMenuEnumO(uiLayout *layout, const bContext *C, const char *opname, const char *propname, const char *name, int icon)
void uiItemL(uiLayout *layout, const char *name, int icon)
uiBlock * uiLayoutGetBlock(uiLayout *layout)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
void uiLayoutSetAlignment(uiLayout *layout, char alignment)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
void UI_block_func_handle_set(uiBlock *block, uiBlockHandleFunc func, void *arg)
void uiItemS(uiLayout *layout)
uiLayout * uiLayoutRowWithHeading(uiLayout *layout, bool align, const char *heading)
#define UI_ITEM_NONE
void UI_block_emboss_set(uiBlock *block, eUIEmbossType emboss)
void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname)
uiLayout * uiLayoutColumnWithHeading(uiLayout *layout, bool align, const char *heading)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
void uiTemplateID(uiLayout *layout, const bContext *C, PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop, int filter=UI_TEMPLATE_ID_FILTER_ALL, bool live_icon=false, const char *text=nullptr)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, eUI_Item_Flag flag, const char *name, int icon)
void uiLayoutSetContextPointer(uiLayout *layout, const char *name, PointerRNA *ptr)
#define NC_SCENE
Definition WM_types.hh:345
#define ND_TRANSFORM
Definition WM_types.hh:423
#define NC_OBJECT
Definition WM_types.hh:346
void ANIM_animdata_freelist(ListBase *anim_data)
Definition anim_deps.cc:457
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
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(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:413
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:40
StructRNA * type
Definition RNA_types.hh:41
void * data
Definition RNA_types.hh:42
eAnimCont_Types datatype
#define N_(msgid)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
PointerRNA * ptr
Definition wm_files.cc:4126