I'm trying to run a script like so from the command line
blender -b oop-blender-demo.blend -P model.py
followed by
blender -b oop-blender-demo.blend -a
to render the file.
I've noticed that the second command renders the file oop-blender-demo thats within my blender gui, which has a different script in it than the one i'm trying to run with model.py. It's almost like nothing is saving. I get no errors running the first command so I would think that's the final script that would be used to render the file
While posting this question I looked at this post
Does running a python script via Blender command line not actually do anything?
but when I try to input my blend file as the filepath it says "cannot write to this file". I can't find any information on this error. Is there a way to save this script/link it to the .blend file?
Or alternatively if you understand how to use the method bpy.ops.wm.save_as_mainfile(filepath=???) described in the question I linked, what should I put in the filepath, parameter?