import bpy import pathlib root = pathlib.Path(__file__).resolve().parents[3] bpy.ops.wm.open_mainfile(filepath=str(root / "tests/files/web/basic_scene.blend")) obj = bpy.data.objects["BasicCube"] array = obj.modifiers.new("Stack Array", "ARRAY") array.count = 2 bevel = obj.modifiers.new("Stack Bevel", "BEVEL") bevel.width = 0.1 bevel.segments = 2 other = obj.copy() other.data = obj.data.copy() other.name = "StackTarget" bpy.context.scene.collection.objects.link(other) other.location.x = 4 bpy.ops.wm.save_as_mainfile(filepath=str(root / "tests/files/web/modifier_stack_scene.blend"), check_existing=False)