Feature Request/Bug Fix: Blender Command Line

The interface, modeling, 3d editing tools, import/export, feature requests, etc

Moderators: jesterKing, stiv

Post Reply
bannerboy
Posts: 0
Joined: Sun Sep 05, 2004 1:18 am

Feature Request/Bug Fix: Blender Command Line

Post by bannerboy » Sat Oct 14, 2006 7:29 pm

I don't know if this would be classified as a bug, a feature request, or just a part of the program that's not well written.

The blender command line is one of those features that not many people use, except for those of us who are trying to write distribued renderers. Anyway, I have recently discovered an interesting glitch in the command line. It executes the flags sequentialy. While many people won't notace this, it has proven to be quite annoying, for example:

Code: Select all

blender -b testfile.blend -a -s 10 -e 20
Will not render frames 10-20 of the .blend file, it will render the entire range that is set in the file. This command on the other hand will:

Code: Select all

blender -b testfile.blend -s 10 -e 20 -a
So far as I can tell, the reason for this is that in the first command, blender renders the animation, and then sets the start and end frames, and then quits the program. In the second command, it loads the file, sets the start and end frames, and then renders. This is because it executes the -b flag first, then the -s then the -e then the -a. If you put the the -b flag after the -s and -e flags, then it will set the start and end frames, and then open the file, which resets them to the frame numbers stored in the file, and then it will render the whole thing like it did in the first command.

Now, this little bug can be useful, if you know how to exploit it. For example:

Code: Select all

blender -b testfile.blend -s 10 -e 20 -a -b realfile.blend -f 10
This will render frames 10-20 of testfile.blend, and frame 10 of realfile.blend.

Although it is potentialy useful, if you don't know how things work, it can really screw you up. One of two things needs to happen, either they need to put this in the documentation, and leave it as is. Or something needs to change so that blender parses the entire command line, and then executes it in a specific order, loading files first, changing start/end frames, running python scripts, and then rendering.

If you want to leave the option of rendering multiple files in one command open, the best way to do it would be something like this:

Code: Select all

blender [general options] file1 [specific options] [file2] [specific options]...
and then have the command line options for each file parsed as one chunk, and executed in a specific order.

Post Reply