Importing data from Cycles nodes to Eevee light properties

Hi all, I would like to modify this blender import add-on script to work with Eevee instead of Cycles. For this, the data that is being sent to the light nodetree needs to be sent to the regular eevee light properties. How would i go about doing this?


Heres (part of) the import.py script

I haven’t seen the script you linked, but it sounds like you just need to access a node’s value and apply it to a light. But since you’re starting from a script that I assume already works, albeit with Cycles, I’ll also assume you already have access to the light’s node tree, emission node, and color, and of course the light itself.

so really it should be as simple as this:
light.color = light.node_tree.nodes['Emission'].inputs['Color'].default_value[0:3]

1 Like

Thanks for the reply! It seems like it is going to be a bit more complicated than just adding in one additional line. Would you mind taking a look at the import script I attached? If you can help me get this to work right, I would be more than happy to shoot you some money on paypal or whatever you prefer.

Updated script link
and heres the github, because it might be helpful.