diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-07-14 12:16:25 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-07-14 12:42:31 +0300 |
commit | b48694639af41518a0e8c73da20121eda1685765 (patch) | |
tree | a131a37aff6664a24f4f43f36b93f16ccb6e3005 /source/blender/editors/render/render_shading.c | |
parent | 018df5a49a4c68ff8aea15cd7586d72e6c36f8e6 (diff) |
Workspace: Fix crash on preview, and sanitize placeholder functions
This commit effectively makes workspace switching useless as far as the
active scene layer goes.
The functions from the scene layer API to get the correct scene layer
from "context" were a placeholder to be addressed by the workspace
commit.
When workspace was merged, however G.main was used as a replacement to pass the
correct argument for the functions. As it turned out (surprise!) this
leads to crash on render preview.
We need to get rid of:
* BKE_scene_layer_context_active_ex_PLACEHOLDER
* BKE_scene_layer_context_active_PLACEHOLDER
And either use SceneLayer explicitly or replace it by:
* BKE_scene_layer_from_workspace_get
Diffstat (limited to 'source/blender/editors/render/render_shading.c')
-rw-r--r-- | source/blender/editors/render/render_shading.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 43e66fae56c..2cdd49b3113 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -656,7 +656,7 @@ static int render_layer_remove_exec(bContext *C, wmOperator *UNUSED(op)) { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - SceneLayer *sl = BKE_scene_layer_context_active(scene); + SceneLayer *sl = BKE_scene_layer_context_active_PLACEHOLDER(scene); if (!ED_scene_render_layer_delete(bmain, scene, sl, NULL)) { return OPERATOR_CANCELLED; |