import bpy
import bmesh

#切换到编辑模式下

bpy.ops.object.mode_set(mode   = 'EDIT')
bpy.ops.mesh.select_mode(type= 'FACE')
#bpy.ops.mesh.select_all( action = 'SELECT' )


#bpy.ops.mesh.extrude_region_move(TRANSFORM_OT_translate={"value":(0,0,5)} )

# Get the active mesh
obj = bpy.context.edit_object
me = obj.data

# Get a BMesh representation
bm = bmesh.from_edit_mesh(me)
faces = bm.faces

face = faces[0]
face.select = True
print(face )
bpy.ops.mesh.delete(type='ONLY_FACE')

 

Logo

欢迎加入 MCP 技术社区!与志同道合者携手前行,一同解锁 MCP 技术的无限可能!

更多推荐