Live Unwrap

Heya, Im trying to make a toggle button for the UV live unwrap, I can’t seem to get it to change.
This is what I have so far:

import bpy

for area in bpy.context.screen.areas:
    if area.type == 'IMAGE_EDITOR':
        bpy.types.SpaceUVEditor.use_live_unwrap = False

it has no errors but it’s not doing anything lol
Anyone know where i’m going wrong? Or if there is some documentation on how to reference a tick box in bpy.

Thanks

Try this:


for area in bpy.context.screen.areas:
    if area.type == 'IMAGE_EDITOR':
        for space in area.spaces:
            if space.type == 'IMAGE_EDITOR':
                space.uv_editor.use_live_unwrap = False

Works like a charm thank you so much :slight_smile: