I’m brand new at scripts in Blender and am struggling to get over my first hurdle. Going mad with almost-but-not-quite script lines from around BA and StackExchange. Hopefully somebody will take pity on me …
All I want to do is add an image texture node to the active object (it has a node-based material already). In the node window I can use shift-A / Texture / Image Texture
The python tip that comes up says bpy.ops.node.add_node(type=“ShaderNodeTexImage”,…). So I tried this script:
import bpy
bpy.context.scene.object.active
bpy.ops.node.add_node(type=“ShaderNodeTexImage”)
Which doesn’t work.
I realise this is embarrassingly simple, but I’m going crazy trying to work it out!
Thanks in advance.