Eevee preview materials

Now that Eevee has support for offline rendering (F12) we can use it for
the Material previews.

Note: This makes the duplicated UI issue one panel worse. That happens when
Cycles if your scene engine, and Eevee is your workspace engine.
This commit is contained in:
Dalai Felinto 2018-02-27 09:21:54 -03:00
parent 3d7235fc87
commit 12c8fef8c7
3 changed files with 3 additions and 3 deletions

View File

@ -183,7 +183,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel, Panel):
class MATERIAL_PT_preview(MaterialButtonsPanel, Panel):
bl_label = "Preview"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_EEVEE'}
def draw(self, context):
self.layout.template_preview(context.material)

View File

@ -504,7 +504,7 @@ DrawEngineType draw_engine_eevee_type = {
RenderEngineType DRW_engine_viewport_eevee_type = {
NULL, NULL,
EEVEE_ENGINE, N_("Eevee"), RE_INTERNAL | RE_USE_SHADING_NODES,
EEVEE_ENGINE, N_("Eevee"), RE_INTERNAL | RE_USE_SHADING_NODES | RE_USE_PREVIEW,
NULL, &DRW_render_to_image, NULL, NULL, NULL, NULL,
&EEVEE_render_update_passes,
&eevee_layer_collection_settings_create,

View File

@ -1376,7 +1376,7 @@ void ED_preview_shader_job(const bContext *C, void *owner, ID *id, ID *parent, M
sp->bmain = CTX_data_main(C);
sp->view_render = view_render;
/* hardcoded preview .blend for cycles/internal, this should be solved
/* hardcoded preview .blend for Eevee + cycles/internal, this should be solved
* once with custom preview .blend path for external engines */
if ((method != PR_NODE_RENDER) && id_type != ID_TE && use_new_shading) {
sp->pr_main = G_pr_main_cycles;