Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_event_system.c
| Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
| #include "BLI_blenlib.h" | #include "BLI_blenlib.h" | ||||
| #include "BLI_dynstr.h" | #include "BLI_dynstr.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BLI_math.h" | #include "BLI_math.h" | ||||
| #include "BLI_timer.h" | #include "BLI_timer.h" | ||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_customdata.h" | |||||
| #include "BKE_idprop.h" | #include "BKE_idprop.h" | ||||
| #include "BKE_global.h" | #include "BKE_global.h" | ||||
| #include "BKE_layer.h" | #include "BKE_layer.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_report.h" | #include "BKE_report.h" | ||||
| #include "BKE_scene.h" | #include "BKE_scene.h" | ||||
| #include "BKE_screen.h" | #include "BKE_screen.h" | ||||
| #include "BKE_workspace.h" | #include "BKE_workspace.h" | ||||
| ▲ Show 20 Lines • Show All 251 Lines • ▼ Show 20 Lines | void wm_event_do_depsgraph(bContext *C) | ||||
| /* The whole idea of locked interface is to prevent viewport and whatever | /* The whole idea of locked interface is to prevent viewport and whatever | ||||
| * thread to modify the same data. Because of this, we can not perform | * thread to modify the same data. Because of this, we can not perform | ||||
| * dependency graph update. | * dependency graph update. | ||||
| */ | */ | ||||
| if (wm->is_interface_locked) { | if (wm->is_interface_locked) { | ||||
| return; | return; | ||||
| } | } | ||||
| /* Combine datamasks so 1 win doesn't disable UV's in another [#26448]. */ | /* Combine datamasks so 1 win doesn't disable UV's in another [#26448]. */ | ||||
| uint64_t win_combine_v3d_datamask = 0; | CustomData_MeshMasks win_combine_v3d_datamask = {0}; | ||||
| for (wmWindow *win = wm->windows.first; win; win = win->next) { | for (wmWindow *win = wm->windows.first; win; win = win->next) { | ||||
| const Scene *scene = WM_window_get_active_scene(win); | const Scene *scene = WM_window_get_active_scene(win); | ||||
| const bScreen *screen = WM_window_get_active_screen(win); | const bScreen *screen = WM_window_get_active_screen(win); | ||||
| win_combine_v3d_datamask |= ED_view3d_screen_datamask(C, scene, screen); | ED_view3d_screen_datamask(C, scene, screen, &win_combine_v3d_datamask); | ||||
| } | } | ||||
| /* Update all the dependency graphs of visible view layers. */ | /* Update all the dependency graphs of visible view layers. */ | ||||
| for (wmWindow *win = wm->windows.first; win; win = win->next) { | for (wmWindow *win = wm->windows.first; win; win = win->next) { | ||||
| Scene *scene = WM_window_get_active_scene(win); | Scene *scene = WM_window_get_active_scene(win); | ||||
| ViewLayer *view_layer = WM_window_get_active_view_layer(win); | ViewLayer *view_layer = WM_window_get_active_view_layer(win); | ||||
| Main *bmain = CTX_data_main(C); | Main *bmain = CTX_data_main(C); | ||||
| /* Copied to set's in scene_update_tagged_recursive() */ | /* Copied to set's in scene_update_tagged_recursive() */ | ||||
| scene->customdata_mask = win_combine_v3d_datamask; | scene->customdata_mask = win_combine_v3d_datamask; | ||||
| /* XXX, hack so operators can enforce datamasks [#26482], gl render */ | /* XXX, hack so operators can enforce datamasks [#26482], gl render */ | ||||
| scene->customdata_mask |= scene->customdata_mask_modal; | CustomData_MeshMasks_update(&scene->customdata_mask, &scene->customdata_mask_modal); | ||||
| /* TODO(sergey): For now all dependency graphs which are evaluated from | /* TODO(sergey): For now all dependency graphs which are evaluated from | ||||
| * workspace are considered active. This will work all fine with "locked" | * workspace are considered active. This will work all fine with "locked" | ||||
| * view layer and time across windows. This is to be granted separately, | * view layer and time across windows. This is to be granted separately, | ||||
| * and for until then we have to accept ambiguities when object is shared | * and for until then we have to accept ambiguities when object is shared | ||||
| * across visible view layers and has overrides on it. | * across visible view layers and has overrides on it. | ||||
| */ | */ | ||||
| Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, view_layer, true); | Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, view_layer, true); | ||||
| DEG_make_active(depsgraph); | DEG_make_active(depsgraph); | ||||
| ▲ Show 20 Lines • Show All 4,522 Lines • Show Last 20 Lines | |||||