How to add Cycles shader nodes to node editor with other render engines?

Is it possible to enable visualization of Cycles shader nodes in the node editor when using another render engine? I tried adding


layout.prop(context.space_data "tree_type")

to the header but that only shows compositing and texture node editors.

IIRC the poll method for the cycles nodetree has a check on the active render engine (scene.renderer.engine or something like that, dunno, totally guessing?) which causes it to return False if cycles isn’t the active engine.

as i remember you cannot see cycles nodes while in blender mode!
you have to select one renderer first
then see it’s own nodes set up!

happy cycles

What about a refresh button that would switch to cycles transparently, render a 64x64 pixels of a sphere with cycles and save it as png/jpg to be displayed in the node editor ?

I’m a noob with the python API, so I’ve no idea if it’s possible, but I think it should be possible.

well you could use composite to mix different rendered images!
and you would see the 2 but not one by one!

or another trick might be to render in a specific slot then
do another render in slot 1 then you can switch between the 2!

happy cycles