Skip to content

Instantly share code, notes, and snippets.

@bbarker
Created March 27, 2016 13:26
Show Gist options
  • Save bbarker/6c426436999b3956fb22 to your computer and use it in GitHub Desktop.
Save bbarker/6c426436999b3956fb22 to your computer and use it in GitHub Desktop.
import bpy
scene = bpy.context.scene
for ob in scene.objects:
print("--", ob.name)
if ob.type == 'MESH':
print("--", ob.name)
scene.objects.active = ob
bpy.ops.object.mode_set(mode='EDIT', toggle=False)
bpy.ops.mesh.reveal()
bpy.ops.mesh.select_all(action='SELECT')
# execute any editmode tool
# bpy.ops.uv.unwrap()
bpy.ops.uv.smart_project()
bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment