I almost have no clue regarding python and scripting, and I was wondering if there is a simple script to create two nodes in the shader editor.
Something like this:
UV map → Image texture
That's it. but every time I try to copy from the info window I get errors in the console, please help!

ShaderNodeUVMapandShaderNodeTexImage– brockmann May 07 '20 at 11:03bpy.context.active_object.active_material.nametocontext.active_object.active_material.name. – brockmann May 08 '20 at 16:04poll(cls, context)and returncontext.object.active_material is not None, done. (will grey out the button) – brockmann May 08 '20 at 19:41bl_options = {'REGISTER', 'UNDO'}to the operator (makes it possible to undo its execution).... Further reading: https://blender.stackexchange.com/questions/57306/how-to-create-a-custom-ui – brockmann May 08 '20 at 22:18