I'm trying to use
bpy.ops.object.convert(target='MESH') in Blender 3.3
to apply all modifiers. Unfortunately, I get the error in the title and I don't get what's wrong.
I could use
modifier_apply() as an operator but that has other problems for me, s weo I wanted to see if I could fix this problem here.
import bpy for collection in [c for c in bpy.data.collections if 'M_' in c.name]: for obj in [o.copy() for o in collection.objects if o.type == 'MESH']: obj.data = obj.data.copy() if obj.animation_data: obj.animation_data.action = obj.animation_data.action.copy() bpy.context.collection.objects.link(obj) with bpy.context.temp_override(active_object=obj): bpy.ops.object.convert(target="MESH")