1
$\begingroup$

I am trying to render a scene where I run a script with given parameters and then render the animation by passing parameters to the blender executable through the command line.

Given the following example for the command passed:

blender <file_path> -P <python_script> -- <input_parameters> --frame-start <num> --frame-end <num> -a

When executed it does not render and I presume it treats what ever is after the '--' as parameters for the python script. I am aware that I can pass these parameters and use the Blender API in the python script to render the scene with these parameters but for my case this does not suit.

$\endgroup$
9
  • 1
    $\begingroup$ The double dash is treated as end of command options, meaning that you can only pass positional parameters afterwards. $\endgroup$
    – Robert Gützkow
    Apr 16, 2020 at 16:13
  • $\begingroup$ @batFINGER This is specifically about passing parameters to a script and rendering. The linked question does not answer this. $\endgroup$ Apr 16, 2020 at 17:28
  • 1
    $\begingroup$ If the question is about passing parameters to a python script to create commandline then it belongs on stackoverflow et al. . First dupe explains examples of a command to create. (ie pass the blender render arguments before -- ) Second dupe covers passing args to the script in the command. ie the question of what comes after -- If the OP can explain why neither of these cases suit then reopen by all means. But for now I vote to close and stand by it. $\endgroup$
    – batFINGER
    Apr 16, 2020 at 17:45
  • 1
    $\begingroup$ First dupe (now removed) shows how to render form command line. Does not change blender file at all. Please edit question to avoid confusion what are the states users wish to observe in background mode.? Give example of script and actual command line. Re second script being needed what is the first script? $\endgroup$
    – batFINGER
    Apr 17, 2020 at 4:13
  • 1

0

You must log in to answer this question.

Browse other questions tagged .