ReTiCo
ReTiCo copied to clipboard
seams from island on objects selection
useful when importing objects
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')