I'm new to scripting in Blender 2.91.0 and I'm trying to modify nodes via code. According to the API I should be able to access my current node selection via the Node Context.
My material is using nodes and I can access them like this:
However, for some reason, I am not able to access the node context at all. Neither
bpy.context.active_node seem to exist, so I can't get the current node selection. Contradicting the documentation my Python console autocompletion doesn't show them as valid options (see image).
bpy.context.active_node anyway returns the error 'Context' object has no attribute 'active_node'
Does anyone have an idea what I am missing? Any help is appreciated.