Stripped down version of blender... Running scripts only

hello,

Is there a way to have a stripped down version of Blender that runs certain scripts and then quits? How can I make Blender work in this fashion?

Any help is welcome…

stormy
Outpost 3: Genesis Project Leader

stripped down? why?

look at the -P switch

Where is this -P thing… I’m on Windows…

It’s for a programmer who wants to run models through a script but not go through the GUI or any of that other stuff.

there is no “stripped down” version of Blender.

Well it kind of is anyway, as if you haven’t installed python, then it only uses built in modules (for the internal scripts to work)

I think the only way to not go through the GUI would be to recode the script and get rid of all the GUI stuff (I don’t know python). but then again, if you did that, then you wouldn’t have any flexibility for using the scripts

Like we told the other stormy on IRC, at the command line, run
blender -h
to see the available flags.

The ones to notice first are -b and -P.

Running blender from a script without the GUI is how render farms work.

This is the same stormy, I just asked here because I didn’t fully understand it, and so that the guy who will be using Blender can understand how this works.

How do I get to this command prompt you are speaking of? Is it in start>apps> blah blah blah… or is it the one started with Blender? I can’t type anything in the one that starts with Blender…

Okay, so if you’re on win2k Start->Run…->type the word “cmd” and you’re in the command prompt. Use the help that comes with windows, though. Anyway, you can skip this step if you already know what you want to do (or it doesn’t ever change) by setting up an icon/shortcut to blender with the desired options. All you have to do is copy the shortcut on your desktop (rename it something like “Blender (python script)”). Right-click on it. Select “Properties”. Select the “Shortcut” tab. Now, in the “Target” input box, you should have something like:

“C:\Program Files\Blender Foundation\Blender\blender.exe”

Okay, the following is a list of options gotten by calling blender like “blender.exe -h” from the command prompt:

Blender V 2.40
Usage: blender [options ...] [file]

Render options:
  -b <file>     Render <file> in background
    -S <name>   Set scene <name>
    -f <frame>  Render frame <frame> and save it
    -s <frame>  Set start to frame <frame> (use with -a)
    -e <frame>  Set end to frame (use with -a)<frame>
    -a          Render animation

Animation options:
  -a <file(s)>  Playback <file(s)>
    -p <sx> <sy>        Open with lower left corner at <sx>, <sy>
    -m          Read from disk (Don't buffer)

Window options:
  -w            Force opening with borders
  -W            Force opening without borders
  -p <sx> <sy> <w> <h>  Open with lower left corner at <sx>, <sy>
                        and width and height <w>, <h>

Game Engine specific options:
  -g fixedtime          Run on 50 hertz without dropping frames
  -g vertexarrays       Use Vertex Arrays for rendering (usually faster)
  -g noaudio            No audio in Game Engine
  -g nomipmap           No Texture Mipmapping
  -g linearmipmap       Linear Texture Mipmapping instead of Nearest (default)

Misc options:
  -d            Turn debugging on
  -noaudio      Disable audio on systems that support audio
  -h            Print this help text
  -y            Disable script links, use -Y to find out why its -y
  -P <filename> Run the given Python script (filename or Blender Text)
  -R            Register .blend extension
  -v            Print Blender version and exit

So, you want “-P <filename>”. Right? You’ll put something like this in that “Target” input box:

“C:\Program Files\Blender Foundation\Blender\blender.exe” -P dostuff.py

It’s that simple.

Hope that helps,
–lir