Skip to content

Instantly share code, notes, and snippets.

@RH2
Created May 8, 2012 07:42
Show Gist options
  • Save RH2/2633325 to your computer and use it in GitHub Desktop.
Save RH2/2633325 to your computer and use it in GitHub Desktop.
import bpy
bpy.ops.object.mode_set(mode = 'OBJECT')
obj = bpy.context.active_object
#deselect_all
for f in bpy.context.active_object.data.polygons:
f.select = False
for p in bpy.context.active_object.data.edges:
p.select = False
#control variable
i=0
#select and separate
obj.data.face[i].select=True
bpy.ops.mesh.separate(type='SELECTED')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment