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