I have a python script that takes command-line args. I'm using it to create some blender objects. I'll run it from the command line (actually from a script on a server). I run it like this:

$BLENDER -b --python my-script.py -arg1 file1.in file2.in file3.out

... and the script runs fine, but I get a message saying "Error: File format is not supported in file file1.in" because presumably Blender is trying to read that file as a blend file.

So how can I prevent that? I just want blender to run my script. (Note that I'd be happy to just run it with python directly, but it seems to be difficult to load the bpy module without being in a running blender.)

This is on Blender 2.81 prerelease on Windows, btw. But I'll want it to run on Linux eventually.

  • 1
    $\begingroup$ Yup it's a duplicate as Robert says, but just so you know, it's listed under Misc Options in the Command Line Manual Page $\endgroup$
    – Moog
    Nov 22, 2019 at 22:07
  • $\begingroup$ The standard double-dash -- that'll work great. Thanks! $\endgroup$
    – GaryO
    Nov 22, 2019 at 22:54


Browse other questions tagged or ask your own question.