Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_outliner/space_outliner.c
| Show First 20 Lines • Show All 96 Lines • ▼ Show 20 Lines | static void outliner_main_region_draw(const bContext *C, ARegion *region) | ||||
| /* scrollers */ | /* scrollers */ | ||||
| UI_view2d_scrollers_draw(v2d, NULL); | UI_view2d_scrollers_draw(v2d, NULL); | ||||
| } | } | ||||
| static void outliner_main_region_free(ARegion *UNUSED(region)) | static void outliner_main_region_free(ARegion *UNUSED(region)) | ||||
| { | { | ||||
| } | } | ||||
| static void outliner_main_region_listener(wmWindow *UNUSED(win), | static void outliner_main_region_listener(const wmRegionListenerParams *params) | ||||
| ScrArea *area, | |||||
| ARegion *region, | |||||
| wmNotifier *wmn, | |||||
| const Scene *UNUSED(scene)) | |||||
| { | { | ||||
| ScrArea *area = params->area; | |||||
| ARegion *region = params->region; | |||||
| wmNotifier *wmn = params->notifier; | |||||
| SpaceOutliner *space_outliner = area->spacedata.first; | SpaceOutliner *space_outliner = area->spacedata.first; | ||||
| /* context changes */ | /* context changes */ | ||||
| switch (wmn->category) { | switch (wmn->category) { | ||||
| case NC_WM: | case NC_WM: | ||||
| switch (wmn->data) { | switch (wmn->data) { | ||||
| case ND_LIB_OVERRIDE_CHANGED: | case ND_LIB_OVERRIDE_CHANGED: | ||||
| ED_region_tag_redraw(region); | ED_region_tag_redraw(region); | ||||
| ▲ Show 20 Lines • Show All 140 Lines • ▼ Show 20 Lines | switch (wmn->category) { | ||||
| case NC_TEXT: | case NC_TEXT: | ||||
| if (ELEM(wmn->action, NA_ADDED, NA_REMOVED)) { | if (ELEM(wmn->action, NA_ADDED, NA_REMOVED)) { | ||||
| ED_region_tag_redraw(region); | ED_region_tag_redraw(region); | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| static void outliner_main_region_message_subscribe(const struct bContext *UNUSED(C), | static void outliner_main_region_message_subscribe(const wmRegionMessageSubscribeParams *params) | ||||
| struct WorkSpace *UNUSED(workspace), | |||||
| struct Scene *UNUSED(scene), | |||||
| struct bScreen *UNUSED(screen), | |||||
| struct ScrArea *area, | |||||
| struct ARegion *region, | |||||
| struct wmMsgBus *mbus) | |||||
| { | { | ||||
| struct wmMsgBus *mbus = params->message_bus; | |||||
| ScrArea *area = params->area; | |||||
| ARegion *region = params->region; | |||||
| SpaceOutliner *space_outliner = area->spacedata.first; | SpaceOutliner *space_outliner = area->spacedata.first; | ||||
| 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, | ||||
| }; | }; | ||||
| if (ELEM(space_outliner->outlinevis, SO_VIEW_LAYER, SO_SCENES)) { | if (ELEM(space_outliner->outlinevis, SO_VIEW_LAYER, SO_SCENES)) { | ||||
| WM_msg_subscribe_rna_anon_prop(mbus, Window, view_layer, &msg_sub_value_region_tag_redraw); | WM_msg_subscribe_rna_anon_prop(mbus, Window, view_layer, &msg_sub_value_region_tag_redraw); | ||||
| Show All 12 Lines | |||||
| { | { | ||||
| ED_region_header(C, region); | ED_region_header(C, region); | ||||
| } | } | ||||
| static void outliner_header_region_free(ARegion *UNUSED(region)) | static void outliner_header_region_free(ARegion *UNUSED(region)) | ||||
| { | { | ||||
| } | } | ||||
| static void outliner_header_region_listener(wmWindow *UNUSED(win), | static void outliner_header_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: | ||||
| if (wmn->data == ND_KEYINGSET) { | if (wmn->data == ND_KEYINGSET) { | ||||
| ED_region_tag_redraw(region); | ED_region_tag_redraw(region); | ||||
| } | } | ||||
| break; | break; | ||||
| case NC_SPACE: | case NC_SPACE: | ||||
| ▲ Show 20 Lines • Show All 177 Lines • Show Last 20 Lines | |||||