Skip to content

Instantly share code, notes, and snippets.

@Wesitos
Last active August 29, 2015 14:05
Show Gist options
  • Save Wesitos/21815052b2abff115b2d to your computer and use it in GitHub Desktop.
Save Wesitos/21815052b2abff115b2d to your computer and use it in GitHub Desktop.
Unwraps all selected objects in blender
import bpy
obj_list = bpy.context.selected_objects
for obj in obj_list:
bpy.ops.object.mode_set(mode='OBJECT')
bpy.context.scene.objects.active = obj
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.uv.unwrap(method='ANGLE_BASED', margin=0.0)
bpy.ops.object.mode_set(mode='OBJECT')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment