📋 Metadata

💬 Content

I don’t have AN installed, but judging from your external script you can replace:

myTree = C.material.node_tree

Then on the rest of the code omit bpy.data.node_groups['Pop ups'] and use:

my_node = myTree.nodes.new('SomeNode')

Edit:
Quick example that adds an image node to the active material:

from bpy import context

ntree = context.material.node_tree

image_node = ntree.nodes.new('ShaderNodeTexImage')
image_node.location.y = 400

❤️ 1 likes


🔗 View on Blender Artists