I am writing a script to do a bunch of stuff to ease a burden and I am trying to unwrap a UV to an image. I need to load the image in to the UV image editor and make it current in all the image editors so when I do the UV unwrap it get’s linked to the image. This way when I do projection painting blender grabs pixels from this… the correct image. How do I set an image as the main current image in python.
- I load an image from the hard drive (done)
- I create a new UV Map (done)
- I Set the image I opened as current in blender somehow (???)
- I unwrap with bpy.ops.uv.project_from_view() (done)
Step 4 ties the uv to the wrong image so I can’t projection paint. Any help is GREATLY appreciated as this one has driven me batty of late.