forked from bartvdbraak/blender
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:
parent
bae2b9dea3
commit
9afddac727
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user