This CUSTOM Blender Feature CRASHES Your PC...
During my trial, I'm telling them this counts as a tutorial.
Add-on script:
import bpy
bl_info = {
"name": "Self-Destruct Button",
"blender": (2, 80, 0),
"category": "Object",
}
class OBJECT_OT_self_destruct(bpy.types.Operator):
"""Adds a totally normal modifier (definitely)"""
bl_idname = "object.self_destruct"
bl_label = "Add Modifier"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
Attempt to spawn 100,000 cubes, which will likely crash Blender
for i in range(100000):
bpy.ops.mesh.primitive_cube_add(size=1, location=(i % 100, (i // 100) % 100, (i // 10000) % 100))
return {'FINISHED'}
def menu_func(self, context):
self.layout.operator(OBJECT_OT_self_destruct.bl_idname, text="Text your ex husband")
def register():
bpy.utils.register_class(OBJECT_OT_self_destruct)
bpy.types.VIEW3D_MT_object.append(menu_func)
def unregister():
bpy.utils.unregister_class(OBJECT_OT_self_destruct)
bpy.types.VIEW3D_MT_object.remove(menu_func)
if _name_ == "__main__":
register()

