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