Cleanup: remove last G.main's in WM code of 2.8.
Again, just validating ther usage and using G_MAIN instead.
This commit is contained in:
@@ -227,7 +227,7 @@ static void wm_window_match_keep_current_wm(
|
||||
for (wmWindow *win = wm->windows.first; win; win = win->next) {
|
||||
WorkSpace *workspace;
|
||||
|
||||
BKE_workspace_layout_find_global(G.main, screen, &workspace);
|
||||
BKE_workspace_layout_find_global(bmain, screen, &workspace);
|
||||
BKE_workspace_active_set(win->workspace_hook, workspace);
|
||||
win->scene = CTX_data_scene(C);
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@ void wm_window_free(bContext *C, wmWindowManager *wm, wmWindow *win)
|
||||
|
||||
wm_ghostwindow_destroy(wm, win);
|
||||
|
||||
BKE_workspace_instance_hook_free(G.main, win->workspace_hook);
|
||||
BKE_workspace_instance_hook_free(G_MAIN, win->workspace_hook);
|
||||
MEM_freeN(win->stereo3d_format);
|
||||
|
||||
MEM_freeN(win);
|
||||
@@ -1236,7 +1236,7 @@ void wm_window_reset_drawable(void)
|
||||
{
|
||||
BLI_assert(BLI_thread_is_main());
|
||||
BLI_assert(GPU_framebuffer_current_get() == 0);
|
||||
wmWindowManager *wm = G.main->wm.first;
|
||||
wmWindowManager *wm = G_MAIN->wm.first;
|
||||
|
||||
if (wm == NULL)
|
||||
return;
|
||||
|
||||
@@ -92,7 +92,7 @@ static wmManipulator *wm_manipulator_create(
|
||||
IDPropertyTemplate val = {0};
|
||||
mpr->properties = IDP_New(IDP_GROUP, &val, "wmManipulatorProperties");
|
||||
}
|
||||
RNA_pointer_create(G.main->wm.first, wt->srna, mpr->properties, mpr->ptr);
|
||||
RNA_pointer_create(G_MAIN->wm.first, wt->srna, mpr->properties, mpr->ptr);
|
||||
|
||||
WM_manipulator_properties_sanitize(mpr->ptr, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user