bl_info = {
"name": "Nezumi Delete",
"description": "Edit mode delete like Maya",
"author": "This script is public domain",
"version": (0,0),
"blender": (2, 80, 0),
"location": "View3D",
"category": "3D View"}
import bpy
class DeleteBySelectMode(bpy.types.Operator):
bl_idname = "mesh.delete_nezumi"
bl_label = "Delete By Selection"
bl_description = "Delete by selection in edit mode"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
mode = bpy.context.tool_settings.mesh_select_mode[:]
if mode[0]:
bpy.ops.mesh.delete(type="VERT")
elif mode[1]:
bpy.ops.mesh.delete(type="EDGE")
elif mode[2]:
bpy.ops.mesh.delete(type="FACE")
return {'FINISHED'}
classes = [DeleteBySelectMode]
def register():
for cls in classes:
bpy.utils.register_class(cls)
def unregister():
for cls in classes:
bpy.utils.unregister_class(cls)
[Kliknij i przeciągnij, by przenieść.]
😜