diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-15 18:33:24 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-15 18:33:24 +0300 |
commit | 3e4bf31327c9264c735b85e565d817016db495fc (patch) | |
tree | 2f939558910ed5ebe304e0e686bb59a47e088112 /source/blender/blenkernel | |
parent | 5b6ae0523e18fbc94ba523e20f6c783cb8b3aa89 (diff) |
Cleanup: G.main removal from 2.8-only code.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_workspace.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/workspace.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_workspace.h b/source/blender/blenkernel/BKE_workspace.h index 5442fd43ce5..03d24ac53d1 100644 --- a/source/blender/blenkernel/BKE_workspace.h +++ b/source/blender/blenkernel/BKE_workspace.h @@ -44,6 +44,7 @@ struct WorkSpaceInstanceHook *BKE_workspace_instance_hook_create(const struct Ma void BKE_workspace_instance_hook_free(const struct Main *bmain, struct WorkSpaceInstanceHook *hook); struct WorkSpaceLayout *BKE_workspace_layout_add( + struct Main *bmain, struct WorkSpace *workspace, struct bScreen *screen, const char *name) ATTR_NONNULL(); diff --git a/source/blender/blenkernel/intern/workspace.c b/source/blender/blenkernel/intern/workspace.c index b71dfaf5aea..99fb6b14a35 100644 --- a/source/blender/blenkernel/intern/workspace.c +++ b/source/blender/blenkernel/intern/workspace.c @@ -227,13 +227,14 @@ void BKE_workspace_instance_hook_free(const Main *bmain, WorkSpaceInstanceHook * * Add a new layout to \a workspace for \a screen. */ WorkSpaceLayout *BKE_workspace_layout_add( + Main *bmain, WorkSpace *workspace, bScreen *screen, const char *name) { WorkSpaceLayout *layout = MEM_callocN(sizeof(*layout), __func__); - BLI_assert(!workspaces_is_screen_used(G.main, screen)); + BLI_assert(!workspaces_is_screen_used(bmain, screen)); layout->screen = screen; workspace_layout_name_set(workspace, layout, name); BLI_addtail(&workspace->layouts, layout); |