I was wondering if there is a way to select blender project with just only python script.(I dont have a script and I been trying for weeks now and no result.) Like for an exmaple I have an python script that allows me to change an image on model. With a script from python without being it on python console.
Do you mean using the text editor to write and run a real script?
I mean like from the command line
And good luck.
I am not sure why this question was never answered.
Welcome to BlenderArtists @Nightmare_Wolf.
To:
- Run Blender in the background
- Run a Python script in Blender
- Run all of this by the commandline
Windows Version
- Put this code in a command file such as Launch.cmd
- Tweak the %PATH% & %PY_SCRIPT% variable strings to fit your file structure
@echo off
SET PATH=blender;"C:\Program Files\Blender\blender.exe"
SET PY_SCRIPT="D:\Blender\Scripts\Launch.py"
blender -b -P %PY_SCRIPT%
pause
- In your Launch.py put whichever code you want
print("Hello World")
It was answered, the documentation I linked is a complete explanation of command line rendering with usable examples. It’s definitely kind of you to write out an example though
True, but you linked the arguments only for, “rendering” (only a few arguments).
Which respectively doesn’t even show how to run a Python script via the commandline as the OP requested.
The correct documentation would the one for all Blender application commandline arguments:
https://docs.blender.org/manual/en/latest/advanced/command_line/arguments.html
Sorry if this sounds blunt.