0
$\begingroup$

i want to change the active image of my uv/editor with codes, i dont know how to do this in 2.8

could someone help ?

$\endgroup$
1
$\begingroup$

Try this:

import bpy

for area in bpy.context.screen.areas:
    if area.type == 'IMAGE_EDITOR':
        area.spaces.active.image = bpy.data.images['Your_image_name']

Deactivate image in Image Editor

for area in bpy.context.screen.areas:
    if area.type == 'IMAGE_EDITOR':
        area.spaces.active.image = None
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.