Blender Script
- Add Blender to
%PATH%
and runpip install bpy
- Open the repository in VS Code
- Open
script.py
andrender.png
in split view side by side - Open the VS Code terminal
- Run
npx nodemon --exec blender --background --python script.py
- Observe the
render.png
preview refresh after each save - Debug by either:
- Removing
--background
- Splitting terminal and running
blender --python script.py
- Pressing F12 in Blender to preview render
Stalking Blender Operations' Corresponding Python
As per https://www.youtube.com/watch?v=45WZWqmpRQE, open up the Scripting workspace and do your work, observe the console to see the Python code for each operation that you carry out.
To-Do
bpy
Figure out how to get autocompletion for https://github.com/TomasHubelbauer/blender-python-intellisense
Set up a GitHub Actions workflow which installs Blender and runs the script
blender --python script.py
on every push and push render.png
to the repository.