Apply transformations does not work in automated process I am facing a strange problem with Blender. I start Blender with a script as parameter which is supposed to apply all transformations to an imported fbx model. The import itself works fine.

Part of the code is following:

for o in bpy.context.scene.objects:
        print(o.name)
        o.select = True
        bpy.context.scene.objects.active = o
        bpy.ops.object.transform_apply(location = True, scale = True, rotation = True)
        o.select = False


When running the code like that, Blender does not apply the transformations. Instead it prints:

Warning: Objects have no data to transform


for every single  object.

The really starnge thing is, when I paste the exact same script snippet into the editor field and run it, Blender executes it like expected and applies the transformation.

I really tried to find a solution, but did not find one. Thank you in advance!
Make sure that you actually need to apply transformations. If you are writing an exporter, multiplying the object.matrix_world by the vertex position gives you the transformed value without altering the original mesh.

In case you still need to do it, do what batFINGER suggested.