This CUSTOM Blender Feature CRASHES Your PC...

Channel:
Subscribers:
52,100
Published on ● Video Link: https://www.youtube.com/watch?v=7TlgfJ6hvM8



Duration: 0:00
403 views
23


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()