Page MenuHome

Custom render engine not being called for interactive rendering, get EVEE instead.
Open, Needs Triage by DeveloperPublic

Description

System Information
Operating system: Arch Linux
Graphics card: GTX 970

Blender Version
Broken: blender-2.80-e79bb957fc3-linux-glibc224-x86_64

Short description of error

I'm testing with a new rendering backend, based on the example script at https://docs.blender.org/api/blender2.8/bpy.types.RenderEngine.html. With the attached script (which I only use for testing an understanding the API) a final render with F12 correctly calls the custom engine, but when switching the 3D view to Rendered mode I get an EVEE render instead. I first have to change the render engine from "Flat Color Renderer" to EVEE and back again for preview render to correctly call the custom engine.

Exact steps for others to reproduce the error

  1. $ blender -P blender_render_engine.2.8.py -E custom_renderer
  2. Check that render engine is set to "Flat Color Renderer"
  3. Switch 3D view to Rendered view
  4. Observe that it's an EVEE render
  5. Switch back to Solid view
  6. Change render engine to EVEE
  7. Change render engine to "Flat Color Renderer"
  8. Switch 3D view to Rendered view
  9. Observe that it's now a custom render

I know I'm not following the official route of using an addon, but I believe calling the script at startup like this installs the necessary classes in the correct way, right?

Details

Type
Bug

Event Timeline

Confirmed on 168a6a4bfc1 on windows. Running the script AND setting the renderer from the command line does not update which engine is used in the renderer shading mode in the 3d viewport, despite the mode being set:

>>> bpy.context.scene.render.engine
'custom_renderer'

>>> bpy.context.scene.render.engine = 'custom_renderer'

Only after running the second command does the viewport change from an eevee render to.... well, no shading at all, but that's to be expected since you don't seem to have implemented any drawing in view_draw yet.

well, no shading at all, but that's to be expected since you don't seem to have implemented any drawing in view_draw yet.

Yes, as I mentioned this script is merely meant as a stripped down class to understand the API. It's not the actual implementation of a new render engine, which is something I work on separately.