How to generate an image when you push a Blender Python script
In this tutorial we will show you how to generate an image based on a
Python script using the great
This will allow you to automatically have an up-to-date image
available for your users just by pushing your Python script.
My repositories / Create
and create a private repository named blendergraph
Settings / Webhooks / Add
to add a webhook. This is the way your code will be run and will
generate the image when you push into your repository.
Set repository filter to blendergraph
, add a description,
as the trigger event, select fedora-32-x86_64
the environment, add blender
to the packages section and set the first command
to be make
; then press Add
Now, this hook will be executed at your next push.
Clone the main blendergraph
git clone https://rocketgit.com/user/catalinux/blendergraph
And change the origin remote to yours:
git remote remove origin
git remote add origin https://rocketgit.com/blendergraph
Look around in the repository, especialy in the Makefile
You will see that the Makefile is generating .png and .blend files from
the .py files.
The artifacts file collects all .png and .blend files and uploads them in
a directory with the name of the push branched file (we are using
We are ready to do our first push:
git push origin master
After few minutes, if you check your
area of your repository, you should see the folder master
inside it, the .png and .blend files, with the correct content type.
You can click the .png file and look at it.
If the artifacts are not there, check your webhook and see the last output.
It allows you to debug what went wrong.
As an exercise, change something in the .py file, commit and push.
You will see after few minnutes your newly generated image.