Fix renderlayers UI removing the wrong renderlayer
Bug introduced on1c4c288727
(well technically inb48694639a
). 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.
This commit is contained in:
parent
b7e45b515c
commit
7aabe3f66c
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue