import bpy from bpy import context from mathutils import Vector radius = 30 # 3Dカーソルの位置を取得 center = bpy.context.scene.cursor.location # 選択中のオブジェクトを取得 obj = context.active_object bpy.ops.object.mode_set(mode="OBJECT") for v in obj.data.vertices: # 3Dカーソルの周辺の頂点以外を選択 if (center - v.co).length < radius: v.select = False else: v.select = True bpy.ops.object.mode_set(mode='EDIT') bpy.ops.mesh.separate(type='SELECTED') bpy.ops.object.mode_set(mode="OBJECT")