How to control RGB color input via python script As part of a wider script, I'm trying to build a script that will allow me to change the Hex value of an RGB node. I'm struggling though to find where to hook in to the hex value of the input node. Although not ideal, I could make do with changing the RGB value rather than the hex value, but I can't find where to get hold of this value either?

Any help is very much appreciated!

Cheers

Sam
Here is a guide to control cycles nodes with python.

So the code would look like this:

import bpy
mat = bpy.data.materials['Material_Name']
nodes = mat.node_tree.nodes
node = nodes.get("Diffuse BSDF")
# change the color
node.inputs[0].default_value = (0,1,0,1)  # green RGBA


This lets you change the value just one time and does not run in a loop like with animation nodes.