diff options
Diffstat (limited to 'source/blender/blenkernel/intern/linestyle.c')
-rw-r--r-- | source/blender/blenkernel/intern/linestyle.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/linestyle.c b/source/blender/blenkernel/intern/linestyle.c index 878f38256b4..2fc4c81cb0b 100644 --- a/source/blender/blenkernel/intern/linestyle.c +++ b/source/blender/blenkernel/intern/linestyle.c @@ -215,16 +215,13 @@ void BKE_linestyle_make_local(struct Main *bmain, FreestyleLineStyle *linestyle, FreestyleLineStyle *BKE_linestyle_active_from_scene(Scene *scene) { - SceneRenderLayer *actsrl = BLI_findlink(&scene->r.layers, scene->r.actlay); - if (!actsrl) { - return NULL; - } - - FreestyleConfig *config = &actsrl->freestyleConfig; - FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(config); - - if (lineset) { - return lineset->linestyle; + ViewLayer *active_render_layer = BLI_findlink(&scene->view_layers, scene->active_view_layer); + if (active_render_layer) { + FreestyleConfig *config = &active_render_layer->freestyle_config; + FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(config); + if (lineset) { + return lineset->linestyle; + } } return NULL; } |