ReTiCo
ReTiCo copied to clipboard
Unwrap UV2 of each selected object
at least two options :
- classic unwrap (user have to make sure that seams correctly assigned) followed by packing
- smart unwrap
now that Blender 2.8 have multiple objects edition availabled, maybe just a button to check/fix if some objects doesn't have UV2
import bpy
# create UV2
for obj in bpy.context.selected_objects:
uvChans = obj.data.uv_layers
if len(uvChans) < 2:
uvChans.new(name="UV2")
# remove UV2
for obj in bpy.context.selected_objects:
uvChans = obj.data.uv_layers
if len(uvChans) > 1:
uvChans.remove(uvChans[1])