Blender  V2.93
space_nla.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) 2008 Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #include <stdio.h>
25 #include <string.h>
26 
27 #include "DNA_collection_types.h"
28 #include "DNA_scene_types.h"
29 
30 #include "MEM_guardedalloc.h"
31 
32 #include "BLI_blenlib.h"
33 #include "BLI_utildefines.h"
34 
35 #include "BKE_context.h"
36 #include "BKE_screen.h"
37 
38 #include "ED_anim_api.h"
39 #include "ED_markers.h"
40 #include "ED_screen.h"
41 #include "ED_space_api.h"
42 #include "ED_time_scrub_ui.h"
43 
44 #include "WM_api.h"
45 #include "WM_message.h"
46 #include "WM_types.h"
47 
48 #include "RNA_access.h"
49 
50 #include "UI_interface.h"
51 #include "UI_resources.h"
52 #include "UI_view2d.h"
53 
54 #include "nla_intern.h" /* own include */
55 
56 /* ******************** default callbacks for nla space ***************** */
57 
58 static SpaceLink *nla_create(const ScrArea *area, const Scene *scene)
59 {
60  ARegion *region;
61  SpaceNla *snla;
62 
63  snla = MEM_callocN(sizeof(SpaceNla), "initnla");
64  snla->spacetype = SPACE_NLA;
65 
66  /* allocate DopeSheet data for NLA Editor */
67  snla->ads = MEM_callocN(sizeof(bDopeSheet), "NlaEdit DopeSheet");
68  snla->ads->source = (ID *)scene;
69 
70  /* set auto-snapping settings */
71  snla->autosnap = SACTSNAP_FRAME;
72  snla->flag = SNLA_SHOW_MARKERS;
73 
74  /* header */
75  region = MEM_callocN(sizeof(ARegion), "header for nla");
76 
77  BLI_addtail(&snla->regionbase, region);
78  region->regiontype = RGN_TYPE_HEADER;
80 
81  /* channel list region */
82  region = MEM_callocN(sizeof(ARegion), "channel list for nla");
83  BLI_addtail(&snla->regionbase, region);
84  region->regiontype = RGN_TYPE_CHANNELS;
85  region->alignment = RGN_ALIGN_LEFT;
86 
87  /* only need to set these settings since this will use the 'stack' configuration */
88  region->v2d.scroll = V2D_SCROLL_BOTTOM;
90 
91  /* ui buttons */
92  region = MEM_callocN(sizeof(ARegion), "buttons region for nla");
93 
94  BLI_addtail(&snla->regionbase, region);
95  region->regiontype = RGN_TYPE_UI;
96  region->alignment = RGN_ALIGN_RIGHT;
97  region->flag = RGN_FLAG_HIDDEN;
98 
99  /* main region */
100  region = MEM_callocN(sizeof(ARegion), "main region for nla");
101 
102  BLI_addtail(&snla->regionbase, region);
103  region->regiontype = RGN_TYPE_WINDOW;
104 
105  region->v2d.tot.xmin = (float)(SFRA - 10);
106  region->v2d.tot.ymin = (float)(-area->winy) / 3.0f;
107  region->v2d.tot.xmax = (float)(EFRA + 10);
108  region->v2d.tot.ymax = 0.0f;
109 
110  region->v2d.cur = region->v2d.tot;
111 
112  region->v2d.min[0] = 0.0f;
113  region->v2d.min[1] = 0.0f;
114 
115  region->v2d.max[0] = MAXFRAMEF;
116  region->v2d.max[1] = 10000.0f;
117 
118  region->v2d.minzoom = 0.01f;
119  region->v2d.maxzoom = 50;
121  region->v2d.scroll |= V2D_SCROLL_RIGHT;
122  region->v2d.keepzoom = V2D_LOCKZOOM_Y;
123  region->v2d.keepofs = V2D_KEEPOFS_Y;
124  region->v2d.align = V2D_ALIGN_NO_POS_Y;
126 
127  return (SpaceLink *)snla;
128 }
129 
130 /* not spacelink itself */
131 static void nla_free(SpaceLink *sl)
132 {
133  SpaceNla *snla = (SpaceNla *)sl;
134 
135  if (snla->ads) {
136  BLI_freelistN(&snla->ads->chanbase);
137  MEM_freeN(snla->ads);
138  }
139 }
140 
141 /* spacetype; init callback */
142 static void nla_init(struct wmWindowManager *wm, ScrArea *area)
143 {
144  SpaceNla *snla = (SpaceNla *)area->spacedata.first;
145 
146  /* init dopesheet data if non-existent (i.e. for old files) */
147  if (snla->ads == NULL) {
148  snla->ads = MEM_callocN(sizeof(bDopeSheet), "NlaEdit DopeSheet");
149  snla->ads->source = (wm->winactive) ? (ID *)WM_window_get_active_scene(wm->winactive) : NULL;
150  }
151 
153 }
154 
156 {
157  SpaceNla *snlan = MEM_dupallocN(sl);
158 
159  /* clear or remove stuff from old */
160  snlan->ads = MEM_dupallocN(snlan->ads);
161 
162  return (SpaceLink *)snlan;
163 }
164 
165 /* add handlers, stuff you only do once or on area/region changes */
167 {
168  wmKeyMap *keymap;
169 
170  /* ensure the 2d view sync works - main region has bottom scroller */
171  region->v2d.scroll = V2D_SCROLL_BOTTOM;
172 
173  UI_view2d_region_reinit(&region->v2d, V2D_COMMONVIEW_LIST, region->winx, region->winy);
174 
175  /* own keymap */
176  /* own channels map first to override some channel keymaps */
177  keymap = WM_keymap_ensure(wm->defaultconf, "NLA Channels", SPACE_NLA, 0);
179  /* now generic channels map for everything else that can apply */
180  keymap = WM_keymap_ensure(wm->defaultconf, "Animation Channels", 0, 0);
182 
183  keymap = WM_keymap_ensure(wm->defaultconf, "NLA Generic", SPACE_NLA, 0);
185 }
186 
187 /* draw entirely, view changes should be handled here */
188 static void nla_channel_region_draw(const bContext *C, ARegion *region)
189 {
190  bAnimContext ac;
191  View2D *v2d = &region->v2d;
192 
193  /* clear and setup matrix */
195 
197 
198  /* data */
199  if (ANIM_animdata_get_context(C, &ac)) {
200  draw_nla_channel_list(C, &ac, region);
201  }
202 
203  /* channel filter next to scrubbing area */
205 
206  /* reset view matrix */
208 
209  /* scrollers */
211 }
212 
213 /* add handlers, stuff you only do once or on area/region changes */
215 {
216  wmKeyMap *keymap;
217 
218  UI_view2d_region_reinit(&region->v2d, V2D_COMMONVIEW_CUSTOM, region->winx, region->winy);
219 
220  /* own keymap */
221  keymap = WM_keymap_ensure(wm->defaultconf, "NLA Editor", SPACE_NLA, 0);
223  keymap = WM_keymap_ensure(wm->defaultconf, "NLA Generic", SPACE_NLA, 0);
224  WM_event_add_keymap_handler(&region->handlers, keymap);
225 }
226 
227 static void nla_main_region_draw(const bContext *C, ARegion *region)
228 {
229  /* draw entirely, view changes should be handled here */
230  SpaceNla *snla = CTX_wm_space_nla(C);
232  bAnimContext ac;
233  View2D *v2d = &region->v2d;
234  short cfra_flag = 0;
235 
236  /* clear and setup matrix */
238 
240 
241  /* time grid */
243 
245 
246  /* start and end frame */
248 
249  /* data */
250  if (ANIM_animdata_get_context(C, &ac)) {
251  /* strips and backdrops */
252  draw_nla_main_data(&ac, snla, region);
253 
254  /* text draw cached, in pixelspace now */
256  }
257 
258  /* current frame */
259  if (snla->flag & SNLA_DRAWTIME) {
260  cfra_flag |= DRAWCFRA_UNIT_SECONDS;
261  }
262 
263  /* markers */
264  UI_view2d_view_orthoSpecial(region, v2d, 1);
265  int marker_draw_flag = DRAW_MARKERS_MARGIN;
266  if (snla->flag & SNLA_SHOW_MARKERS) {
267  ED_markers_draw(C, marker_draw_flag);
268  }
269 
270  /* preview range */
272  ANIM_draw_previewrange(C, v2d, 0);
273 
274  /* callback */
277 
278  /* reset view matrix */
280 
281  ED_time_scrub_draw(region, scene, snla->flag & SNLA_DRAWTIME, true);
282 }
283 
284 static void nla_main_region_draw_overlay(const bContext *C, ARegion *region)
285 {
286  /* draw entirely, view changes should be handled here */
287  const SpaceNla *snla = CTX_wm_space_nla(C);
288  const Scene *scene = CTX_data_scene(C);
289  View2D *v2d = &region->v2d;
290 
291  /* scrubbing region */
293 
294  /* scrollers */
296 }
297 
298 /* add handlers, stuff you only do once or on area/region changes */
300 {
301  ED_region_header_init(region);
302 }
303 
304 static void nla_header_region_draw(const bContext *C, ARegion *region)
305 {
306  ED_region_header(C, region);
307 }
308 
309 /* add handlers, stuff you only do once or on area/region changes */
311 {
312  wmKeyMap *keymap;
313 
314  ED_region_panels_init(wm, region);
315 
316  keymap = WM_keymap_ensure(wm->defaultconf, "NLA Generic", SPACE_NLA, 0);
318 }
319 
320 static void nla_buttons_region_draw(const bContext *C, ARegion *region)
321 {
322  ED_region_panels(C, region);
323 }
324 
326 {
327  ARegion *region = params->region;
328  wmNotifier *wmn = params->notifier;
329 
330  /* context changes */
331  switch (wmn->category) {
332  case NC_ANIMATION:
333  ED_region_tag_redraw(region);
334  break;
335  case NC_SCENE:
336  switch (wmn->data) {
337  case ND_OB_ACTIVE:
338  case ND_FRAME:
339  case ND_MARKERS:
340  case ND_LAYER_CONTENT:
341  case ND_OB_SELECT:
342  ED_region_tag_redraw(region);
343  break;
344  }
345  break;
346  case NC_OBJECT:
347  switch (wmn->data) {
348  case ND_BONE_ACTIVE:
349  case ND_BONE_SELECT:
350  case ND_KEYS:
351  case ND_DRAW:
352  ED_region_tag_redraw(region);
353  break;
354  }
355  break;
356  default:
357  if (wmn->data == ND_KEYS) {
358  ED_region_tag_redraw(region);
359  }
360  break;
361  }
362 }
363 
365 {
366  ARegion *region = params->region;
367  wmNotifier *wmn = params->notifier;
368 
369  /* context changes */
370  switch (wmn->category) {
371  case NC_ANIMATION:
372  ED_region_tag_redraw(region);
373  break;
374  case NC_SCENE:
375  switch (wmn->data) {
376  case ND_RENDER_OPTIONS:
377  case ND_OB_ACTIVE:
378  case ND_FRAME:
379  case ND_FRAME_RANGE:
380  case ND_MARKERS:
381  case ND_LAYER_CONTENT:
382  case ND_OB_SELECT:
383  ED_region_tag_redraw(region);
384  break;
385  }
386  break;
387  case NC_OBJECT:
388  switch (wmn->data) {
389  case ND_BONE_ACTIVE:
390  case ND_BONE_SELECT:
391  case ND_KEYS:
392  case ND_TRANSFORM:
393  ED_region_tag_redraw(region);
394  break;
395  }
396  break;
397  case NC_NODE:
398  switch (wmn->action) {
399  case NA_EDITED:
400  ED_region_tag_redraw(region);
401  break;
402  }
403  break;
404  case NC_ID:
405  if (wmn->action == NA_RENAME) {
406  ED_region_tag_redraw(region);
407  }
408  break;
409  case NC_SCREEN:
410  if (ELEM(wmn->data, ND_LAYER)) {
411  ED_region_tag_redraw(region);
412  }
413  break;
414  default:
415  if (wmn->data == ND_KEYS) {
416  ED_region_tag_redraw(region);
417  }
418  break;
419  }
420 }
421 
423 {
424  struct wmMsgBus *mbus = params->message_bus;
425  Scene *scene = params->scene;
426  bScreen *screen = params->screen;
427  ScrArea *area = params->area;
428  ARegion *region = params->region;
429 
430  PointerRNA ptr;
431  RNA_pointer_create(&screen->id, &RNA_SpaceNLA, area->spacedata.first, &ptr);
432 
433  wmMsgSubscribeValue msg_sub_value_region_tag_redraw = {
434  .owner = region,
435  .user_data = region,
437  };
438 
439  /* Timeline depends on scene properties. */
440  {
441  bool use_preview = (scene->r.flag & SCER_PRV_RANGE);
442  extern PropertyRNA rna_Scene_frame_start;
443  extern PropertyRNA rna_Scene_frame_end;
444  extern PropertyRNA rna_Scene_frame_preview_start;
445  extern PropertyRNA rna_Scene_frame_preview_end;
446  extern PropertyRNA rna_Scene_use_preview_range;
447  extern PropertyRNA rna_Scene_frame_current;
448  const PropertyRNA *props[] = {
449  use_preview ? &rna_Scene_frame_preview_start : &rna_Scene_frame_start,
450  use_preview ? &rna_Scene_frame_preview_end : &rna_Scene_frame_end,
451  &rna_Scene_use_preview_range,
452  &rna_Scene_frame_current,
453  };
454 
455  PointerRNA idptr;
456  RNA_id_pointer_create(&scene->id, &idptr);
457 
458  for (int i = 0; i < ARRAY_SIZE(props); i++) {
459  WM_msg_subscribe_rna(mbus, &idptr, props[i], &msg_sub_value_region_tag_redraw, __func__);
460  }
461  }
462 }
463 
465 {
466  ARegion *region = params->region;
467  wmNotifier *wmn = params->notifier;
468 
469  /* context changes */
470  switch (wmn->category) {
471  case NC_ANIMATION:
472  ED_region_tag_redraw(region);
473  break;
474  case NC_SCENE:
475  switch (wmn->data) {
476  case ND_OB_ACTIVE:
477  case ND_LAYER_CONTENT:
478  case ND_OB_SELECT:
479  ED_region_tag_redraw(region);
480  break;
481  }
482  break;
483  case NC_OBJECT:
484  switch (wmn->data) {
485  case ND_BONE_ACTIVE:
486  case ND_BONE_SELECT:
487  case ND_KEYS:
488  case ND_DRAW:
489  ED_region_tag_redraw(region);
490  break;
491  }
492  break;
493  case NC_ID:
494  if (wmn->action == NA_RENAME) {
495  ED_region_tag_redraw(region);
496  }
497  break;
498  default:
499  if (wmn->data == ND_KEYS) {
500  ED_region_tag_redraw(region);
501  }
502  break;
503  }
504 }
505 
507 {
508  struct wmMsgBus *mbus = params->message_bus;
509  bScreen *screen = params->screen;
510  ScrArea *area = params->area;
511  ARegion *region = params->region;
512 
513  PointerRNA ptr;
514  RNA_pointer_create(&screen->id, &RNA_SpaceNLA, area->spacedata.first, &ptr);
515 
516  wmMsgSubscribeValue msg_sub_value_region_tag_redraw = {
517  .owner = region,
518  .user_data = region,
520  };
521 
522  /* All dopesheet filter settings, etc. affect the drawing of this editor,
523  * so just whitelist the entire struct for updates
524  */
525  {
526  wmMsgParams_RNA msg_key_params = {{0}};
527  StructRNA *type_array[] = {
528  &RNA_DopeSheet,
529  };
530 
531  for (int i = 0; i < ARRAY_SIZE(type_array); i++) {
532  msg_key_params.ptr.type = type_array[i];
534  mbus, &msg_key_params, &msg_sub_value_region_tag_redraw, __func__);
535  }
536  }
537 }
538 
539 /* editor level listener */
541 {
542  ScrArea *area = params->area;
543  wmNotifier *wmn = params->notifier;
544 
545  /* context changes */
546  switch (wmn->category) {
547  case NC_ANIMATION:
548  /* TODO: filter specific types of changes? */
550  break;
551  case NC_SCENE:
552 #if 0
553  switch (wmn->data) {
554  case ND_OB_ACTIVE:
555  case ND_OB_SELECT:
557  break;
558  }
559 #endif
561  break;
562  case NC_OBJECT:
563  switch (wmn->data) {
564  case ND_TRANSFORM:
565  /* do nothing */
566  break;
567  default:
569  break;
570  }
571  break;
572  case NC_SPACE:
573  if (wmn->data == ND_SPACE_NLA) {
575  }
576  break;
577  }
578 }
579 
580 static void nla_id_remap(ScrArea *UNUSED(area), SpaceLink *slink, ID *old_id, ID *new_id)
581 {
582  SpaceNla *snla = (SpaceNla *)slink;
583 
584  if (snla->ads) {
585  if ((ID *)snla->ads->filter_grp == old_id) {
586  snla->ads->filter_grp = (Collection *)new_id;
587  }
588  if ((ID *)snla->ads->source == old_id) {
589  snla->ads->source = new_id;
590  }
591  }
592 }
593 
594 /* only called once, from space/spacetypes.c */
596 {
597  SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype nla");
598  ARegionType *art;
599 
600  st->spaceid = SPACE_NLA;
601  strncpy(st->name, "NLA", BKE_ST_MAXNAME);
602 
603  st->create = nla_create;
604  st->free = nla_free;
605  st->init = nla_init;
606  st->duplicate = nla_duplicate;
608  st->listener = nla_listener;
609  st->keymap = nla_keymap;
610  st->id_remap = nla_id_remap;
611 
612  /* regions: main window */
613  art = MEM_callocN(sizeof(ARegionType), "spacetype nla region");
614  art->regionid = RGN_TYPE_WINDOW;
615  art->init = nla_main_region_init;
616  art->draw = nla_main_region_draw;
621 
622  BLI_addhead(&st->regiontypes, art);
623 
624  /* regions: header */
625  art = MEM_callocN(sizeof(ARegionType), "spacetype nla region");
626  art->regionid = RGN_TYPE_HEADER;
627  art->prefsizey = HEADERY;
629 
632 
633  BLI_addhead(&st->regiontypes, art);
634 
635  /* regions: channels */
636  art = MEM_callocN(sizeof(ARegionType), "spacetype nla region");
638  art->prefsizex = 200;
640 
645 
646  BLI_addhead(&st->regiontypes, art);
647 
648  /* regions: UI buttons */
649  art = MEM_callocN(sizeof(ARegionType), "spacetype nla region");
650  art->regionid = RGN_TYPE_UI;
652  art->keymapflag = ED_KEYMAP_UI;
656 
657  BLI_addhead(&st->regiontypes, art);
658 
660 
662 }
typedef float(TangentPoint)[2]
struct Scene * CTX_data_scene(const bContext *C)
Definition: context.c:1034
struct SpaceNla * CTX_wm_space_nla(const bContext *C)
Definition: context.c:845
#define BKE_ST_MAXNAME
Definition: BKE_screen.h:68
void BKE_spacetype_register(struct SpaceType *st)
Definition: screen.c:420
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:87
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
Definition: listbase.c:547
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:110
#define ARRAY_SIZE(arr)
#define UNUSED(x)
#define ELEM(...)
@ SACTSNAP_FRAME
Object groups, one object can be in many groups at once.
#define SCER_PRV_RANGE
#define SFRA
#define MAXFRAMEF
#define EFRA
#define HEADERY
@ RGN_ALIGN_BOTTOM
@ RGN_ALIGN_LEFT
@ RGN_ALIGN_TOP
@ RGN_ALIGN_RIGHT
@ RGN_FLAG_HIDDEN
@ RGN_TYPE_CHANNELS
@ RGN_TYPE_UI
@ RGN_TYPE_WINDOW
@ RGN_TYPE_HEADER
@ SPACE_NLA
@ SNLA_DRAWTIME
@ SNLA_SHOW_MARKERS
@ USER_HEADER_BOTTOM
@ V2D_VIEWSYNC_AREA_VERTICAL
@ V2D_SCROLL_RIGHT
@ V2D_SCROLL_BOTTOM
@ V2D_SCROLL_HORIZONTAL_HANDLES
@ V2D_ALIGN_NO_POS_Y
@ V2D_LOCKZOOM_Y
@ V2D_KEEPOFS_Y
@ DRAWCFRA_UNIT_SECONDS
Definition: ED_anim_api.h:658
@ DRAW_MARKERS_MARGIN
Definition: ED_markers.h:42
void ED_area_tag_redraw(ScrArea *area)
Definition: area.c:745
void ED_region_header(const struct bContext *C, struct ARegion *region)
void ED_region_do_msg_notify_tag_redraw(struct bContext *C, struct wmMsgSubscribeKey *msg_key, struct wmMsgSubscribeValue *msg_val)
void ED_region_panels(const struct bContext *C, struct ARegion *region)
void ED_region_panels_init(struct wmWindowManager *wm, struct ARegion *region)
Definition: area.c:3090
void ED_region_tag_redraw(struct ARegion *region)
Definition: area.c:667
void ED_region_header_init(struct ARegion *region)
Definition: area.c:3358
void ED_area_tag_refresh(ScrArea *area)
Definition: area.c:774
@ ED_KEYMAP_UI
Definition: ED_screen.h:440
@ ED_KEYMAP_ANIMATION
Definition: ED_screen.h:444
@ ED_KEYMAP_HEADER
Definition: ED_screen.h:446
@ ED_KEYMAP_VIEW2D
Definition: ED_screen.h:443
@ ED_KEYMAP_FRAMES
Definition: ED_screen.h:445
#define REGION_DRAW_POST_VIEW
Definition: ED_space_api.h:66
void ED_region_draw_cb_draw(const struct bContext *, struct ARegion *, int)
#define REGION_DRAW_PRE_VIEW
Definition: ED_space_api.h:68
Read Guarded memory(de)allocation.
StructRNA RNA_DopeSheet
StructRNA RNA_SpaceNLA
#define C
Definition: RandGen.cpp:39
#define UI_SIDEBAR_PANEL_WIDTH
Definition: UI_interface.h:245
@ TH_BACK
Definition: UI_resources.h:55
void UI_ThemeClearColor(int colorid)
Definition: resources.c:1478
void UI_view2d_region_reinit(struct View2D *v2d, short type, int winx, int winy)
Definition: view2d.c:240
void UI_view2d_view_restore(const struct bContext *C)
void UI_view2d_view_ortho(const struct View2D *v2d)
void UI_view2d_text_cache_draw(struct ARegion *region)
Definition: view2d.c:2148
void UI_view2d_scrollers_draw(struct View2D *v2d, const struct rcti *mask_custom)
void UI_view2d_view_orthoSpecial(struct ARegion *region, struct View2D *v2d, const bool xaxis)
Definition: view2d.c:1159
@ V2D_COMMONVIEW_LIST
Definition: UI_view2d.h:53
@ V2D_COMMONVIEW_CUSTOM
Definition: UI_view2d.h:49
void UI_view2d_draw_lines_x__discrete_frames_or_seconds(const struct View2D *v2d, const struct Scene *scene, bool display_seconds)
#define NC_ID
Definition: WM_types.h:296
#define NC_NODE
Definition: WM_types.h:295
#define ND_DRAW
Definition: WM_types.h:362
#define ND_OB_ACTIVE
Definition: WM_types.h:340
#define ND_RENDER_OPTIONS
Definition: WM_types.h:335
#define NC_ANIMATION
Definition: WM_types.h:289
#define ND_SPACE_NLA
Definition: WM_types.h:429
#define NC_SCREEN
Definition: WM_types.h:278
#define ND_OB_SELECT
Definition: WM_types.h:342
#define NC_SCENE
Definition: WM_types.h:279
#define ND_LAYER_CONTENT
Definition: WM_types.h:354
#define NA_EDITED
Definition: WM_types.h:462
#define ND_FRAME_RANGE
Definition: WM_types.h:351
#define ND_MARKERS
Definition: WM_types.h:333
#define ND_FRAME
Definition: WM_types.h:334
#define ND_BONE_ACTIVE
Definition: WM_types.h:360
#define ND_TRANSFORM
Definition: WM_types.h:357
#define ND_LAYER
Definition: WM_types.h:350
#define ND_KEYS
Definition: WM_types.h:364
#define NA_RENAME
Definition: WM_types.h:466
#define ND_BONE_SELECT
Definition: WM_types.h:361
#define NC_OBJECT
Definition: WM_types.h:280
#define NC_SPACE
Definition: WM_types.h:293
void ANIM_draw_previewrange(const bContext *C, View2D *v2d, int end_frame_width)
Definition: anim_draw.c:95
void ANIM_draw_framerange(Scene *scene, View2D *v2d)
Definition: anim_draw.c:134
bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
Definition: anim_filter.c:405
void ED_markers_draw(const bContext *C, int flag)
Definition: anim_markers.c:567
unsigned int U
Definition: btGjkEpa3.h:78
Scene scene
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
void(* MEM_freeN)(void *vmemh)
Definition: mallocn.c:41
void *(* MEM_dupallocN)(const void *vmemh)
Definition: mallocn.c:42
void *(* MEM_callocN)(size_t len, const char *str)
Definition: mallocn.c:45
static void area(int d1, int d2, int e1, int e2, float weights[2])
void nla_buttons_register(ARegionType *art)
Definition: nla_buttons.c:599
void draw_nla_channel_list(const bContext *C, bAnimContext *ac, ARegion *region)
Definition: nla_draw.c:845
void draw_nla_main_data(bAnimContext *ac, SpaceNla *snla, ARegion *region)
Definition: nla_draw.c:717
void nla_keymap(wmKeyConfig *keyconf)
Definition: nla_ops.c:164
void nla_operatortypes(void)
Definition: nla_ops.c:101
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
static void nla_header_region_init(wmWindowManager *UNUSED(wm), ARegion *region)
Definition: space_nla.c:299
static void nla_buttons_region_draw(const bContext *C, ARegion *region)
Definition: space_nla.c:320
static void nla_listener(const wmSpaceTypeListenerParams *params)
Definition: space_nla.c:540
static void nla_channel_region_init(wmWindowManager *wm, ARegion *region)
Definition: space_nla.c:166
static void nla_main_region_init(wmWindowManager *wm, ARegion *region)
Definition: space_nla.c:214
static void nla_channel_region_listener(const wmRegionListenerParams *params)
Definition: space_nla.c:464
static void nla_channel_region_draw(const bContext *C, ARegion *region)
Definition: space_nla.c:188
static SpaceLink * nla_duplicate(SpaceLink *sl)
Definition: space_nla.c:155
static void nla_main_region_message_subscribe(const wmRegionMessageSubscribeParams *params)
Definition: space_nla.c:422
static void nla_free(SpaceLink *sl)
Definition: space_nla.c:131
static void nla_channel_region_message_subscribe(const wmRegionMessageSubscribeParams *params)
Definition: space_nla.c:506
static void nla_id_remap(ScrArea *UNUSED(area), SpaceLink *slink, ID *old_id, ID *new_id)
Definition: space_nla.c:580
static void nla_main_region_draw_overlay(const bContext *C, ARegion *region)
Definition: space_nla.c:284
static void nla_main_region_draw(const bContext *C, ARegion *region)
Definition: space_nla.c:227
static void nla_init(struct wmWindowManager *wm, ScrArea *area)
Definition: space_nla.c:142
static SpaceLink * nla_create(const ScrArea *area, const Scene *scene)
Definition: space_nla.c:58
void ED_spacetype_nla(void)
Definition: space_nla.c:595
static void nla_header_region_draw(const bContext *C, ARegion *region)
Definition: space_nla.c:304
static void nla_buttons_region_init(wmWindowManager *wm, ARegion *region)
Definition: space_nla.c:310
static void nla_region_listener(const wmRegionListenerParams *params)
Definition: space_nla.c:325
static void nla_main_region_listener(const wmRegionListenerParams *params)
Definition: space_nla.c:364
void(* draw)(const struct bContext *C, struct ARegion *region)
Definition: BKE_screen.h:169
void(* message_subscribe)(const wmRegionMessageSubscribeParams *params)
Definition: BKE_screen.h:185
void(* draw_overlay)(const struct bContext *C, struct ARegion *region)
Definition: BKE_screen.h:177
void(* listener)(const wmRegionListenerParams *params)
Definition: BKE_screen.h:183
int keymapflag
Definition: BKE_screen.h:226
void(* init)(struct wmWindowManager *wm, struct ARegion *region)
Definition: BKE_screen.h:165
ListBase handlers
short alignment
short regiontype
Definition: DNA_ID.h:273
struct StructRNA * type
Definition: RNA_types.h:51
struct RenderData r
short autosnap
ListBase regionbase
struct bDopeSheet * ads
struct SpaceLink *(* duplicate)(struct SpaceLink *sl)
Definition: BKE_screen.h:104
ListBase regiontypes
Definition: BKE_screen.h:130
void(* keymap)(struct wmKeyConfig *keyconf)
Definition: BKE_screen.h:109
void(* operatortypes)(void)
Definition: BKE_screen.h:107
void(* free)(struct SpaceLink *sl)
Definition: BKE_screen.h:88
struct SpaceLink *(* create)(const struct ScrArea *area, const struct Scene *scene)
Definition: BKE_screen.h:86
void(* listener)(const wmSpaceTypeListenerParams *params)
Definition: BKE_screen.h:95
void(* init)(struct wmWindowManager *wm, struct ScrArea *area)
Definition: BKE_screen.h:91
int spaceid
Definition: BKE_screen.h:81
void(* id_remap)(struct ScrArea *area, struct SpaceLink *sl, struct ID *old_id, struct ID *new_id)
Definition: BKE_screen.h:120
char name[BKE_ST_MAXNAME]
Definition: BKE_screen.h:80
short flag
float minzoom
short align
float max[2]
short keepzoom
short keepofs
float min[2]
short scroll
float maxzoom
struct bDopeSheet * ads
Definition: ED_anim_api.h:92
ListBase chanbase
struct Collection * filter_grp
float xmax
Definition: DNA_vec_types.h:85
float xmin
Definition: DNA_vec_types.h:85
float ymax
Definition: DNA_vec_types.h:86
float ymin
Definition: DNA_vec_types.h:86
unsigned int data
Definition: WM_types.h:260
unsigned int action
Definition: WM_types.h:260
unsigned int category
Definition: WM_types.h:260
struct wmKeyConfig * defaultconf
struct wmWindow * winactive
void ED_time_scrub_draw_current_frame(const ARegion *region, const Scene *scene, bool display_seconds, bool draw_line)
void ED_time_scrub_channel_search_draw(const bContext *C, ARegion *region, bDopeSheet *dopesheet)
void ED_time_scrub_draw(const ARegion *region, const Scene *scene, bool display_seconds, bool discrete_frames)
wmEventHandler_Keymap * WM_event_add_keymap_handler_v2d_mask(ListBase *handlers, wmKeyMap *keymap)
wmEventHandler_Keymap * WM_event_add_keymap_handler(ListBase *handlers, wmKeyMap *keymap)
PointerRNA * ptr
Definition: wm_files.c:3157
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
Definition: wm_keymap.c:852
void WM_msg_subscribe_rna_params(struct wmMsgBus *mbus, const wmMsgParams_RNA *msg_key_params, const wmMsgSubscribeValue *msg_val_params, const char *id_repr)
void WM_msg_subscribe_rna(struct wmMsgBus *mbus, PointerRNA *ptr, const PropertyRNA *prop, const wmMsgSubscribeValue *msg_val_params, const char *id_repr)
Scene * WM_window_get_active_scene(const wmWindow *win)
Definition: wm_window.c:2249