diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-06-19 11:11:58 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-06-19 11:11:58 +0400 |
commit | 6601136aaa9df5c813741ddb72daf1c2de5962f7 (patch) | |
tree | 825404c4cc07cc90a381de20231e28e458e01bcd /source/blender/editors/render | |
parent | a6e58cd7613f93b77ee4910bb73b411a0f745fb7 (diff) |
Enable texture preview even when Cycles is active
Diffstat (limited to 'source/blender/editors/render')
-rw-r--r-- | source/blender/editors/render/render_preview.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 5ae7570df78..7385ad111fe 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -299,7 +299,7 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre sce->r.cfra = scene->r.cfra; - if (id_type == ID_TE && ELEM(sp->pr_method, PR_ICON_RENDER, PR_NODE_RENDER)) { + if (id_type == ID_TE) { /* Force blender internal for texture icons and nodes render, * seems commonly used render engines does not support * such kind of rendering. @@ -1137,6 +1137,7 @@ void ED_preview_shader_job(const bContext *C, void *owner, ID *id, ID *parent, M wmJob *wm_job; ShaderPreview *sp; Scene *scene = CTX_data_scene(C); + short id_type = GS(id->name); wm_job = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), owner, "Shader Preview", WM_JOB_EXCL_RENDER, WM_JOB_TYPE_RENDER_PREVIEW); @@ -1154,10 +1155,15 @@ void ED_preview_shader_job(const bContext *C, void *owner, ID *id, ID *parent, M /* hardcoded preview .blend for cycles/internal, this should be solved * once with custom preview .blend path for external engines */ - if ((method != PR_NODE_RENDER) && BKE_scene_use_new_shading_nodes(scene)) + if ((method != PR_NODE_RENDER) && + id_type != ID_TE && + BKE_scene_use_new_shading_nodes(scene)) + { sp->pr_main = G_pr_main_cycles; - else + } + else { sp->pr_main = G_pr_main; + } if (ob && ob->totcol) copy_v4_v4(sp->col, ob->col); else sp->col[0] = sp->col[1] = sp->col[2] = sp->col[3] = 1.0f; |