Image Buffer - Pixel level access to images

ol i saw this red lines on bottom left

so that what it does!

but this means that ounce the UV image has been change you loose the original data
unless there is a way to re upload the file from folder

may be it can be use
thinking might be possible to simulate the moon’s phases with this and use only one image!
but if need to change the day for moon’s phase then have to reload the original pic and modify it again

the image we have has something like 614 X 614 pixel about 500 KB
so hopefully it should do it inside a few seconds

aso there must be a way to make this new image the active one in script ?

i tried with a moon image and cannot see it on a plane in viewport but can see it in render!

You can force a screen update, but as I mentioned above, if you use this in an operator it’s not necessary. If you really want to do it, it’s not simple without context to get the current screen, but here goes…

areas = bpy.data.window_managers[0].windows[0].areas
for a in areas:
    if a.type == 'IMAGE_EDITOR':
        a.tag_redraw()

As far as the moon phases are concerned, I’d just use multiple images. Where this script could be used in conjunction with that, is if you set aside a few pixels in a corner to define light colours and things like that. So when you change the moon image, you could automatically update the lighting to match… Just a thought :slight_smile: