I just want to link the Color output of the Image Texture node to Store Named Attributes node, but nothing happened, not even any errors being throw out.

store_node = node_tree.nodes.new("GeometryNodeStoreNamedAttribute")
store_node.inputs["Name"].default_value = "Color"
#store_node.inputs["Value"] = 0.5
store_node.data_type = 'FLOAT_COLOR'

img_node = node_tree.nodes.new("GeometryNodeImageTexture")
img_node.inputs[0].default_value = bpy.data.images["material_1.jpeg"]    
node_tree.links.new(name_attr_node.outputs["Attribute"], img_node.inputs["Vector"])
node_tree.links.new(img_node.outputs["Color"], store_node.inputs["Value"]) #TODO BUG

Is there something I missed?

enter image description here

  • $\begingroup$ Internally there are several inputs named "Value", one for every different data type. If you change the data type eg to float or integer you'll see a link appear between your two nodes. I suggest you use socket index rather than name. eg inputs[2] $\endgroup$
    – Gorgious
    Commented May 16 at 14:54
  • $\begingroup$ @Gorgious Cool. That might be the answer, I will try it later. $\endgroup$
    – jiaao yu
    Commented May 20 at 4:37


You must log in to answer this question.

Browse other questions tagged .