Parameters in command line

Hello all,

I would like to automatically launch a python script via Blender, and with some parameters. For example:


os.system('blender.exe -P main.py -- name')

The problem is that in this configuration, it’s not the value of ‘name’ which is sent to Blender, but the string ‘name’.

So, I would like to know how to give to Blender the value of my parameter !?

Thx very much :slight_smile:

I found a solution to retrieve several parameters. Indeed the quote were not at the right position:


os.system('blender.exe -P main.py -- ' + str(name) + ':' +  str(number))

str() allows to convert name in string, because my name variable is a QString, and the ‘:’ lets me to send several parameters to Blender.

Actually, I retrieve only one parameters (the concatenation of the both) and I split them thx to ‘:’