From c6f2e2c5e6da329fd51e1adc658c434a03c6c075 Mon Sep 17 00:00:00 2001 From: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com> Date: Thu, 26 Oct 2023 21:47:31 +0100 Subject: [PATCH 1/5] Update README.md --- README.md | 55 ++++++++++--------------------------------------------- 1 file changed, 10 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index e150802..dc9ba36 100644 --- a/README.md +++ b/README.md @@ -1,60 +1,25 @@ -# Speckle Automate function template - Python +# Blender <> Automate -This is a template repository for a Speckle Automate functions written in python -using the [specklepy](https://pypi.org/project/specklepy/) SDK to interact with Speckle data. +Speckle Automate unlocks new potentials for running Blender in the cloud. -This template contains the full scaffolding required to publish a function to the automate environment. -Also has some sane defaults for a development environment setups. - -## Getting started - -1. Use this template repository to create a new repository in your own / organization's profile. - -Register the function - -### Add new dependencies - -To add new python package dependencies to the project, use: -`$ poetry add pandas` - -### Change launch variables - -describe how the launch.json should be edited - -### Github Codespaces - -create new repo from template, and use the create new code - - -### Local dev environment - - - - -# Archive - -This is a simple example of how to use the Speckle Automate Python package to automate the creation of a Speckle stream. +This function uses Blender's redering engine *Cycles* this automate function produces global illumation renders for each 3d view/camera in your versioned Speckle data. ## Using this Speckle Function 1. [Create](https://automate.speckle.dev/) a new Speckle Automation. 1. Select your Speckle Project and Speckle Model. -1. Select the existing Speckle Function named [`Random comment on IFC beam`](https://automate.speckle.dev/functions/e110be8fad). -1. Enter a phrase to use in the comment. +1. Select the existing Speckle Function named [`Rblender-automate`](https://automate.speckle.dev/functions/fe6015a999). 1. Click `Create Automation`. -## Getting Started with creating your own Speckle Function -1. [Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repository. -1. [Clone](https://docs.github.com/en/get-started/quickstart/fork-a-repo#cloning-your-forked-repository) your forked repository to your development environment, or use [GitHub CodeSpaces](https://github.com/features/codespaces). -1. [Register](https://automate.speckle.dev/) your Function with [Speckle Automate](https://automate.speckle.dev/). -1. After completing the registration of the Function you will be shown a Function Publish Token and a Function ID. You will need these later. -1. Save your Function Publish Token as a [GitHub Action Secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) named `SPECKLE_AUTOMATE_FUNCTION_PUBLISH_TOKEN`. -1. Save your Function ID as a [GitHub Action Secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) named `SPECKLE_AUTOMATE_FUNCTION_ID`. -1. Make changes to your Function in `main.py`. See below for the Developer Requirements, and instructions on how to test. -1. Every commit to `main` branch will create a new version of your Speckle Function. +## Repostructure + +The function entry point is `main.py` following the structure of the [speckle_automate_python_example](https://github.com/specklesystems/speckle_automate_python_example) +The function serializes an `automate_data.json` file with the required data to receive the Speckle data within a Blender subprocess running the Speckle Blender connector. +`speckle_import.py` runs within the Blender context, receiving speckle data, applying material styalisation, replacing Speckle Rooms with point lights, and rendering each camera to the `./Screenshots` folder. Automate will then pickup and attach these renders as blobs to the automate result. + ## Developer Requirements From 2e2de2fb231a5b08bd768e5b22e09d930fba9be5 Mon Sep 17 00:00:00 2001 From: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com> Date: Thu, 26 Oct 2023 21:48:12 +0100 Subject: [PATCH 2/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dc9ba36..a305cc6 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ This function uses Blender's redering engine *Cycles* this automate function pro 1. [Create](https://automate.speckle.dev/) a new Speckle Automation. 1. Select your Speckle Project and Speckle Model. -1. Select the existing Speckle Function named [`Rblender-automate`](https://automate.speckle.dev/functions/fe6015a999). +1. Select the existing Speckle Function named [`blender-automate`](https://automate.speckle.dev/functions/fe6015a999). 1. Click `Create Automation`. From 2b71739396324de1ea114b5867277362f735361d Mon Sep 17 00:00:00 2001 From: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com> Date: Wed, 1 Nov 2023 11:06:25 +0000 Subject: [PATCH 3/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a305cc6..6bd1f6a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Speckle Automate unlocks new potentials for running Blender in the cloud. -This function uses Blender's redering engine *Cycles* this automate function produces global illumation renders for each 3d view/camera in your versioned Speckle data. +This Speckle Function uses Blender's rendering engine *Cycles* to produce global illumation renders for each 3d view/camera in your versioned Speckle data. ## Using this Speckle Function From 15a501ae0ff695bab80daa28214017e9ab5cd461 Mon Sep 17 00:00:00 2001 From: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com> Date: Wed, 1 Nov 2023 11:06:55 +0000 Subject: [PATCH 4/5] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6bd1f6a..0414f55 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,10 @@ This Speckle Function uses Blender's rendering engine *Cycles* to produce global ## Repostructure -The function entry point is `main.py` following the structure of the [speckle_automate_python_example](https://github.com/specklesystems/speckle_automate_python_example) +The function entry point is `main.py` following the structure of the [speckle_automate_python_example](https://github.com/specklesystems/speckle_automate_python_example). + The function serializes an `automate_data.json` file with the required data to receive the Speckle data within a Blender subprocess running the Speckle Blender connector. + `speckle_import.py` runs within the Blender context, receiving speckle data, applying material styalisation, replacing Speckle Rooms with point lights, and rendering each camera to the `./Screenshots` folder. Automate will then pickup and attach these renders as blobs to the automate result. From b3023289f7a4c785db3853e2b30f60a09bf474b9 Mon Sep 17 00:00:00 2001 From: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com> Date: Wed, 1 Nov 2023 11:07:55 +0000 Subject: [PATCH 5/5] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0414f55..aa42f0d 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ The function serializes an `automate_data.json` file with the required data to r 1. Install the following: - [Python 3](https://www.python.org/downloads/) - [Poetry](https://python-poetry.org/docs/#installing-with-the-official-installer) + - [Blender 3.X](https://www.blender.org/) 1. Run `poetry shell && poetry install` to install the required Python packages. ## Building and Testing