Fix for wrong active render layer after copying hr scene

Also fix crash for files which could have been saved with
wrong active render layer.
This commit is contained in:
Sergey Sharybin 2013-10-18 09:45:21 +00:00
parent bae2b9dea3
commit 9afddac727
2 changed files with 5 additions and 0 deletions

@ -157,6 +157,7 @@ Scene *BKE_scene_copy(Scene *sce, int type)
lb = scen->r.layers;
scen->r = sce->r;
scen->r.layers = lb;
scen->r.actlay = 0;
scen->unit = sce->unit;
scen->physics_settings = sce->physics_settings;
scen->gm = sce->gm;

@ -739,6 +739,10 @@ static int freestyle_active_lineset_poll(bContext *C)
Scene *scene = CTX_data_scene(C);
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
if (!srl) {
return FALSE;
}
return BKE_freestyle_lineset_get_active(&srl->freestyleConfig) != NULL;
}