Blender  V2.93
nla_buttons.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2009 Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #include <float.h>
25 #include <math.h>
26 #include <stdio.h>
27 #include <string.h>
28 
29 #include "DNA_anim_types.h"
30 
31 #include "BLI_utildefines.h"
32 
33 #include "MEM_guardedalloc.h"
34 
35 #include "BLI_blenlib.h"
36 
37 #include "BLT_translation.h"
38 
39 #include "BKE_context.h"
40 #include "BKE_fcurve.h"
41 #include "BKE_nla.h"
42 #include "BKE_screen.h"
43 
44 #include "WM_api.h"
45 #include "WM_types.h"
46 
47 #include "RNA_access.h"
48 
49 #include "ED_anim_api.h"
50 #include "ED_screen.h"
51 
52 #include "UI_interface.h"
53 #include "UI_resources.h"
54 
55 #include "nla_intern.h" /* own include */
56 
57 /* ******************* nla editor space & buttons ************** */
58 
59 /* -------------- */
60 
61 static void do_nla_region_buttons(bContext *C, void *UNUSED(arg), int UNUSED(event))
62 {
63  // Scene *scene = CTX_data_scene(C);
64 #if 0
65  switch (event) {
66  /* pass */
67  }
68 #endif
69  /* default for now */
72 }
73 
75  PointerRNA *adt_ptr,
76  PointerRNA *nlt_ptr,
77  PointerRNA *strip_ptr)
78 {
79  bAnimContext ac;
80  bAnimListElem *ale = NULL;
81  ListBase anim_data = {NULL, NULL};
82  short found = 0; /* not bool, since we need to indicate "found but not ideal" status */
83  int filter;
84 
85  /* For now, only draw if we could init the anim-context info
86  * (necessary for all animation-related tools)
87  * to work correctly is able to be correctly retrieved. There's no point showing empty panels? */
88  if (ANIM_animdata_get_context(C, &ac) == 0) {
89  return false;
90  }
91 
92  /* extract list of active channel(s), of which we should only take the first one
93  * - we need the channels flag to get the active AnimData block when there are no NLA Tracks
94  */
95  /* XXX: double-check active! */
98  ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
99 
100  for (ale = anim_data.first; ale; ale = ale->next) {
101  switch (ale->type) {
102  case ANIMTYPE_NLATRACK: /* NLA Track - The primary data type which should get caught */
103  {
104  NlaTrack *nlt = (NlaTrack *)ale->data;
105  AnimData *adt = ale->adt;
106 
107  /* found it, now set the pointers */
108  if (adt_ptr) {
109  /* AnimData pointer */
110  RNA_pointer_create(ale->id, &RNA_AnimData, adt, adt_ptr);
111  }
112  if (nlt_ptr) {
113  /* NLA-Track pointer */
114  RNA_pointer_create(ale->id, &RNA_NlaTrack, nlt, nlt_ptr);
115  }
116  if (strip_ptr) {
117  /* NLA-Strip pointer */
118  NlaStrip *strip = BKE_nlastrip_find_active(nlt);
119  RNA_pointer_create(ale->id, &RNA_NlaStrip, strip, strip_ptr);
120  }
121 
122  found = 1;
123  break;
124  }
125  case ANIMTYPE_SCENE: /* Top-Level Widgets doubling up as datablocks */
126  case ANIMTYPE_OBJECT:
127  case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
128  case ANIMTYPE_DSLAM:
129  case ANIMTYPE_DSCAM:
131  case ANIMTYPE_DSCUR:
132  case ANIMTYPE_DSSKEY:
133  case ANIMTYPE_DSWOR:
134  case ANIMTYPE_DSNTREE:
135  case ANIMTYPE_DSPART:
136  case ANIMTYPE_DSMBALL:
137  case ANIMTYPE_DSARM:
138  case ANIMTYPE_DSMESH:
139  case ANIMTYPE_DSTEX:
140  case ANIMTYPE_DSLAT:
142  case ANIMTYPE_DSSPK:
143  case ANIMTYPE_DSGPENCIL:
144  case ANIMTYPE_PALETTE:
145  case ANIMTYPE_DSHAIR:
147  case ANIMTYPE_DSVOLUME:
148  case ANIMTYPE_DSSIMULATION: {
149  /* for these channels, we only do AnimData */
150  if (ale->adt && adt_ptr) {
151  ID *id;
152 
153  if ((ale->data == NULL) || (ale->type == ANIMTYPE_OBJECT)) {
154  /* ale->data is not an ID block! */
155  id = ale->id;
156  }
157  else {
158  /* ale->data is always the proper ID block we need,
159  * but ale->id may not be (i.e. for textures) */
160  id = (ID *)ale->data;
161  }
162 
163  /* AnimData pointer */
164  if (adt_ptr) {
165  RNA_pointer_create(id, &RNA_AnimData, ale->adt, adt_ptr);
166  }
167 
168  /* set found status to -1, since setting to 1 would break the loop
169  * and potentially skip an active NLA-Track in some cases...
170  */
171  found = -1;
172  }
173  break;
174  }
175  }
176 
177  if (found > 0) {
178  break;
179  }
180  }
181 
182  /* free temp data */
183  ANIM_animdata_freelist(&anim_data);
184 
185  return (found != 0);
186 }
187 
189 {
190  PointerRNA strip_ptr;
191  if (!nla_panel_context(C, NULL, NULL, &strip_ptr)) {
192  return NULL;
193  }
194  NlaStrip *strip = strip_ptr.data;
195 
196  return strip;
197 }
198 
199 #if 0
200 static bool nla_panel_poll(const bContext *C, PanelType *pt)
201 {
202  return nla_panel_context(C, NULL, NULL);
203 }
204 #endif
205 
207 {
208  PointerRNA ptr;
209  return (nla_panel_context(C, &ptr, NULL, NULL) && (ptr.data != NULL));
210 }
211 
212 static bool nla_strip_panel_poll(const bContext *C, PanelType *UNUSED(pt))
213 {
214  PointerRNA ptr;
215  return (nla_panel_context(C, NULL, NULL, &ptr) && (ptr.data != NULL));
216 }
217 
219 {
220  PointerRNA ptr;
221  NlaStrip *strip;
222 
223  if (!nla_panel_context(C, NULL, NULL, &ptr)) {
224  return 0;
225  }
226  if (ptr.data == NULL) {
227  return 0;
228  }
229 
230  strip = ptr.data;
231  return (strip->type == NLASTRIP_TYPE_CLIP);
232 }
233 
235 {
236  PointerRNA ptr;
237  NlaStrip *strip;
238 
239  if (!nla_panel_context(C, NULL, NULL, &ptr)) {
240  return 0;
241  }
242  if (ptr.data == NULL) {
243  return 0;
244  }
245 
246  strip = ptr.data;
247 
248  if (strip->type == NLASTRIP_TYPE_SOUND) {
249  return 0;
250  }
251 
252  return 1;
253 }
254 
255 /* -------------- */
256 
257 /* active AnimData */
258 static void nla_panel_animdata(const bContext *C, Panel *panel)
259 {
260  PointerRNA adt_ptr;
261  /* AnimData *adt; */
262  uiLayout *layout = panel->layout;
263  uiLayout *row;
264  uiBlock *block;
265 
266  /* check context and also validity of pointer */
267  if (!nla_panel_context(C, &adt_ptr, NULL, NULL)) {
268  return;
269  }
270 
271  /* adt = adt_ptr.data; */
272 
273  block = uiLayoutGetBlock(layout);
275  uiLayoutSetPropSep(layout, true);
276  uiLayoutSetPropDecorate(layout, false);
277 
278  /* AnimData Source Properties ----------------------------------- */
279 
280  /* icon + id-block name of block where AnimData came from to prevent
281  * accidentally changing the properties of the wrong action
282  */
283  if (adt_ptr.owner_id) {
284  ID *id = adt_ptr.owner_id;
285  PointerRNA id_ptr;
286 
287  RNA_id_pointer_create(id, &id_ptr);
288 
289  /* ID-block name > AnimData */
290  row = uiLayoutRow(layout, true);
292 
293  uiItemL(row, id->name + 2, RNA_struct_ui_icon(id_ptr.type)); /* id-block (src) */
294  uiItemL(row, "", ICON_SMALL_TRI_RIGHT_VEC); /* expander */
295  uiItemL(row, IFACE_("Animation Data"), ICON_ANIM_DATA); /* animdata */
296 
297  uiItemS(layout);
298  }
299 
300  /* Active Action Properties ------------------------------------- */
301  /* action */
302  row = uiLayoutRow(layout, true);
303  uiTemplateID(row,
304  (bContext *)C,
305  &adt_ptr,
306  "action",
307  "ACTION_OT_new",
308  NULL,
309  "NLA_OT_action_unlink",
311  false,
312  NULL);
313 
314  /* extrapolation */
315  row = uiLayoutRow(layout, true);
316  uiItemR(row, &adt_ptr, "action_extrapolation", 0, IFACE_("Extrapolation"), ICON_NONE);
317 
318  /* blending */
319  row = uiLayoutRow(layout, true);
320  uiItemR(row, &adt_ptr, "action_blend_type", 0, IFACE_("Blending"), ICON_NONE);
321 
322  /* influence */
323  row = uiLayoutRow(layout, true);
324  uiItemR(row, &adt_ptr, "action_influence", 0, IFACE_("Influence"), ICON_NONE);
325 }
326 
327 /* generic settings for active NLA-Strip */
328 static void nla_panel_stripname(const bContext *C, Panel *panel)
329 {
330  PointerRNA strip_ptr;
331  uiLayout *layout = panel->layout;
332  uiLayout *row;
333  uiBlock *block;
334 
335  if (!nla_panel_context(C, NULL, NULL, &strip_ptr)) {
336  return;
337  }
338 
339  block = uiLayoutGetBlock(layout);
341 
342  /* Strip Properties ------------------------------------- */
343  /* strip type */
344  row = uiLayoutRow(layout, false);
345  if (RNA_enum_get(&strip_ptr, "type") == NLASTRIP_TYPE_CLIP) {
346  uiItemL(row, "", ICON_ANIM);
347  }
348  else if (RNA_enum_get(&strip_ptr, "type") == NLASTRIP_TYPE_TRANSITION) {
349  uiItemL(row, "", ICON_ARROW_LEFTRIGHT);
350  }
351  else if (RNA_enum_get(&strip_ptr, "type") == NLASTRIP_TYPE_META) {
352  uiItemL(row, "", ICON_SEQ_STRIP_META);
353  }
354  else if (RNA_enum_get(&strip_ptr, "type") == NLASTRIP_TYPE_SOUND) {
355  uiItemL(row, "", ICON_SOUND);
356  }
357 
358  uiItemR(row, &strip_ptr, "name", 0, "", ICON_NLA);
359 
361  uiItemR(row, &strip_ptr, "mute", 0, "", ICON_NONE);
363 }
364 
365 /* generic settings for active NLA-Strip */
366 static void nla_panel_properties(const bContext *C, Panel *panel)
367 {
368  PointerRNA strip_ptr;
369  uiLayout *layout = panel->layout;
370  uiLayout *column, *row;
371  uiBlock *block;
372  short showEvalProps = 1;
373 
374  if (!nla_panel_context(C, NULL, NULL, &strip_ptr)) {
375  return;
376  }
377 
378  block = uiLayoutGetBlock(layout);
380 
381  /* Strip Properties ------------------------------------- */
382  /* strip type */
383 
384  uiLayoutSetPropSep(layout, true);
385  uiLayoutSetPropDecorate(layout, false);
386 
387  /* strip extents */
388  column = uiLayoutColumn(layout, true);
389  uiItemR(column, &strip_ptr, "frame_start", 0, IFACE_("Frame Start"), ICON_NONE);
390  uiItemR(column, &strip_ptr, "frame_end", 0, IFACE_("End"), ICON_NONE);
391 
392  /* Evaluation-Related Strip Properties ------------------ */
393 
394  /* sound properties strips don't have these settings */
395  if (RNA_enum_get(&strip_ptr, "type") == NLASTRIP_TYPE_SOUND) {
396  showEvalProps = 0;
397  }
398 
399  /* only show if allowed to... */
400  if (showEvalProps) {
401  /* extrapolation */
402  column = uiLayoutColumn(layout, false);
403  uiItemR(column, &strip_ptr, "extrapolation", 0, NULL, ICON_NONE);
404  uiItemR(column, &strip_ptr, "blend_type", 0, NULL, ICON_NONE);
405 
406  /* Blend in/out + auto-blending:
407  * - blend in/out can only be set when auto-blending is off.
408  */
409 
410  uiItemS(layout);
411 
412  column = uiLayoutColumn(layout, true);
413  uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_auto_blend") == false);
414  uiItemR(column, &strip_ptr, "blend_in", 0, IFACE_("Blend In"), ICON_NONE);
415  uiItemR(column, &strip_ptr, "blend_out", 0, IFACE_("Out"), ICON_NONE);
416 
417  row = uiLayoutRow(column, true);
418  uiLayoutSetActive(row, RNA_boolean_get(&strip_ptr, "use_animated_influence") == false);
419  uiItemR(row, &strip_ptr, "use_auto_blend", 0, NULL, ICON_NONE); /* XXX as toggle? */
420 
421  /* settings */
422  column = uiLayoutColumnWithHeading(layout, true, IFACE_("Playback"));
423  row = uiLayoutRow(column, true);
424  uiLayoutSetActive(row,
425  !(RNA_boolean_get(&strip_ptr, "use_animated_influence") ||
426  RNA_boolean_get(&strip_ptr, "use_animated_time")));
427  uiItemR(row, &strip_ptr, "use_reverse", 0, NULL, ICON_NONE);
428 
429  uiItemR(column, &strip_ptr, "use_animated_time_cyclic", 0, NULL, ICON_NONE);
430  }
431 }
432 
433 /* action-clip only settings for active NLA-Strip */
434 static void nla_panel_actclip(const bContext *C, Panel *panel)
435 {
436  PointerRNA strip_ptr;
437  uiLayout *layout = panel->layout;
438  uiLayout *column, *row;
439  uiBlock *block;
440 
441  /* check context and also validity of pointer */
442  if (!nla_panel_context(C, NULL, NULL, &strip_ptr)) {
443  return;
444  }
445 
446  block = uiLayoutGetBlock(layout);
448  uiLayoutSetPropSep(layout, true);
449  uiLayoutSetPropDecorate(layout, false);
450 
451  /* Strip Properties ------------------------------------- */
452  /* action pointer */
453  row = uiLayoutRow(layout, true);
454  uiItemR(row, &strip_ptr, "action", 0, NULL, ICON_ACTION);
455 
456  /* action extents */
457  column = uiLayoutColumn(layout, true);
458  uiItemR(column, &strip_ptr, "action_frame_start", 0, IFACE_("Frame Start"), ICON_NONE);
459  uiItemR(column, &strip_ptr, "action_frame_end", 0, IFACE_("End"), ICON_NONE);
460 
461  row = uiLayoutRowWithHeading(layout, false, IFACE_("Sync Length"));
462  uiItemR(row, &strip_ptr, "use_sync_length", 0, "", ICON_NONE);
463  uiItemO(row, IFACE_("Now"), ICON_FILE_REFRESH, "NLA_OT_action_sync_length");
464 
465  /* action usage */
466  column = uiLayoutColumn(layout, true);
467  uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_time") == false);
468  uiItemR(column, &strip_ptr, "scale", 0, IFACE_("Playback Scale"), ICON_NONE);
469  uiItemR(column, &strip_ptr, "repeat", 0, NULL, ICON_NONE);
470 }
471 
472 /* evaluation settings for active NLA-Strip */
474 {
475  PointerRNA strip_ptr;
476  uiLayout *layout = panel->layout;
477  uiLayout *col;
478  uiBlock *block;
479 
480  /* check context and also validity of pointer */
481  if (!nla_panel_context(C, NULL, NULL, &strip_ptr)) {
482  return;
483  }
484 
485  block = uiLayoutGetBlock(layout);
487 
488  col = uiLayoutColumn(layout, true);
489  uiItemR(col, &strip_ptr, "use_animated_influence", 0, "", ICON_NONE);
490 }
491 
492 /* evaluation settings for active NLA-Strip */
493 static void nla_panel_evaluation(const bContext *C, Panel *panel)
494 {
495  PointerRNA strip_ptr;
496  uiLayout *layout = panel->layout;
497  uiBlock *block;
498 
499  /* check context and also validity of pointer */
500  if (!nla_panel_context(C, NULL, NULL, &strip_ptr)) {
501  return;
502  }
503 
504  block = uiLayoutGetBlock(layout);
506  uiLayoutSetPropSep(layout, true);
507 
508  uiLayoutSetEnabled(layout, RNA_boolean_get(&strip_ptr, "use_animated_influence"));
509  uiItemR(layout, &strip_ptr, "influence", 0, NULL, ICON_NONE);
510 }
511 
513 {
514  PointerRNA strip_ptr;
515  uiLayout *layout = panel->layout;
516  uiLayout *col;
517  uiBlock *block;
518 
519  /* check context and also validity of pointer */
520  if (!nla_panel_context(C, NULL, NULL, &strip_ptr)) {
521  return;
522  }
523 
524  block = uiLayoutGetBlock(layout);
526 
527  col = uiLayoutColumn(layout, true);
528  uiItemR(col, &strip_ptr, "use_animated_time", 0, "", ICON_NONE);
529 }
530 
531 static void nla_panel_animated_strip_time(const bContext *C, Panel *panel)
532 {
533  PointerRNA strip_ptr;
534  uiLayout *layout = panel->layout;
535  uiBlock *block;
536 
537  /* check context and also validity of pointer */
538  if (!nla_panel_context(C, NULL, NULL, &strip_ptr)) {
539  return;
540  }
541 
542  block = uiLayoutGetBlock(layout);
544  uiLayoutSetPropSep(layout, true);
545 
546  uiLayoutSetEnabled(layout, RNA_boolean_get(&strip_ptr, "use_animated_time"));
547  uiItemR(layout, &strip_ptr, "strip_time", 0, NULL, ICON_NONE);
548 }
549 
550 #define NLA_FMODIFIER_PANEL_PREFIX "NLA"
551 
552 static void nla_fmodifier_panel_id(void *fcm_link, char *r_name)
553 {
554  FModifier *fcm = (FModifier *)fcm_link;
555  eFModifier_Types type = fcm->type;
558  BLI_snprintf(r_name, BKE_ST_MAXNAME, "%s_PT_%s", NLA_FMODIFIER_PANEL_PREFIX, fmi->name);
559 }
560 
561 /* F-Modifiers for active NLA-Strip */
562 static void nla_panel_modifiers(const bContext *C, Panel *panel)
563 {
564  PointerRNA strip_ptr;
565  NlaStrip *strip;
566  uiLayout *row;
567  uiBlock *block;
568 
569  /* check context and also validity of pointer */
570  if (!nla_panel_context(C, NULL, NULL, &strip_ptr)) {
571  return;
572  }
573  strip = strip_ptr.data;
574 
575  block = uiLayoutGetBlock(panel->layout);
577 
578  /* 'add modifier' button at top of panel */
579  {
580  row = uiLayoutRow(panel->layout, false);
581  block = uiLayoutGetBlock(row);
582 
583  /* FIXME: we need to set the only-active property so that this
584  * will only add modifiers for the active strip (not all selected). */
586  row, (bContext *)C, "NLA_OT_fmodifier_add", "type", IFACE_("Add Modifier"), ICON_NONE);
587 
588  /* copy/paste (as sub-row) */
589  row = uiLayoutRow(row, true);
590  uiItemO(row, "", ICON_COPYDOWN, "NLA_OT_fmodifier_copy");
591  uiItemO(row, "", ICON_PASTEDOWN, "NLA_OT_fmodifier_paste");
592  }
593 
595 }
596 
597 /* ******************* general ******************************** */
598 
600 {
601  PanelType *pt;
602 
603  pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel animdata");
604  strcpy(pt->idname, "NLA_PT_animdata");
605  strcpy(pt->label, N_("Animation Data"));
606  strcpy(pt->category, "Edited Action");
609  pt->draw = nla_panel_animdata;
611  BLI_addtail(&art->paneltypes, pt);
612 
613  pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel properties");
614  strcpy(pt->idname, "NLA_PT_stripname");
615  strcpy(pt->label, N_("Active Strip Name"));
616  strcpy(pt->category, "Strip");
621  BLI_addtail(&art->paneltypes, pt);
622 
623  PanelType *pt_properties = pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel properties");
624  strcpy(pt->idname, "NLA_PT_properties");
625  strcpy(pt->label, N_("Active Strip"));
626  strcpy(pt->category, "Strip");
630  BLI_addtail(&art->paneltypes, pt);
631 
632  pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel properties");
633  strcpy(pt->idname, "NLA_PT_actionclip");
634  strcpy(pt->label, N_("Action Clip"));
635  strcpy(pt->category, "Strip");
637  pt->draw = nla_panel_actclip;
640  BLI_addtail(&art->paneltypes, pt);
641 
642  pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel evaluation");
643  strcpy(pt->idname, "NLA_PT_evaluation");
644  strcpy(pt->parent_id, "NLA_PT_properties");
645  strcpy(pt->label, N_("Animated Influence"));
646  strcpy(pt->category, "Strip");
650  pt->parent = pt_properties;
653  BLI_addtail(&pt_properties->children, BLI_genericNodeN(pt));
654  BLI_addtail(&art->paneltypes, pt);
655 
656  pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel animated strip time");
657  strcpy(pt->idname, "NLA_PT_animated_strip_time");
658  strcpy(pt->parent_id, "NLA_PT_properties");
659  strcpy(pt->label, N_("Animated Strip Time"));
660  strcpy(pt->category, "Strip");
664  pt->parent = pt_properties;
667  BLI_addtail(&pt_properties->children, BLI_genericNodeN(pt));
668  BLI_addtail(&art->paneltypes, pt);
669 
670  pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel modifiers");
671  strcpy(pt->idname, "NLA_PT_modifiers");
672  strcpy(pt->label, N_("Modifiers"));
673  strcpy(pt->category, "Modifiers");
678  BLI_addtail(&art->paneltypes, pt);
679 
682 }
const FModifierTypeInfo * get_fmodifier_typeinfo(const int type)
Definition: fmodifier.c:1072
struct NlaStrip * BKE_nlastrip_find_active(struct NlaTrack *nlt)
Definition: nla.c:1213
#define BKE_ST_MAXNAME
Definition: BKE_screen.h:68
@ PANEL_TYPE_NO_HEADER
Definition: BKE_screen.h:298
@ PANEL_TYPE_DEFAULT_CLOSED
Definition: BKE_screen.h:297
struct LinkData * BLI_genericNodeN(void *data)
Definition: listbase.c:923
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:110
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
#define UNUSED(x)
#define snprintf
Definition: BLI_winstuff.h:69
#define IFACE_(msgid)
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
#define N_(msgid)
eFModifier_Types
@ NLASTRIP_TYPE_SOUND
@ NLASTRIP_TYPE_META
@ NLASTRIP_TYPE_TRANSITION
@ NLASTRIP_TYPE_CLIP
@ ANIMTYPE_DSSPK
Definition: ED_anim_api.h:230
@ ANIMTYPE_DSTEX
Definition: ED_anim_api.h:227
@ ANIMTYPE_DSNTREE
Definition: ED_anim_api.h:222
@ ANIMTYPE_DSMBALL
Definition: ED_anim_api.h:224
@ ANIMTYPE_DSCAM
Definition: ED_anim_api.h:217
@ ANIMTYPE_DSPOINTCLOUD
Definition: ED_anim_api.h:234
@ ANIMTYPE_DSPART
Definition: ED_anim_api.h:223
@ ANIMTYPE_DSLINESTYLE
Definition: ED_anim_api.h:229
@ ANIMTYPE_DSCUR
Definition: ED_anim_api.h:219
@ ANIMTYPE_SCENE
Definition: ED_anim_api.h:204
@ ANIMTYPE_DSARM
Definition: ED_anim_api.h:225
@ ANIMTYPE_DSSIMULATION
Definition: ED_anim_api.h:236
@ ANIMTYPE_DSGPENCIL
Definition: ED_anim_api.h:231
@ ANIMTYPE_DSLAT
Definition: ED_anim_api.h:228
@ ANIMTYPE_DSMAT
Definition: ED_anim_api.h:215
@ ANIMTYPE_DSCACHEFILE
Definition: ED_anim_api.h:218
@ ANIMTYPE_DSVOLUME
Definition: ED_anim_api.h:235
@ ANIMTYPE_DSLAM
Definition: ED_anim_api.h:216
@ ANIMTYPE_PALETTE
Definition: ED_anim_api.h:249
@ ANIMTYPE_OBJECT
Definition: ED_anim_api.h:205
@ ANIMTYPE_DSMESH
Definition: ED_anim_api.h:226
@ ANIMTYPE_NLATRACK
Definition: ED_anim_api.h:246
@ ANIMTYPE_DSWOR
Definition: ED_anim_api.h:221
@ ANIMTYPE_DSSKEY
Definition: ED_anim_api.h:220
@ ANIMTYPE_DSHAIR
Definition: ED_anim_api.h:233
@ ANIMFILTER_ACTIVE
Definition: ED_anim_api.h:306
@ ANIMFILTER_DATA_VISIBLE
Definition: ED_anim_api.h:295
@ ANIMFILTER_LIST_VISIBLE
Definition: ED_anim_api.h:298
@ ANIMFILTER_LIST_CHANNELS
Definition: ED_anim_api.h:303
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Read Guarded memory(de)allocation.
StructRNA RNA_NlaTrack
StructRNA RNA_AnimData
StructRNA RNA_NlaStrip
#define C
Definition: RandGen.cpp:39
uiLayout * uiLayoutRowWithHeading(uiLayout *layout, bool align, const char *heading)
void uiLayoutSetActive(uiLayout *layout, bool active)
uiBlock * uiLayoutGetBlock(uiLayout *layout)
@ UI_EMBOSS
Definition: UI_interface.h:107
@ UI_EMBOSS_NONE_OR_STATUS
Definition: UI_interface.h:115
uiLayout * uiLayoutColumnWithHeading(uiLayout *layout, bool align, const char *heading)
void uiLayoutSetEnabled(uiLayout *layout, bool enabled)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
void uiItemL(uiLayout *layout, const char *name, int icon)
void uiItemMenuEnumO(uiLayout *layout, struct bContext *C, const char *opname, const char *propname, const char *name, int icon)
void uiTemplateID(uiLayout *layout, const struct bContext *C, struct PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop, int filter, const bool live_icon, const char *text)
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)
Definition: interface.c:6247
void uiItemS(uiLayout *layout)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
@ UI_LAYOUT_ALIGN_LEFT
@ UI_TEMPLATE_ID_FILTER_ALL
void UI_block_emboss_set(uiBlock *block, eUIEmbossType emboss)
Definition: interface.c:3542
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
#define NC_SCENE
Definition: WM_types.h:279
#define ND_TRANSFORM
Definition: WM_types.h:357
#define NC_OBJECT
Definition: WM_types.h:280
void ANIM_animdata_freelist(ListBase *anim_data)
Definition: anim_deps.c:425
bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
Definition: anim_filter.c:405
size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, eAnimFilter_Flags filter_mode, void *data, eAnimCont_Types datatype)
Definition: anim_filter.c:3442
void ANIM_modifier_panels_register_graph_and_NLA(ARegionType *region_type, const char *modifier_panel_prefix, PanelTypePollFn poll_function)
Definition: fmodifier_ui.c:942
void ANIM_fmodifier_panels(const bContext *C, ID *owner_id, ListBase *fmodifiers, uiListPanelIDFromDataFunc panel_id_fn)
Definition: fmodifier_ui.c:900
uint col
DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
void *(* MEM_callocN)(size_t len, const char *str)
Definition: mallocn.c:45
static void nla_panel_animated_influence_header(const bContext *C, Panel *panel)
Definition: nla_buttons.c:473
static void nla_panel_properties(const bContext *C, Panel *panel)
Definition: nla_buttons.c:366
static void nla_panel_modifiers(const bContext *C, Panel *panel)
Definition: nla_buttons.c:562
static bool nla_strip_panel_poll(const bContext *C, PanelType *UNUSED(pt))
Definition: nla_buttons.c:212
static void nla_panel_evaluation(const bContext *C, Panel *panel)
Definition: nla_buttons.c:493
static void nla_panel_animated_strip_time(const bContext *C, Panel *panel)
Definition: nla_buttons.c:531
static void nla_panel_stripname(const bContext *C, Panel *panel)
Definition: nla_buttons.c:328
static void nla_panel_animated_strip_time_header(const bContext *C, Panel *panel)
Definition: nla_buttons.c:512
static bool nla_strip_eval_panel_poll(const bContext *C, PanelType *UNUSED(pt))
Definition: nla_buttons.c:234
static bool nla_strip_actclip_panel_poll(const bContext *C, PanelType *UNUSED(pt))
Definition: nla_buttons.c:218
static bool nla_animdata_panel_poll(const bContext *C, PanelType *UNUSED(pt))
Definition: nla_buttons.c:206
static void do_nla_region_buttons(bContext *C, void *UNUSED(arg), int UNUSED(event))
Definition: nla_buttons.c:61
bool nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA *nlt_ptr, PointerRNA *strip_ptr)
Definition: nla_buttons.c:74
static void nla_panel_actclip(const bContext *C, Panel *panel)
Definition: nla_buttons.c:434
static void nla_fmodifier_panel_id(void *fcm_link, char *r_name)
Definition: nla_buttons.c:552
void nla_buttons_register(ARegionType *art)
Definition: nla_buttons.c:599
static void nla_panel_animdata(const bContext *C, Panel *panel)
Definition: nla_buttons.c:258
NlaStrip * ANIM_nla_context_strip(const bContext *C)
Definition: nla_buttons.c:188
#define NLA_FMODIFIER_PANEL_PREFIX
Definition: nla_buttons.c:550
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
Definition: rna_access.c:146
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
Definition: rna_access.c:122
int RNA_struct_ui_icon(const StructRNA *type)
Definition: rna_access.c:738
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6261
int RNA_enum_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6402
ListBase paneltypes
Definition: BKE_screen.h:216
Definition: DNA_ID.h:273
char name[66]
Definition: DNA_ID.h:283
void * first
Definition: DNA_listBase.h:47
ListBase modifiers
void(* draw)(const struct bContext *C, struct Panel *panel)
Definition: BKE_screen.h:266
bool(* poll)(const struct bContext *C, struct PanelType *pt)
Definition: BKE_screen.h:260
void(* draw_header)(const struct bContext *C, struct Panel *panel)
Definition: BKE_screen.h:262
char idname[BKE_ST_MAXNAME]
Definition: BKE_screen.h:241
char translation_context[BKE_ST_MAXNAME]
Definition: BKE_screen.h:244
ListBase children
Definition: BKE_screen.h:289
char category[BKE_ST_MAXNAME]
Definition: BKE_screen.h:246
struct PanelType * parent
Definition: BKE_screen.h:288
char label[BKE_ST_MAXNAME]
Definition: BKE_screen.h:242
char parent_id[BKE_ST_MAXNAME]
Definition: BKE_screen.h:248
struct uiLayout * layout
struct StructRNA * type
Definition: RNA_types.h:51
void * data
Definition: RNA_types.h:52
struct ID * owner_id
Definition: RNA_types.h:50
short datatype
Definition: ED_anim_api.h:75
void * data
Definition: ED_anim_api.h:73
struct bAnimListElem * next
Definition: ED_anim_api.h:135
struct AnimData * adt
Definition: ED_anim_api.h:170
struct ID * id
Definition: ED_anim_api.h:168
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
PointerRNA * ptr
Definition: wm_files.c:3157