ReTiCo icon indicating copy to clipboard operation
ReTiCo copied to clipboard

seams from island on objects selection

Open Vinc3r opened this issue 5 years ago • 1 comments

useful when importing objects

Vinc3r avatar Aug 08 '18 09:08 Vinc3r

import bpy

uv_chan = 0

for obj in bpy.context.selected_objects:
    if len(obj.data.uv_layers) == 2:
        uv_chan = 1
    obj.data.uv_layers.active_index = uv_chan 
    bpy.ops.object.mode_set(mode='EDIT')
    bpy.ops.uv.select_all(action='SELECT')
    bpy.ops.uv.seams_from_islands()

    bpy.ops.object.mode_set(mode='OBJECT')

Vinc3r avatar Jun 21 '21 14:06 Vinc3r