I am currently using the "parent clear" operator with the 'CLEAR_KEEP_TRANSFORM' type to clear transformations when dealing with tens of thousands of objects (see below), but unfortunately, operators lead to a scene update and this loop is extremely slow for my use case. Is there any way to do this solely at the object level? After this, I delete all the empties, but deleting those without unparenting and keeping transforms will of course screw up their location... Thanks in advance!
print("Removing transforms") listOfMeshes = [obj for obj in sceneCollection.objects if obj.type!='EMPTY'] for obj in listOfMeshes: objcounter+=1 print("At "+str(objcounter)+"/"+str(len(listOfMeshes))+" Removing transforms: "+obj.name) bpy.context.view_layer.objects.active = obj bpy.ops.object.parent_clear(type='CLEAR_KEEP_TRANSFORM')