With python I want to:
- open a file
- do some stuff to it
- close it (if necessary)
- open another
- repeat
Currently my approach would be:
for f in args.files:
print(f)
bpy.ops.wm.open_mainfile(filepath=f)
which throws an error RuntimeError: Error: File written by newer Blender binary (300.42), expect loss of data!
but only at the second file. Everything works of if that same file is the first of the list, so I suspect that I am missing some kind of "close a file before opening another" operation.
How can I do that?