Download

[SOLVED]Set color value on new MaterialExpressionConstant3Vector

I have created a new constant node.



# Add a color constant node.
ts_node_diffuse = unreal.MaterialEditingLibrary.create_material_expression(mat_closure,unreal.MaterialExpressionConstant3Vector,-384,-200)
value = unreal.LinearColor(float(passedDiffuseColor[0]),float(passedDiffuseColor[1]),float(passedDiffuseColor[2]),1.0)
ts_node_diffuse.set_editor_property("constant", value)


passedDiffuse is a list of RGB values in the range of 0-1. (i.e. [0.25,1.0,0.6])