using this command blender --help to get more help about Blender command line options, you can find this snippet

--python-text <name> Run the given Python script text block

So if I'm not wrong, this means that I can specify the name of text block which I would like to auto run at Blender start.

So my final command will look like this:
blender --python-text my_text_block_name scene.blend

Where "my_text_block_name" is the name of text block I wrote and save right in my blend file.

But, when I run this command, I have the following error.

Error: text block not found my_text_block_name.

What I'm doing wrong?

I'm using the latest official version of Blender for linux 64bit available at this moment (2.76)


1 Answer 1


Unlike most command line programs the order of the options make a difference. The thing to remember is that blender executes each option in the order they are given, almost like a mini script.

The command you used blender --python-text my_text_block_name scene.blend says run this text block then open this file.

To get your example working you want to open the blend file then execute the text block - blender scene.blend --python-text my_text_block_name

More details about Blender command and some example of how order works.

  • $\begingroup$ I tested it and you're right, order matters. Do you know where to find more official info about this or this is just "user experience" :) ? $\endgroup$
    – Scantlight
    Nov 9, 2015 at 22:34
  • $\begingroup$ It is documented in the manual, but doesn't really give a lot more info. $\endgroup$
    – sambler
    Nov 10, 2015 at 3:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.