So I can’t figure out a way to apply the mod I just created… Blender docs are so complicated I don’t understand anything about bpy. I’ve been trying methods for days but nothing works and blender crashes…
Hope someone can tell me how this works
print("\n\n----Executing massive bool----\n\n\n\n")
import bpy
selected = bpy.context.selected_objects.copy()
objtoremove = bpy.context.selected_objects.copy()
print(selected)
length = len(selected)
length = length - 1
print("len: " + str(length))
for i in range(0, length):
ob = selected[i]
obj = selected[i + 1]
ob.select_set(True)
bpy.context.scene.objects.active = ob
currname = "boolean_" + str(i)
bool_mod = ob.modifiers.new(currname, 'BOOLEAN')
bool_mod.operation = "UNION"
bool_mod.object = obj
lastobj = ob
bpy.ops.object.modifier_apply(modifier=currname)
bpy.ops.object.delete(use_global=False, confirm=False)
print(i)