Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2017-10-31 00:11:24 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-10-31 00:12:27 +0300
commit7aabe3f66cae3c57ca37842acfd7d002dcae023f (patch)
tree8e49d4282c4c0c8828171b4ab24dcacd5d63d58e /source/blender/editors/render
parentb7e45b515cae16319ddc9dadca7287b8074353c3 (diff)
Fix renderlayers UI removing the wrong renderlayer
Bug introduced on 1c4c28872721 (well technically in b48694639a). We should not remove the renderlayer from the context, but instead the one that is active from scene. That said, the UI should make a distinction between the scene active render layer and the one that is active in the UI (and that should be the one used when removing it). But for now this is at least more consistent for the users.
Diffstat (limited to 'source/blender/editors/render')
-rw-r--r--source/blender/editors/render/render_shading.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index ef436c44b74..323b17797a0 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -656,9 +656,9 @@ 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 = CTX_data_scene_layer(C);
+ SceneLayer *scene_layer = BKE_scene_layer_from_scene_get(scene);
- if (!ED_scene_render_layer_delete(bmain, scene, sl, NULL)) {
+ if (!ED_scene_render_layer_delete(bmain, scene, scene_layer, NULL)) {
return OPERATOR_CANCELLED;
}