Featured post

new redirect for blender.org bpy docs.

http://www.blender.org/api/blender_python_api_current/ As of 10/11 november 2015 we can now link to the current api docs and not be worr...

July 03, 2011

Deleting a face from a mesh

if you are modifying data of an object, sometimes you want to remove a face
# must be in edit mode.

# first select the face, then delete it.
mplane.data.faces[-1].select = True # won't show in viewport
bpy.ops.mesh.delete(type='ONLY_FACE') # will be acted on.
must be in edit mode for these options, other options for types are found by reading the tooltips in the delete menu.