Blender V5.0
space_nla.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2008 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include <cstdio>
10#include <cstring>
11
13#include "DNA_scene_types.h"
14
15#include "DNA_screen_types.h"
16#include "MEM_guardedalloc.h"
17
18#include "BLI_listbase.h"
19#include "BLI_math_base.h"
20#include "BLI_string_utf8.h"
21#include "BLI_utildefines.h"
22
23#include "BKE_context.hh"
24#include "BKE_lib_query.hh"
25#include "BKE_lib_remap.hh"
26#include "BKE_screen.hh"
27
28#include "ED_anim_api.hh"
29#include "ED_markers.hh"
30#include "ED_screen.hh"
31#include "ED_space_api.hh"
32#include "ED_time_scrub_ui.hh"
33
34#include "WM_api.hh"
35#include "WM_message.hh"
36#include "WM_types.hh"
37
38#include "RNA_access.hh"
39
40#include "UI_interface.hh"
41#include "UI_resources.hh"
42#include "UI_view2d.hh"
43
44#include "BLO_read_write.hh"
45
46#include "nla_intern.hh" /* own include */
47
48/* ******************** default callbacks for nla space ***************** */
49
50static SpaceLink *nla_create(const ScrArea *area, const Scene *scene)
51{
52 ARegion *region;
53 SpaceNla *snla;
54
55 snla = MEM_callocN<SpaceNla>("initnla");
56 snla->spacetype = SPACE_NLA;
57
58 /* allocate DopeSheet data for NLA Editor */
59 snla->ads = MEM_callocN<bDopeSheet>("NlaEdit DopeSheet");
60 snla->ads->source = (ID *)(scene);
61
62 /* set auto-snapping settings */
63 snla->flag = SNLA_SHOW_MARKERS;
64
65 /* header */
66 region = BKE_area_region_new();
67
68 BLI_addtail(&snla->regionbase, region);
71
72 /* footer */
73 region = BKE_area_region_new();
74
75 BLI_addtail(&snla->regionbase, region);
78 region->flag = RGN_FLAG_HIDDEN;
79
80 /* track list region */
81 region = BKE_area_region_new();
82 BLI_addtail(&snla->regionbase, region);
84 region->alignment = RGN_ALIGN_LEFT;
85
86 /* only need to set these settings since this will use the 'stack' configuration */
89
90 /* ui buttons */
91 region = BKE_area_region_new();
92
93 BLI_addtail(&snla->regionbase, region);
94 region->regiontype = RGN_TYPE_UI;
95 region->alignment = RGN_ALIGN_RIGHT;
96
97 /* main region */
98 region = BKE_area_region_new();
99
100 BLI_addtail(&snla->regionbase, region);
101 region->regiontype = RGN_TYPE_WINDOW;
102
103 region->v2d.tot.xmin = float(scene->r.sfra - 10);
104 region->v2d.tot.ymin = float(-area->winy) / 3.0f;
105 region->v2d.tot.xmax = float(scene->r.efra + 10);
106 region->v2d.tot.ymax = 0.0f;
107
108 region->v2d.cur = region->v2d.tot;
109
110 region->v2d.min[0] = 0.0f;
111 region->v2d.min[1] = 0.0f;
112
113 region->v2d.max[0] = MAXFRAMEF;
114 region->v2d.max[1] = 10000.0f;
115
116 region->v2d.minzoom = 0.01f;
117 region->v2d.maxzoom = 50;
119 region->v2d.scroll |= V2D_SCROLL_RIGHT;
120 region->v2d.keepzoom = V2D_LOCKZOOM_Y;
121 region->v2d.keepofs = V2D_KEEPOFS_Y;
122 region->v2d.align = V2D_ALIGN_NO_POS_Y;
124
125 return reinterpret_cast<SpaceLink *>(snla);
126}
127
128/* Doesn't free the space-link itself. */
129static void nla_free(SpaceLink *sl)
130{
131 SpaceNla *snla = reinterpret_cast<SpaceNla *>(sl);
132
133 if (snla->ads) {
134 BLI_freelistN(&snla->ads->chanbase);
135 MEM_freeN(snla->ads);
136 }
137}
138
139/* spacetype; init callback */
140static void nla_init(wmWindowManager *wm, ScrArea *area)
141{
142 SpaceNla *snla = static_cast<SpaceNla *>(area->spacedata.first);
143
144 /* init dope-sheet data if non-existent (i.e. for old files). */
145 if (snla->ads == nullptr) {
146 snla->ads = MEM_callocN<bDopeSheet>("NlaEdit DopeSheet");
147 wmWindow *win = WM_window_find_by_area(wm, area);
148 snla->ads->source = win ? reinterpret_cast<ID *>(WM_window_get_active_scene(win)) : nullptr;
149 }
150
152}
153
155{
156 SpaceNla *snlan = static_cast<SpaceNla *>(MEM_dupallocN(sl));
157
158 /* clear or remove stuff from old */
159 snlan->ads = static_cast<bDopeSheet *>(MEM_dupallocN(snlan->ads));
160
161 return reinterpret_cast<SpaceLink *>(snlan);
162}
163
164/* add handlers, stuff you only do once or on area/region changes */
166{
167 wmKeyMap *keymap;
168
169 /* ensure the 2d view sync works - main region has bottom scroller */
170 region->v2d.scroll = V2D_SCROLL_BOTTOM;
171
172 UI_view2d_region_reinit(&region->v2d, V2D_COMMONVIEW_LIST, region->winx, region->winy);
173
174 /* own keymap */
175 /* own tracks map first to override some track keymaps */
176 keymap = WM_keymap_ensure(wm->runtime->defaultconf, "NLA Tracks", SPACE_NLA, RGN_TYPE_WINDOW);
178 &region->runtime->handlers, keymap, WM_event_handler_region_v2d_mask_no_marker_poll);
179 /* now generic channels map for everything else that can apply */
180 keymap = WM_keymap_ensure(
181 wm->runtime->defaultconf, "Animation Channels", SPACE_EMPTY, RGN_TYPE_WINDOW);
182 WM_event_add_keymap_handler_v2d_mask(&region->runtime->handlers, keymap);
183
184 keymap = WM_keymap_ensure(wm->runtime->defaultconf, "NLA Generic", SPACE_NLA, RGN_TYPE_WINDOW);
185 WM_event_add_keymap_handler_v2d_mask(&region->runtime->handlers, keymap);
186}
187
188/* draw entirely, view changes should be handled here */
189static void nla_track_region_draw(const bContext *C, ARegion *region)
190{
191 bAnimContext ac;
192 if (!ANIM_animdata_get_context(C, &ac)) {
193 return;
194 }
195
196 /* clear and setup matrix */
198
199 ListBase anim_data = {nullptr, nullptr};
200
201 SpaceNla *snla = reinterpret_cast<SpaceNla *>(ac.sl);
202 View2D *v2d = &region->v2d;
203
206 const size_t item_count = ANIM_animdata_filter(
207 &ac, &anim_data, filter, ac.data, eAnimCont_Types(ac.datatype));
208
209 /* Recalculate the height of the track list.
210 * Needs to be done before the call to #UI_view2d_view_ortho. */
211 int height = NLATRACK_TOT_HEIGHT(&ac, item_count);
212 /* Add padding for the collapsed redo panel. */
213 height += HEADERY;
215 height += (UI_MARKER_MARGIN_Y - NLATRACK_STEP(snla));
216 }
217 v2d->tot.ymin = -height;
219
221
222 draw_nla_track_list(C, &ac, region, anim_data);
223
224 /* track filter next to scrubbing area */
226
227 /* reset view matrix */
229
230 /* scrollers */
231 if (region->winy > UI_ANIM_MINY) {
232 UI_view2d_scrollers_draw(v2d, nullptr);
233 }
234
235 ANIM_animdata_freelist(&anim_data);
236}
237
238/* add handlers, stuff you only do once or on area/region changes */
240{
241 wmKeyMap *keymap;
242
243 UI_view2d_region_reinit(&region->v2d, V2D_COMMONVIEW_CUSTOM, region->winx, region->winy);
244
245 /* own keymap */
246 keymap = WM_keymap_ensure(wm->runtime->defaultconf, "NLA Editor", SPACE_NLA, RGN_TYPE_WINDOW);
247 WM_event_add_keymap_handler_v2d_mask(&region->runtime->handlers, keymap);
248 keymap = WM_keymap_ensure(wm->runtime->defaultconf, "NLA Generic", SPACE_NLA, RGN_TYPE_WINDOW);
249 WM_event_add_keymap_handler(&region->runtime->handlers, keymap);
250}
251
252static void nla_main_region_draw(const bContext *C, ARegion *region)
253{
254 /* draw entirely, view changes should be handled here */
255 SpaceNla *snla = CTX_wm_space_nla(C);
256 Scene *scene = CTX_data_scene(C);
257 bAnimContext ac;
258 View2D *v2d = &region->v2d;
259
260 const int min_height = UI_ANIM_MINY;
261
262 /* clear and setup matrix */
264
266
267 /* time grid */
268 if (region->winy > min_height) {
270 v2d, scene, snla->flag & SNLA_DRAWTIME, true);
271 }
272
274
275 /* start and end frame */
276 if (region->winy > min_height) {
277 ANIM_draw_framerange(scene, v2d);
278 }
279
280 /* data */
281 if (ANIM_animdata_get_context(C, &ac)) {
282 /* strips and backdrops */
283 draw_nla_main_data(&ac, snla, region);
284
285 /* Text draw cached, in pixel-space now. */
287 }
288
289 /* markers */
290 UI_view2d_view_orthoSpecial(region, v2d, true);
291 int marker_draw_flag = DRAW_MARKERS_MARGIN;
293 ED_markers_draw(C, marker_draw_flag);
294 }
295
296 /* preview range */
298 ANIM_draw_previewrange(scene, v2d, 0);
299
300 /* callback */
303
304 /* reset view matrix */
306
307 const int fps = round_db_to_int(scene->frames_per_second());
308 ED_time_scrub_draw(region, scene, snla->flag & SNLA_DRAWTIME, true, fps);
309}
310
311static void nla_main_region_draw_overlay(const bContext *C, ARegion *region)
312{
313 /* draw entirely, view changes should be handled here */
314 const SpaceNla *snla = CTX_wm_space_nla(C);
315 const Scene *scene = CTX_data_scene(C);
316 View2D *v2d = &region->v2d;
317
318 /* scrubbing region */
320 region, scene, snla->flag & SNLA_DRAWTIME, region->winy >= UI_ANIM_MINY);
321
322 /* scrollers */
323 if (region->winy >= UI_ANIM_MINY) {
324 UI_view2d_scrollers_draw(v2d, nullptr);
325 }
326}
327
328/* add handlers, stuff you only do once or on area/region changes */
329static void nla_header_region_init(wmWindowManager * /*wm*/, ARegion *region)
330{
331 ED_region_header_init(region);
332}
333
334static void nla_header_region_draw(const bContext *C, ARegion *region)
335{
336 ED_region_header(C, region);
337}
338
340{
341 ARegion *region = params->region;
342 const wmNotifier *wmn = params->notifier;
343
344 /* context changes */
345 switch (wmn->category) {
346 case NC_SCREEN:
347 if (wmn->data == ND_ANIMPLAY) {
348 ED_region_tag_redraw(region);
349 }
350 break;
351 case NC_SCENE:
352 switch (wmn->data) {
353 case ND_FRAME:
354 ED_region_tag_redraw(region);
355 break;
356 }
357 break;
358 }
359}
360
361/* add handlers, stuff you only do once or on area/region changes */
363{
364 wmKeyMap *keymap;
365
366 ED_region_panels_init(wm, region);
367
368 keymap = WM_keymap_ensure(wm->runtime->defaultconf, "NLA Generic", SPACE_NLA, RGN_TYPE_WINDOW);
369 WM_event_add_keymap_handler_v2d_mask(&region->runtime->handlers, keymap);
370}
371
372static void nla_buttons_region_draw(const bContext *C, ARegion *region)
373{
374 ED_region_panels(C, region);
375}
376
378{
379 ARegion *region = params->region;
380 const wmNotifier *wmn = params->notifier;
381
382 /* context changes */
383 switch (wmn->category) {
384 case NC_ANIMATION:
385 ED_region_tag_redraw(region);
386 break;
387 case NC_SCENE:
388 switch (wmn->data) {
389 case ND_OB_ACTIVE:
390 case ND_FRAME:
391 case ND_MARKERS:
392 case ND_LAYER_CONTENT:
393 case ND_OB_SELECT:
394 ED_region_tag_redraw(region);
395 break;
396 }
397 break;
398 case NC_OBJECT:
399 switch (wmn->data) {
400 case ND_BONE_ACTIVE:
401 case ND_BONE_SELECT:
402 case ND_KEYS:
403 case ND_DRAW:
404 ED_region_tag_redraw(region);
405 break;
406 }
407 break;
408 default:
409 if (wmn->data == ND_KEYS) {
410 ED_region_tag_redraw(region);
411 }
412 break;
413 }
414}
415
417{
418 ARegion *region = params->region;
419 const wmNotifier *wmn = params->notifier;
420
421 /* context changes */
422 switch (wmn->category) {
423 case NC_ANIMATION:
424 ED_region_tag_redraw(region);
425 break;
426 case NC_SCENE:
427 switch (wmn->data) {
429 case ND_OB_ACTIVE:
430 case ND_FRAME:
431 case ND_FRAME_RANGE:
432 case ND_MARKERS:
433 case ND_LAYER_CONTENT:
434 case ND_OB_SELECT:
435 ED_region_tag_redraw(region);
436 break;
437 }
438 break;
439 case NC_OBJECT:
440 switch (wmn->data) {
441 case ND_BONE_ACTIVE:
442 case ND_BONE_SELECT:
443 case ND_KEYS:
444 case ND_TRANSFORM:
445 ED_region_tag_redraw(region);
446 break;
447 }
448 break;
449 case NC_NODE:
450 switch (wmn->action) {
451 case NA_EDITED:
452 ED_region_tag_redraw(region);
453 break;
454 }
455 break;
456 case NC_ID:
457 if (wmn->action == NA_RENAME) {
458 ED_region_tag_redraw(region);
459 }
460 break;
461 case NC_SCREEN:
462 if (ELEM(wmn->data, ND_LAYER)) {
463 ED_region_tag_redraw(region);
464 }
465 break;
466 default:
467 if (wmn->data == ND_KEYS) {
468 ED_region_tag_redraw(region);
469 }
470 break;
471 }
472}
473
475{
476 wmMsgBus *mbus = params->message_bus;
477 Scene *scene = params->scene;
478 ARegion *region = params->region;
479
480 wmMsgSubscribeValue msg_sub_value_region_tag_redraw = {};
481 msg_sub_value_region_tag_redraw.owner = region;
482 msg_sub_value_region_tag_redraw.user_data = region;
483 msg_sub_value_region_tag_redraw.notify = ED_region_do_msg_notify_tag_redraw;
484
485 /* Timeline depends on scene properties. */
486 {
487 bool use_preview = (scene->r.flag & SCER_PRV_RANGE);
488 const PropertyRNA *props[] = {
489 use_preview ? &rna_Scene_frame_preview_start : &rna_Scene_frame_start,
490 use_preview ? &rna_Scene_frame_preview_end : &rna_Scene_frame_end,
491 &rna_Scene_use_preview_range,
492 &rna_Scene_frame_current,
493 };
494
495 PointerRNA idptr = RNA_id_pointer_create(&scene->id);
496
497 for (int i = 0; i < ARRAY_SIZE(props); i++) {
498 WM_msg_subscribe_rna(mbus, &idptr, props[i], &msg_sub_value_region_tag_redraw, __func__);
499 }
500 }
501}
502
504{
505 ARegion *region = params->region;
506 const wmNotifier *wmn = params->notifier;
507
508 /* context changes */
509 switch (wmn->category) {
510 case NC_ANIMATION:
511 ED_region_tag_redraw(region);
512 break;
513 case NC_SCENE:
514 switch (wmn->data) {
515 case ND_OB_ACTIVE:
516 case ND_LAYER_CONTENT:
517 case ND_FRAME:
518 case ND_OB_SELECT:
519 ED_region_tag_redraw(region);
520 break;
521 }
522 break;
523 case NC_OBJECT:
524 switch (wmn->data) {
525 case ND_BONE_ACTIVE:
526 case ND_BONE_SELECT:
527 case ND_KEYS:
528 case ND_DRAW:
529 ED_region_tag_redraw(region);
530 break;
531 }
532 break;
533 case NC_ID:
534 if (wmn->action == NA_RENAME) {
535 ED_region_tag_redraw(region);
536 }
537 break;
538 default:
539 if (wmn->data == ND_KEYS) {
540 ED_region_tag_redraw(region);
541 }
542 break;
543 }
544}
545
547{
548 wmMsgBus *mbus = params->message_bus;
549 ARegion *region = params->region;
550
551 wmMsgSubscribeValue msg_sub_value_region_tag_redraw = {};
552 msg_sub_value_region_tag_redraw.owner = region;
553 msg_sub_value_region_tag_redraw.user_data = region;
554 msg_sub_value_region_tag_redraw.notify = ED_region_do_msg_notify_tag_redraw;
555
556 /* All dope-sheet filter settings, etc. affect the drawing of this editor,
557 * so just whitelist the entire struct for updates. */
558 {
559 wmMsgParams_RNA msg_key_params = {{}};
560 StructRNA *type_array[] = {
561 &RNA_DopeSheet,
562 };
563
564 for (int i = 0; i < ARRAY_SIZE(type_array); i++) {
565 msg_key_params.ptr.type = type_array[i];
567 mbus, &msg_key_params, &msg_sub_value_region_tag_redraw, __func__);
568 }
569 }
570}
571
572/* editor level listener */
574{
575 ScrArea *area = params->area;
576 const wmNotifier *wmn = params->notifier;
577
578 /* context changes */
579 switch (wmn->category) {
580 case NC_ANIMATION:
581 /* TODO: filter specific types of changes? */
583 break;
584 case NC_SCENE:
585#if 0
586 switch (wmn->data) {
587 case ND_OB_ACTIVE:
588 case ND_OB_SELECT:
590 break;
591 }
592#endif
594 break;
595 case NC_OBJECT:
596 switch (wmn->data) {
597 case ND_TRANSFORM:
598 /* do nothing */
599 break;
600 default:
602 break;
603 }
604 break;
605 case NC_SPACE:
606 if (wmn->data == ND_SPACE_NLA) {
607 ED_area_tag_redraw(area);
608 }
609 break;
610 }
611}
612
613static void nla_id_remap(ScrArea * /*area*/,
614 SpaceLink *slink,
615 const blender::bke::id::IDRemapper &mappings)
616{
617 SpaceNla *snla = reinterpret_cast<SpaceNla *>(slink);
618
619 if (snla->ads == nullptr) {
620 return;
621 }
622
623 mappings.apply(reinterpret_cast<ID **>(&snla->ads->filter_grp), ID_REMAP_APPLY_DEFAULT);
624 mappings.apply((&snla->ads->source), ID_REMAP_APPLY_DEFAULT);
625}
626
628{
629 SpaceNla *snla = reinterpret_cast<SpaceNla *>(space_link);
630
631 /* NOTE: Could be deduplicated with the #bDopeSheet handling of #SpaceAction and #SpaceGraph. */
632 if (snla->ads == nullptr) {
633 return;
634 }
635
638}
639
641{
642 SpaceNla *snla = reinterpret_cast<SpaceNla *>(sl);
643 BLO_read_struct(reader, bDopeSheet, &snla->ads);
644}
645
647{
648 SpaceNla *snla = reinterpret_cast<SpaceNla *>(sl);
649
650 BLO_write_struct(writer, SpaceNla, snla);
651 if (snla->ads) {
652 BLO_write_struct(writer, bDopeSheet, snla->ads);
653 }
654}
655
657{
658 std::unique_ptr<SpaceType> st = std::make_unique<SpaceType>();
659 ARegionType *art;
660
661 st->spaceid = SPACE_NLA;
662 STRNCPY_UTF8(st->name, "NLA");
663
664 st->create = nla_create;
665 st->free = nla_free;
666 st->init = nla_init;
667 st->duplicate = nla_duplicate;
668 st->operatortypes = nla_operatortypes;
669 st->listener = nla_listener;
670 st->keymap = nla_keymap;
671 st->id_remap = nla_id_remap;
672 st->foreach_id = nla_foreach_id;
673 st->blend_read_data = nla_space_blend_read_data;
674 st->blend_read_after_liblink = nullptr;
675 st->blend_write = nla_space_blend_write;
676
677 /* regions: main window */
678 art = MEM_callocN<ARegionType>("spacetype nla region");
686
687 BLI_addhead(&st->regiontypes, art);
688
689 /* regions: header */
690 art = MEM_callocN<ARegionType>("spacetype nla region");
692 art->prefsizey = HEADERY;
694
697
698 BLI_addhead(&st->regiontypes, art);
699
700 /* regions: footer */
701 art = MEM_callocN<ARegionType>("spacetype nla region");
703 art->prefsizey = HEADERY;
705
709
710 BLI_addhead(&st->regiontypes, art);
711
712 /* regions: tracks */
713 art = MEM_callocN<ARegionType>("spacetype nla region");
715 art->prefsizex = 200;
717
722
723 BLI_addhead(&st->regiontypes, art);
724
725 /* regions: UI buttons */
726 art = MEM_callocN<ARegionType>("spacetype nla region");
727 art->regionid = RGN_TYPE_UI;
733
734 BLI_addhead(&st->regiontypes, art);
735
737
738 art = ED_area_type_hud(st->spaceid);
739 BLI_addhead(&st->regiontypes, art);
740
741 BKE_spacetype_register(std::move(st));
742}
SpaceNla * CTX_wm_space_nla(const bContext *C)
ScrArea * CTX_wm_area(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
#define BKE_LIB_FOREACHID_PROCESS_IDSUPER(data_, id_super_, cb_flag_)
@ IDWALK_CB_DIRECT_WEAK_LINK
#define BKE_LIB_FOREACHID_PROCESS_ID(data_, id_, cb_flag_)
@ ID_REMAP_APPLY_DEFAULT
void BKE_spacetype_register(std::unique_ptr< SpaceType > st)
Definition screen.cc:282
ARegion * BKE_area_region_new()
Definition screen.cc:387
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
void void BLI_freelistN(ListBase *listbase) ATTR_NONNULL(1)
Definition listbase.cc:497
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:111
void BLI_addhead(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:91
MINLINE int round_db_to_int(double a)
#define STRNCPY_UTF8(dst, src)
#define ARRAY_SIZE(arr)
#define ELEM(...)
#define BLO_write_struct(writer, struct_name, data_ptr)
#define BLO_read_struct(reader, struct_name, ptr_p)
Object groups, one object can be in many groups at once.
#define MAXFRAMEF
@ SCER_PRV_RANGE
#define HEADERY
@ RGN_ALIGN_BOTTOM
@ RGN_ALIGN_LEFT
@ RGN_ALIGN_TOP
@ RGN_ALIGN_RIGHT
@ RGN_TYPE_CHANNELS
@ RGN_TYPE_UI
@ RGN_TYPE_WINDOW
@ RGN_TYPE_FOOTER
@ RGN_TYPE_HEADER
@ RGN_FLAG_HIDDEN
@ SPACE_NLA
@ SPACE_EMPTY
@ SNLA_DRAWTIME
@ SNLA_SHOW_MARKERS
@ USER_HEADER_BOTTOM
@ V2D_KEEPOFS_Y
@ V2D_VIEWSYNC_AREA_VERTICAL
@ V2D_LOCKZOOM_Y
@ V2D_SCROLL_RIGHT
@ V2D_SCROLL_BOTTOM
@ V2D_SCROLL_HORIZONTAL_HANDLES
@ V2D_ALIGN_NO_POS_Y
#define NLATRACK_TOT_HEIGHT(ac, item_amount)
#define NLATRACK_STEP(snla)
eAnimCont_Types
eAnimFilter_Flags
@ ANIMFILTER_DATA_VISIBLE
@ ANIMFILTER_LIST_VISIBLE
@ ANIMFILTER_LIST_CHANNELS
@ ANIMFILTER_FCURVESONLY
@ DRAW_MARKERS_MARGIN
Definition ED_markers.hh:28
void ED_area_tag_redraw(ScrArea *area)
Definition area.cc:693
ARegionType * ED_area_type_hud(int space_type)
void ED_region_panels(const bContext *C, ARegion *region)
Definition area.cc:3609
void ED_region_header(const bContext *C, ARegion *region)
Definition area.cc:3935
void ED_region_header_init(ARegion *region)
Definition area.cc:3950
void ED_area_tag_refresh(ScrArea *area)
Definition area.cc:722
void ED_region_panels_init(wmWindowManager *wm, ARegion *region)
Definition area.cc:3616
void ED_region_tag_redraw(ARegion *region)
Definition area.cc:618
@ ED_KEYMAP_UI
Definition ED_screen.hh:758
@ ED_KEYMAP_ANIMATION
Definition ED_screen.hh:762
@ ED_KEYMAP_HEADER
Definition ED_screen.hh:764
@ ED_KEYMAP_VIEW2D
Definition ED_screen.hh:761
@ ED_KEYMAP_FRAMES
Definition ED_screen.hh:763
@ ED_KEYMAP_FOOTER
Definition ED_screen.hh:765
void ED_region_do_msg_notify_tag_redraw(bContext *C, wmMsgSubscribeKey *msg_key, wmMsgSubscribeValue *msg_val)
Definition area.cc:361
void ED_region_draw_cb_draw(const bContext *C, ARegion *region, int type)
#define REGION_DRAW_POST_VIEW
#define REGION_DRAW_PRE_VIEW
Read Guarded memory(de)allocation.
#define C
Definition RandGen.cpp:29
#define UI_SIDEBAR_PANEL_WIDTH
@ TH_BACK
void UI_ThemeClearColor(int colorid)
#define UI_ANIM_MINY
Definition UI_view2d.hh:481
#define UI_MARKER_MARGIN_Y
Definition UI_view2d.hh:478
void UI_view2d_view_orthoSpecial(ARegion *region, View2D *v2d, bool xaxis)
Definition view2d.cc:1136
void UI_view2d_curRect_clamp_y(View2D *v2d)
Definition view2d.cc:844
void UI_view2d_scrollers_draw(View2D *v2d, const rcti *mask_custom)
Definition view2d.cc:1504
void UI_view2d_view_restore(const bContext *C)
Definition view2d.cc:1162
void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
Definition view2d.cc:221
void UI_view2d_text_cache_draw(ARegion *region)
Definition view2d.cc:2142
void UI_view2d_view_ortho(const View2D *v2d)
Definition view2d.cc:1095
void UI_view2d_draw_lines_x__discrete_frames_or_seconds(const View2D *v2d, const Scene *scene, bool display_seconds, bool display_minor_lines)
@ V2D_COMMONVIEW_LIST
Definition UI_view2d.hh:35
@ V2D_COMMONVIEW_CUSTOM
Definition UI_view2d.hh:31
#define NC_ID
Definition WM_types.hh:395
#define NC_NODE
Definition WM_types.hh:394
#define ND_DRAW
Definition WM_types.hh:461
#define ND_OB_ACTIVE
Definition WM_types.hh:440
#define ND_RENDER_OPTIONS
Definition WM_types.hh:435
#define NC_ANIMATION
Definition WM_types.hh:388
#define ND_SPACE_NLA
Definition WM_types.hh:534
#define NC_SCREEN
Definition WM_types.hh:377
#define ND_OB_SELECT
Definition WM_types.hh:442
#define ND_ANIMPLAY
Definition WM_types.hh:424
#define NC_SCENE
Definition WM_types.hh:378
#define ND_LAYER_CONTENT
Definition WM_types.hh:453
#define NA_EDITED
Definition WM_types.hh:584
#define ND_FRAME_RANGE
Definition WM_types.hh:451
#define ND_MARKERS
Definition WM_types.hh:433
#define ND_FRAME
Definition WM_types.hh:434
#define ND_BONE_ACTIVE
Definition WM_types.hh:459
#define ND_TRANSFORM
Definition WM_types.hh:456
#define ND_LAYER
Definition WM_types.hh:450
#define ND_KEYS
Definition WM_types.hh:463
#define NA_RENAME
Definition WM_types.hh:588
#define ND_BONE_SELECT
Definition WM_types.hh:460
#define NC_OBJECT
Definition WM_types.hh:379
#define NC_SPACE
Definition WM_types.hh:392
void ANIM_animdata_freelist(ListBase *anim_data)
Definition anim_deps.cc:463
void ANIM_draw_previewrange(const Scene *scene, View2D *v2d, int end_frame_width)
Definition anim_draw.cc:82
void ANIM_draw_framerange(Scene *scene, View2D *v2d)
Definition anim_draw.cc:171
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)
bool ED_markers_region_visible(const ScrArea *area, const ARegion *region)
ListBase * ED_context_get_markers(const bContext *C)
void ED_markers_draw(const bContext *C, int flag)
#define U
BMesh const char void * data
IDRemapperApplyResult apply(ID **r_id_ptr, IDRemapperApplyOptions options, ID *id_self=nullptr) const
nullptr float
#define filter
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
void * MEM_callocN(size_t len, const char *str)
Definition mallocn.cc:118
void * MEM_dupallocN(const void *vmemh)
Definition mallocn.cc:143
void MEM_freeN(void *vmemh)
Definition mallocn.cc:113
void nla_buttons_register(ARegionType *art)
void draw_nla_track_list(const bContext *C, bAnimContext *ac, ARegion *region, const ListBase &anim_data)
Definition nla_draw.cc:974
void draw_nla_main_data(bAnimContext *ac, SpaceNla *snla, ARegion *region)
Definition nla_draw.cc:787
void nla_operatortypes()
Definition nla_ops.cc:81
void nla_keymap(wmKeyConfig *keyconf)
Definition nla_ops.cc:169
PointerRNA RNA_id_pointer_create(ID *id)
static void nla_buttons_region_draw(const bContext *C, ARegion *region)
Definition space_nla.cc:372
static void nla_listener(const wmSpaceTypeListenerParams *params)
Definition space_nla.cc:573
static void nla_id_remap(ScrArea *, SpaceLink *slink, const blender::bke::id::IDRemapper &mappings)
Definition space_nla.cc:613
static void nla_footer_region_listener(const wmRegionListenerParams *params)
Definition space_nla.cc:339
static void nla_main_region_init(wmWindowManager *wm, ARegion *region)
Definition space_nla.cc:239
static void nla_space_blend_read_data(BlendDataReader *reader, SpaceLink *sl)
Definition space_nla.cc:640
static void nla_track_region_draw(const bContext *C, ARegion *region)
Definition space_nla.cc:189
static SpaceLink * nla_duplicate(SpaceLink *sl)
Definition space_nla.cc:154
static void nla_header_region_init(wmWindowManager *, ARegion *region)
Definition space_nla.cc:329
void ED_spacetype_nla()
Definition space_nla.cc:656
static void nla_space_blend_write(BlendWriter *writer, SpaceLink *sl)
Definition space_nla.cc:646
static void nla_main_region_message_subscribe(const wmRegionMessageSubscribeParams *params)
Definition space_nla.cc:474
static void nla_free(SpaceLink *sl)
Definition space_nla.cc:129
static void nla_main_region_draw_overlay(const bContext *C, ARegion *region)
Definition space_nla.cc:311
static void nla_main_region_draw(const bContext *C, ARegion *region)
Definition space_nla.cc:252
static void nla_track_region_message_subscribe(const wmRegionMessageSubscribeParams *params)
Definition space_nla.cc:546
static void nla_header_region_draw(const bContext *C, ARegion *region)
Definition space_nla.cc:334
static void nla_buttons_region_init(wmWindowManager *wm, ARegion *region)
Definition space_nla.cc:362
static void nla_track_region_init(wmWindowManager *wm, ARegion *region)
Definition space_nla.cc:165
static void nla_region_listener(const wmRegionListenerParams *params)
Definition space_nla.cc:377
static void nla_foreach_id(SpaceLink *space_link, LibraryForeachIDData *data)
Definition space_nla.cc:627
static void nla_main_region_listener(const wmRegionListenerParams *params)
Definition space_nla.cc:416
static void nla_init(wmWindowManager *wm, ScrArea *area)
Definition space_nla.cc:140
static SpaceLink * nla_create(const ScrArea *area, const Scene *scene)
Definition space_nla.cc:50
static void nla_track_region_listener(const wmRegionListenerParams *params)
Definition space_nla.cc:503
void(* message_subscribe)(const wmRegionMessageSubscribeParams *params)
void(* listener)(const wmRegionListenerParams *params)
void(* draw)(const bContext *C, ARegion *region)
void(* draw_overlay)(const bContext *C, ARegion *region)
void(* init)(wmWindowManager *wm, ARegion *region)
ARegionRuntimeHandle * runtime
Definition DNA_ID.h:414
void * first
StructRNA * type
Definition RNA_types.hh:52
struct RenderData r
ListBase spacedata
ListBase regionbase
struct bDopeSheet * ads
float minzoom
float max[2]
short keepzoom
short keepofs
float min[2]
float maxzoom
SpaceLink * sl
eAnimCont_Types datatype
bDopeSheet * ads
ListBase chanbase
struct Collection * filter_grp
float xmax
float xmin
float ymax
float ymin
unsigned int data
Definition WM_types.hh:358
unsigned int action
Definition WM_types.hh:358
unsigned int category
Definition WM_types.hh:358
WindowManagerRuntimeHandle * runtime
i
Definition text_draw.cc:230
void ED_time_scrub_draw(const ARegion *region, const Scene *scene, bool display_seconds, bool discrete_frames, const int base)
void ED_time_scrub_channel_search_draw(const bContext *C, ARegion *region, bDopeSheet *dopesheet)
void ED_time_scrub_draw_current_frame(const ARegion *region, const Scene *scene, bool display_seconds, bool display_stalk)
wmEventHandler_Keymap * WM_event_add_keymap_handler_poll(ListBase *handlers, wmKeyMap *keymap, EventHandlerPoll poll)
wmEventHandler_Keymap * WM_event_add_keymap_handler(ListBase *handlers, wmKeyMap *keymap)
wmEventHandler_Keymap * WM_event_add_keymap_handler_v2d_mask(ListBase *handlers, wmKeyMap *keymap)
bool WM_event_handler_region_v2d_mask_no_marker_poll(const wmWindow *win, const ScrArea *area, const ARegion *region, const wmEvent *event)
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
Definition wm_keymap.cc:895
void WM_msg_subscribe_rna_params(wmMsgBus *mbus, const wmMsgParams_RNA *msg_key_params, const wmMsgSubscribeValue *msg_val_params, const char *id_repr)
void WM_msg_subscribe_rna(wmMsgBus *mbus, PointerRNA *ptr, const PropertyRNA *prop, const wmMsgSubscribeValue *msg_val_params, const char *id_repr)
wmWindow * WM_window_find_by_area(wmWindowManager *wm, const ScrArea *area)
Scene * WM_window_get_active_scene(const wmWindow *win)