Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/space_sequencer.c
| Show First 20 Lines • Show All 328 Lines • ▼ Show 20 Lines | static SpaceLink *sequencer_duplicate(SpaceLink *sl) | ||||
| /* Clear or remove stuff from old. */ | /* Clear or remove stuff from old. */ | ||||
| /* XXX sseq->gpd = gpencil_data_duplicate(sseq->gpd, false); */ | /* XXX sseq->gpd = gpencil_data_duplicate(sseq->gpd, false); */ | ||||
| memset(&sseqn->scopes, 0, sizeof(sseqn->scopes)); | memset(&sseqn->scopes, 0, sizeof(sseqn->scopes)); | ||||
| return (SpaceLink *)sseqn; | return (SpaceLink *)sseqn; | ||||
| } | } | ||||
| static void sequencer_listener(wmWindow *UNUSED(win), | static void sequencer_listener(const wmSpaceTypeListenerParams *params) | ||||
| ScrArea *area, | |||||
| wmNotifier *wmn, | |||||
| Scene *UNUSED(scene)) | |||||
| { | { | ||||
| ScrArea *area = params->area; | |||||
| wmNotifier *wmn = params->notifier; | |||||
| /* Context changes. */ | /* Context changes. */ | ||||
| switch (wmn->category) { | switch (wmn->category) { | ||||
| case NC_SCENE: | case NC_SCENE: | ||||
| switch (wmn->data) { | switch (wmn->data) { | ||||
| case ND_FRAME: | case ND_FRAME: | ||||
| case ND_SEQUENCER: | case ND_SEQUENCER: | ||||
| sequencer_scopes_tag_refresh(area); | sequencer_scopes_tag_refresh(area); | ||||
| break; | break; | ||||
| ▲ Show 20 Lines • Show All 179 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| /* Strip editing timeline. */ | /* Strip editing timeline. */ | ||||
| static void sequencer_main_region_draw_overlay(const bContext *C, ARegion *region) | static void sequencer_main_region_draw_overlay(const bContext *C, ARegion *region) | ||||
| { | { | ||||
| draw_timeline_seq_display(C, region); | draw_timeline_seq_display(C, region); | ||||
| } | } | ||||
| static void sequencer_main_region_listener(wmWindow *UNUSED(win), | static void sequencer_main_region_listener(const wmRegionListenerParams *params) | ||||
| ScrArea *UNUSED(area), | |||||
| ARegion *region, | |||||
| wmNotifier *wmn, | |||||
| const Scene *UNUSED(scene)) | |||||
| { | { | ||||
| ARegion *region = params->region; | |||||
| wmNotifier *wmn = params->notifier; | |||||
| /* Context changes. */ | /* Context changes. */ | ||||
| switch (wmn->category) { | switch (wmn->category) { | ||||
| case NC_SCENE: | case NC_SCENE: | ||||
| switch (wmn->data) { | switch (wmn->data) { | ||||
| case ND_FRAME: | case ND_FRAME: | ||||
| case ND_FRAME_RANGE: | case ND_FRAME_RANGE: | ||||
| case ND_MARKERS: | case ND_MARKERS: | ||||
| case ND_RENDER_OPTIONS: /* For FPS and FPS Base. */ | case ND_RENDER_OPTIONS: /* For FPS and FPS Base. */ | ||||
| Show All 23 Lines | switch (wmn->category) { | ||||
| case NC_SCREEN: | case NC_SCREEN: | ||||
| if (ELEM(wmn->data, ND_ANIMPLAY)) { | if (ELEM(wmn->data, ND_ANIMPLAY)) { | ||||
| ED_region_tag_redraw(region); | ED_region_tag_redraw(region); | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| static void sequencer_main_region_message_subscribe(const struct bContext *UNUSED(C), | static void sequencer_main_region_message_subscribe(const wmRegionMessageSubscribeParams *params) | ||||
| struct WorkSpace *UNUSED(workspace), | |||||
| struct Scene *scene, | |||||
| struct bScreen *UNUSED(screen), | |||||
| struct ScrArea *UNUSED(area), | |||||
| struct ARegion *region, | |||||
| struct wmMsgBus *mbus) | |||||
| { | { | ||||
| struct wmMsgBus *mbus = params->message_bus; | |||||
| Scene *scene = params->scene; | |||||
| ARegion *region = params->region; | |||||
| wmMsgSubscribeValue msg_sub_value_region_tag_redraw = { | wmMsgSubscribeValue msg_sub_value_region_tag_redraw = { | ||||
| .owner = region, | .owner = region, | ||||
| .user_data = region, | .user_data = region, | ||||
| .notify = ED_region_do_msg_notify_tag_redraw, | .notify = ED_region_do_msg_notify_tag_redraw, | ||||
| }; | }; | ||||
| /* Timeline depends on scene properties. */ | /* Timeline depends on scene properties. */ | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 143 Lines • ▼ Show 20 Lines | static void sequencer_preview_region_draw(const bContext *C, ARegion *region) | ||||
| if ((U.uiflag & USER_SHOW_FPS) && ED_screen_animation_no_scrub(wm)) { | if ((U.uiflag & USER_SHOW_FPS) && ED_screen_animation_no_scrub(wm)) { | ||||
| const rcti *rect = ED_region_visible_rect(region); | const rcti *rect = ED_region_visible_rect(region); | ||||
| int xoffset = rect->xmin + U.widget_unit; | int xoffset = rect->xmin + U.widget_unit; | ||||
| int yoffset = rect->ymax; | int yoffset = rect->ymax; | ||||
| ED_scene_draw_fps(scene, xoffset, &yoffset); | ED_scene_draw_fps(scene, xoffset, &yoffset); | ||||
| } | } | ||||
| } | } | ||||
| static void sequencer_preview_region_listener(wmWindow *UNUSED(win), | static void sequencer_preview_region_listener(const wmRegionListenerParams *params) | ||||
| ScrArea *UNUSED(area), | |||||
| ARegion *region, | |||||
| wmNotifier *wmn, | |||||
| const Scene *UNUSED(scene)) | |||||
| { | { | ||||
| ARegion *region = params->region; | |||||
| wmNotifier *wmn = params->notifier; | |||||
| /* Context changes. */ | /* Context changes. */ | ||||
| switch (wmn->category) { | switch (wmn->category) { | ||||
| case NC_GPENCIL: | case NC_GPENCIL: | ||||
| if (ELEM(wmn->action, NA_EDITED, NA_SELECTED)) { | if (ELEM(wmn->action, NA_EDITED, NA_SELECTED)) { | ||||
| ED_region_tag_redraw(region); | ED_region_tag_redraw(region); | ||||
| } | } | ||||
| break; | break; | ||||
| case NC_SCENE: | case NC_SCENE: | ||||
| ▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | static void sequencer_buttons_region_init(wmWindowManager *wm, ARegion *region) | ||||
| ED_region_panels_init(wm, region); | ED_region_panels_init(wm, region); | ||||
| } | } | ||||
| static void sequencer_buttons_region_draw(const bContext *C, ARegion *region) | static void sequencer_buttons_region_draw(const bContext *C, ARegion *region) | ||||
| { | { | ||||
| ED_region_panels(C, region); | ED_region_panels(C, region); | ||||
| } | } | ||||
| static void sequencer_buttons_region_listener(wmWindow *UNUSED(win), | static void sequencer_buttons_region_listener(const wmRegionListenerParams *params) | ||||
| ScrArea *UNUSED(area), | |||||
| ARegion *region, | |||||
| wmNotifier *wmn, | |||||
| const Scene *UNUSED(scene)) | |||||
| { | { | ||||
| ARegion *region = params->region; | |||||
| wmNotifier *wmn = params->notifier; | |||||
| /* Context changes. */ | /* Context changes. */ | ||||
| switch (wmn->category) { | switch (wmn->category) { | ||||
| case NC_GPENCIL: | case NC_GPENCIL: | ||||
| if (ELEM(wmn->action, NA_EDITED, NA_SELECTED)) { | if (ELEM(wmn->action, NA_EDITED, NA_SELECTED)) { | ||||
| ED_region_tag_redraw(region); | ED_region_tag_redraw(region); | ||||
| } | } | ||||
| break; | break; | ||||
| case NC_SCENE: | case NC_SCENE: | ||||
| ▲ Show 20 Lines • Show All 140 Lines • Show Last 20 Lines | |||||