diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-10-09 17:41:14 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-10-09 17:41:57 +0300 |
commit | fdeb125c7a8c9f14369182901648760edc005968 (patch) | |
tree | 05a150a64577afb107289faf11d53b1e7185e954 /source/blender/editors | |
parent | 6ec43a765b775960fd47df7ad450a521413012c0 (diff) |
Fix T53014: Cycles material preview not working
This was introduced on 9ad2c0b6154 and partly mended on 8a1d787b89.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/render/render_preview.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 1261ff43854..3f817672c00 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -308,12 +308,14 @@ static void set_preview_layer(SceneLayer *scene_layer, char pr_type) { LayerCollection *lc; const char *collection_name = preview_layer_name(pr_type); + for (lc = scene_layer->layer_collections.first; lc; lc = lc->next) { if (STREQ(lc->scene_collection->name, collection_name)) { - lc->flag = COLLECTION_VISIBLE; + lc->flag = COLLECTION_VISIBLE | COLLECTION_DISABLED; + BKE_collection_enable(scene_layer, lc); } else { - lc->flag = COLLECTION_DISABLED; + BKE_collection_disable(scene_layer, lc); } } } |