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/makesrna | |
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/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 16517ecfde3..a16644207cf 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -1791,7 +1791,7 @@ static void rna_Physics_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Pointe static void rna_Scene_editmesh_select_mode_set(PointerRNA *ptr, const int *value) { Scene *scene = (Scene *)ptr->id.data; - SceneLayer *sl = BKE_scene_layer_context_active(scene); + SceneLayer *sl = BKE_scene_layer_context_active_PLACEHOLDER(scene); ToolSettings *ts = (ToolSettings *)ptr->data; int flag = (value[0] ? SCE_SELECT_VERTEX : 0) | (value[1] ? SCE_SELECT_EDGE : 0) | (value[2] ? SCE_SELECT_FACE : 0); diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index a16380e70e9..c8cceb54f9b 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -852,7 +852,7 @@ static int rna_SpaceImageEditor_show_maskedit_get(PointerRNA *ptr) SpaceImage *sima = (SpaceImage *)(ptr->data); bScreen *sc = (bScreen *)ptr->id.data; Scene *scene = ED_screen_scene_find(sc, G.main->wm.first); - SceneLayer *sl = BKE_scene_layer_context_active(scene); + SceneLayer *sl = BKE_scene_layer_context_active_PLACEHOLDER(scene); return ED_space_image_check_show_maskedit(sl, sima); } |