Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
231 commits
Select commit Hold shift + click to select a range
9b5e92d
Make the addon load with the installed Mitsuba 3.9 wheel
wjakob Jul 12, 2026
ab0a606
Add pytest-in-Blender test harness with smoke tests
wjakob Jul 12, 2026
376f9ba
Fix mean extraction in the z-test comparison fixture
wjakob Jul 12, 2026
b9136c3
Repair the final render path so F12 works again
wjakob Jul 12, 2026
9d39abe
Plumb the export target directory through the exporter
wjakob Jul 12, 2026
443183b
Fix importer crashes on emitters and mask BSDFs
wjakob Jul 12, 2026
99998b4
Rename the addon package to mitsuba_blender
wjakob Jul 12, 2026
4d08d8c
Make test harness addon cleanup idempotent
wjakob Jul 12, 2026
41f1e7f
Convert the addon into a Blender extension
wjakob Jul 12, 2026
bd6139c
Delete the module reload boilerplate
wjakob Jul 12, 2026
4a7d6e9
Add a packaging test for the extension build
wjakob Jul 12, 2026
0e2254f
Replace the generated plugin properties with hand-written groups
wjakob Jul 12, 2026
93f4d30
Confine Blender version checks to a new compat module
wjakob Jul 12, 2026
ca9026c
Add a double-toggle registration test
wjakob Jul 12, 2026
b57c128
Export meshes through mi.Mesh instead of the DNA bridge
wjakob Jul 12, 2026
6e08e07
Instance repeated meshes via session_uid deduplication
wjakob Jul 12, 2026
63df5ff
Import shapes through mi.Mesh instead of vendored loaders
wjakob Jul 12, 2026
e326f97
Add a golden render test with a committed EXR reference
wjakob Jul 12, 2026
880c9f7
Add constant folding for material node subgraphs
wjakob Jul 12, 2026
a2ebb6f
Route material export through a converter registry
wjakob Jul 12, 2026
ba6ef6f
Route material import through a converter registry
wjakob Jul 12, 2026
8c143b8
Add a Principled BSDF export converter
wjakob Jul 12, 2026
9d5fc06
Add a principled BSDF import converter
wjakob Jul 12, 2026
04c2c1c
Add export converters for the basic Cycles BSDF nodes
wjakob Jul 12, 2026
f9126b7
Add import converters for Mitsuba's basic BSDF plugins
wjakob Jul 12, 2026
7dd9b93
Add export converters for shader combinator nodes
wjakob Jul 12, 2026
e515218
Add import converters for Mitsuba BSDF combinators
wjakob Jul 12, 2026
7a04216
Add texture and vector-input converters for material export
wjakob Jul 12, 2026
dfea344
Add importers for Mitsuba textures and normal/bump wrappers
wjakob Jul 12, 2026
9fce054
Correct pixel handling for in-memory and unsaved images
wjakob Jul 12, 2026
33d8d0e
Add round-trip tests for textured materials
wjakob Jul 12, 2026
3e6008f
Add a light exporter in the convert layer
wjakob Jul 12, 2026
6b42827
Add a light importer in the convert layer
wjakob Jul 12, 2026
8233f68
Add a world exporter in the convert layer
wjakob Jul 12, 2026
4a50de1
Add a world importer in the convert layer
wjakob Jul 12, 2026
d0fdae3
Switch scene export to the convert-layer light and world modules
wjakob Jul 12, 2026
7368b1b
Switch scene import to the convert-layer light and world modules
wjakob Jul 12, 2026
b49aa17
Route all material export through the converter registry
wjakob Jul 12, 2026
6f1d3cd
Route all material import through the converter registry
wjakob Jul 12, 2026
ae42695
Fold the diffuse converter into basic.py
wjakob Jul 12, 2026
b114fc6
Wire BSDF Normal inputs through convert_normal_input
wjakob Jul 12, 2026
456ce09
Save and restore overridden texture converters in tests
wjakob Jul 12, 2026
a75d46c
Add a reflective principled XML roundtrip test
wjakob Jul 12, 2026
656f147
Import pure area emitter shapes as Blender lights
wjakob Jul 12, 2026
95b2b12
Export cameras through the convert layer
wjakob Jul 12, 2026
71bf5c5
Import sensors through the convert layer
wjakob Jul 12, 2026
46e0b35
Never abort the import on unsupported content
wjakob Jul 12, 2026
652e479
Make render-settings import opt-in
wjakob Jul 12, 2026
a760d2b
Delete the legacy test harness and dead exporter code
wjakob Jul 12, 2026
7c6fa08
Run Mitsuba renders on a worker thread with progress and cancel
wjakob Jul 12, 2026
10480e2
Declare render passes with matching channel identifiers
wjakob Jul 12, 2026
1bbd7ac
Surface export warnings after rendering and exporting
wjakob Jul 12, 2026
5822363
Support running the tests against a local Mitsuba build
wjakob Jul 12, 2026
c9f86ad
Rewrite the CI test workflow around the new harness
wjakob Jul 12, 2026
3ef4053
Bundle Mitsuba wheels into the release extension builds
wjakob Jul 12, 2026
4bcd6ca
Rewrite the README for the extension era
wjakob Jul 12, 2026
ff037a7
Skip meshes without faces during export
wjakob Jul 12, 2026
0f12835
Export faces of empty material slots with the default BSDF
wjakob Jul 12, 2026
e72aeee
Delete dead helpers left over from the restructure
wjakob Jul 12, 2026
af9a13c
Parse the scene XML before touching the Blender scene
wjakob Jul 12, 2026
7f61653
Skip reference properties when probing conductor reflectance
wjakob Jul 12, 2026
4ad6782
Survive meshes whose invalid faces are deleted by validate()
wjakob Jul 12, 2026
ad73783
Extend the never-crash contract to shape and sensor converters
wjakob Jul 12, 2026
f8b667d
Import the children of merge nodes produced by Merge Shapes
wjakob Jul 12, 2026
94de70d
Compose sphere center/radius with to_world on import
wjakob Jul 12, 2026
63dbae6
Skip scene-level samplers, films and rfilters in the root pass
wjakob Jul 12, 2026
9abc8a5
Keep earlier imports when importing into a new scene
wjakob Jul 12, 2026
f911c99
Read emitter radiance directly instead of via get_emissive_texture
wjakob Jul 12, 2026
76014ad
Share one radiance-splitting helper across lights, world and materials
wjakob Jul 12, 2026
195d384
Delete dead parameters from the import entry path
wjakob Jul 12, 2026
655db4f
Table-drive the disk, rectangle and cube importers
wjakob Jul 12, 2026
7ccb0f9
Guard socket tracing and folding against link cycles
wjakob Jul 12, 2026
670d8e9
Export shared emissive meshes as plain shapes, not a shapegroup
wjakob Jul 12, 2026
a8a8590
Guard scene.cycles reads against a disabled Cycles addon
wjakob Jul 12, 2026
ec1a2ce
Sanitize part names built from material names
wjakob Jul 12, 2026
3ded387
Route world envmap export through the texture converter
wjakob Jul 12, 2026
366473b
Clamp out-of-range material indices instead of dropping faces
wjakob Jul 12, 2026
74c8d98
Sanitize Color Attribute names in mesh_attribute references
wjakob Jul 12, 2026
6375576
Run mode_set in the export operator, not in scene_to_dict
wjakob Jul 12, 2026
d277e37
Simplify ExportContext.spectrum to the cases that exist
wjakob Jul 12, 2026
79825f8
Replace ExportedMaterialsCache with a plain dict
wjakob Jul 12, 2026
30cdf6e
Trim vestigial ExportContext state
wjakob Jul 12, 2026
e10dc29
Use a resources entry instead of resolver juggling in dict_to_scene
wjakob Jul 12, 2026
66c5429
Drop the bpy import left unused by the mode_set move
wjakob Jul 12, 2026
b70dc30
Bundle wheels for Python 3.13 alongside 3.11
wjakob Jul 12, 2026
1a9d32f
Keep parse_file from leaking <path> directories into the resolver
wjakob Jul 12, 2026
462e832
Route use_nodes through compat.py
wjakob Jul 12, 2026
ae34a82
Read <path> directories from the parser state when available
wjakob Jul 13, 2026
240b33c
Isolate the test harness from the user's Blender profile
wjakob Jul 13, 2026
180cede
Render correctly under monochrome and polarized variants
wjakob Jul 13, 2026
5ba7e04
Install-test the wheel-bundled release zips
wjakob Jul 13, 2026
4982a60
Let a broken daily Blender fail the weekly cron run
wjakob Jul 13, 2026
15dea81
Stop running the test matrix twice on master pushes
wjakob Jul 13, 2026
4aac7f3
Weld exported meshes with Mesh.from_corners when available
wjakob Jul 13, 2026
9f4f946
Generate UV coordinates for imported analytic shapes
Arthur926564 Jul 23, 2026
2169f82
fix: the UV for the sphere shape were upside down
Arthur926564 Jul 23, 2026
2575fa7
Support node groups in material export
Arthur926564 Jul 24, 2026
c712faf
added tests for groups node
Arthur926564 Jul 24, 2026
3676126
Migrate combinators.py to NodeRef
Arthur926564 Jul 28, 2026
6429980
Added a comment to notify the choice of having a translation from MUL…
Arthur926564 Jul 28, 2026
1d5dfd4
Vectorize sphere UV computation with numpy
Arthur926564 Jul 28, 2026
ecfc457
Fix group stack handling in world export, clarify mapping function name
Arthur926564 Jul 28, 2026
d83d08e
Add tests for Group nodes and Materials, also update the tests to use…
Arthur926564 Jul 28, 2026
721ad72
Strip object scale from perspective camera transform on export
Arthur926564 Jul 28, 2026
230a936
Add UV coordinates to imported disks and share the UV construction
Arthur926564 Aug 4, 2026
054f648
Export unsupported color inputs as an error color
Arthur926564 Aug 5, 2026
a28aff5
Added Mitsuba texture plugin for Math, Mix, ColorRamp, RGBCurve and H…
Arthur926564 Aug 6, 2026
8848ded
fix the HUE converter node type name
Arthur926564 Aug 6, 2026
1daf5c5
Port the add-on to the rewritten Mitsuba ``Mesh``
wjakob Aug 7, 2026
cdd7644
fix, made the DIVIDE operation more robust to NaN values
Arthur926564 Aug 10, 2026
329db75
Adapt import paths to the new Mitsuba path API (patch from Wenzel)
Arthur926564 Aug 10, 2026
13abb18
fix: exporting into a xml file exports in-memory bitmaps into images …
Arthur926564 Aug 10, 2026
6977310
add texture plugins invert and brightness_contrast
Arthur926564 Aug 11, 2026
f40d68e
fix made the texture plugins mode robust to division by zero
Arthur926564 Aug 11, 2026
8a3900e
add eval_1_grad into mix texture plugin
Arthur926564 Aug 11, 2026
5b46c07
refactor get_texture inside plugins tree
Arthur926564 Aug 11, 2026
af215c1
remove unnecessary folders, the upcomming goal will be to not use any…
Arthur926564 Aug 11, 2026
02f9191
export images to disk on the render path
Arthur926564 Aug 11, 2026
5c8d878
Reuse exported textures across renders
Arthur926564 Aug 11, 2026
217bdb4
Build the same scene dict for rendering and XML export
Arthur926564 Aug 12, 2026
229fd05
Approximate textured scalar sockets by samping
Arthur926564 Aug 12, 2026
fc3c93d
Add rgb_to_bow texture
Arthur926564 Aug 12, 2026
dba3cbc
add converter for gamma and clamp Shader node, remove dead folders
Arthur926564 Aug 12, 2026
b3ddbd9
Replace constant folding with texture plugins
Arthur926564 Aug 13, 2026
11daa77
update gitignore
Arthur926564 Aug 14, 2026
e2cb7b9
fix: the error color was updated for debugging purpose, I forgot to t…
Arthur926564 Aug 14, 2026
a822be8
rename tests to match the current addon
Arthur926564 Aug 14, 2026
01b907f
update common.py as has_property has been removed from mitsuba (depre…
Arthur926564 Aug 14, 2026
a422fbb
update comments
Arthur926564 Aug 14, 2026
6b29107
Return zero for Object Info instead of failing
Arthur926564 Aug 14, 2026
6a84c73
Add strict and relaxed export modes
Arthur926564 Aug 14, 2026
576aa33
Name curve table by content hash
Arthur926564 Aug 14, 2026
af37410
Refactor texture converters, update the tests to the new strict mode
Arthur926564 Aug 14, 2026
18e900a
add docstrings and refactor the texture plugins
Arthur926564 Aug 17, 2026
9979b40
fix: remove the '\' file
Arthur926564 Aug 17, 2026
2c55936
fix: add import in math.py and corrected get_texture arguments in mix.py
Arthur926564 Aug 17, 2026
1ebed07
fix: removed grease pencil from the ui, there is no Mitsuba represent…
Arthur926564 Aug 17, 2026
bc62c74
add warning on export when the distribution doesn't have a direct tra…
Arthur926564 Aug 17, 2026
e9b88ed
fix: ERROR color should not be used outside the ERROR bsdf
Arthur926564 Aug 17, 2026
257bd99
fix hue_saturation and matched it to blender's internal node
Arthur926564 Aug 17, 2026
776d6b3
Refactor convert/
Arthur926564 Aug 17, 2026
562ff55
fix: Glossy roughness to alpha conversion
Arthur926564 Aug 17, 2026
e6265f0
fix glossy with texture input test
Arthur926564 Aug 19, 2026
eba2e87
add to_string to all plugins, refactor some docstrings
Arthur926564 Aug 19, 2026
ec91952
Apply the axis conversion when rendering
Arthur926564 Aug 20, 2026
7b96cc8
update README
Arthur926564 Aug 19, 2026
a122330
Support the Normal Map node's strength
Arthur926564 Aug 20, 2026
0f5268e
remove call to _constant_input in bump map converter
Arthur926564 Aug 20, 2026
47693f9
Remove legacy constant vector exporter
Arthur926564 Aug 20, 2026
6d2d92d
Remove unused imports
Arthur926564 Aug 20, 2026
78b3d50
Scale a textured emission color by the strength
Arthur926564 Aug 20, 2026
a6b8090
Fix: need to eval_1 strength inside eval_3 of normal_map
Arthur926564 Aug 21, 2026
9789a8a
Move the addon preferences out of __init__.py
Arthur926564 Aug 21, 2026
1e4a9e2
Add tests for axis conversion
Arthur926564 Aug 21, 2026
ced1d4a
add is_spatially_varying method to all texture plugins
Arthur926564 Aug 21, 2026
728d743
Evaluate constant subgraphs exactly for scalar and vector sockets
Arthur926564 Aug 21, 2026
a258106
Tidy the texture plugins and add dosctring for scalar/vector_from_socket
Arthur926564 Aug 21, 2026
cacc994
update README
Arthur926564 Aug 24, 2026
bbe69e5
add texture noise to the exporter
Arthur926564 Aug 24, 2026
ca3bf6f
Fix: in mapping nodes, some vector_type doesn't have a "location" inp…
Arthur926564 Aug 24, 2026
23512c3
Read the shading position directly when Noise has no Vector input
Arthur926564 Aug 25, 2026
7c11401
Stop using TEX_NOISE texture as the unsupported node in tests
Arthur926564 Aug 25, 2026
236cd9c
register the TEX_NOISE plugin
Arthur926564 Aug 25, 2026
a4ac4f8
Update README
Arthur926564 Aug 25, 2026
9a1c6d5
Fix: allow ADD and MIX BSDF to take only one input
Arthur926564 Aug 25, 2026
04f44da
add node LIGHT_PATH to the exporter
Arthur926564 Aug 25, 2026
2097d51
Start of fix to the light brightness problem
Arthur926564 Aug 25, 2026
e67fa2f
add test about the strength/scale of emitter in the exporter
Arthur926564 Aug 26, 2026
5e80788
Support Alpha of Image Texture nodes
Arthur926564 Aug 27, 2026
9e496b0
Fix None check order in _wrap_normalmap
Arthur926564 Aug 27, 2026
eef3668
Return constant fallback for Ambient Occlusion nodes
Arthur926564 Aug 27, 2026
3f2d278
Resolve relative texture paths before mi.load_dict in scalar_from_socket
Arthur926564 Aug 27, 2026
df30944
Fix default background detection ignoring user-configured worlds
Arthur926564 Aug 27, 2026
f6f0738
Reject grayscale images in normal map nodes at export time
Arthur926564 Aug 27, 2026
17a5506
Support pip-installable plugin discovery via entry points
Arthur926564 Aug 27, 2026
433a32a
Moved the fallback logic from texture to resolver for unsupported node
Arthur926564 Aug 27, 2026
06aeab8
Update and refactor all traverse and parameters_changed functions ins…
Arthur926564 Aug 27, 2026
2653a2b
Resolve relative texture path before mi.load_dict in vector_from_socket
Arthur926564 Aug 27, 2026
37e12a6
Print full traceback on material conversion errors behind debug flag
Arthur926564 Aug 27, 2026
9981f8b
update test to the new support of alpha in normalmap
Arthur926564 Aug 27, 2026
2af099d
Fix assorted bugs found during code review
Arthur926564 Aug 27, 2026
5ece4fa
Refactor return statements in import convert_mi_* functions
Arthur926564 Aug 28, 2026
b59c89d
update docstrings
Arthur926564 Aug 28, 2026
8fd74eb
Refactor TEX_IMAGE exporter
Arthur926564 Aug 28, 2026
7d80b94
Use Mitsuba's new C++ math texture plugin (mitsuba3#1944)
Arthur926564 Aug 28, 2026
0940953
Use rgb() from the updated C++ math plugin
Arthur926564 Aug 28, 2026
94be7ae
Use luminance() from the updated C++ math plugin
Arthur926564 Aug 28, 2026
5c29781
Use math expressions for RGB Separate Color, keep Python plugin for H…
Arthur926564 Aug 28, 2026
d56a88d
Remove invert python plugin and use C++ math texture plugin instead
Arthur926564 Aug 28, 2026
75a1d56
Relax the rgb_to_bw test tolerance to account for floating point diff…
Arthur926564 Aug 28, 2026
8eb0eec
Allow scaled textured emission color in principled BSDF
Arthur926564 Aug 29, 2026
7b5a509
Fix: use the dict instead of the texture itself
Arthur926564 Aug 29, 2026
6897b28
resolve FIXME in vect_math plugin by raising when missing op
Arthur926564 Aug 28, 2026
d43cb89
fix: the strength of the emitter inside a principled BSDF was always …
Arthur926564 Aug 31, 2026
81c2bdb
Enable two-sided emission on area emitters
Arthur926564 Sep 1, 2026
6153f4d
Export per-object camera visibility as emitter visible flag
Arthur926564 Sep 1, 2026
33bbdf3
Don't attach material names to shapes unless a shape has multiple mat…
wjakob Sep 1, 2026
6b82aa1
Exporter handles object's camera visibility
Arthur926564 Sep 1, 2026
2c24c08
Update principled BSDF in order to match the visible and twosided flags
Arthur926564 Sep 1, 2026
912a64f
Change order in checkerboard texture to match Blender
Arthur926564 Sep 1, 2026
2e8d790
FIX: missing return statement and typo inside default_null_bsdf_id
Arthur926564 Sep 2, 2026
742b33a
convert_parts objects with len(slots) == 0 or slot.material is None a…
Arthur926564 Sep 2, 2026
10a69a6
Create a fallback for NewGeometry node
Arthur926564 Sep 2, 2026
73cc3cf
Resolve file path by basename when the full path doesn't exist
Arthur926564 Sep 2, 2026
8978deb
Add twosided to all area lights
Arthur926564 Sep 2, 2026
5b5fa3b
Resolve relative filenames resursively before instantiating textures
Arthur926564 Sep 2, 2026
6898a68
Search sibling datablocks when pixel data is missing
Arthur926564 Sep 2, 2026
f5075fd
Update test in order to match that area emitters are two-sided
Arthur926564 Sep 2, 2026
bce5927
update README
Arthur926564 Sep 2, 2026
a7c6cf6
Fix zero-emission fallback to return black diffuse BSDF on area lights
Arthur926564 Sep 2, 2026
2ab8e02
Skip invisible objects without emitters, use black diffuse for invisi…
Arthur926564 Sep 3, 2026
9be0641
Import shapes with a black placeholder BSDF as Blender lights
Arthur926564 Sep 3, 2026
54ec452
Update light-export test to match the new emitter diffuse BSDF
Arthur926564 Sep 3, 2026
8399078
Fix: convert_add must returns shader dict instead of NodeRef in every…
Arthur926564 Sep 3, 2026
083d9d0
Fix: place Red Blue Green into the R, G, B slots respectively inside …
Arthur926564 Sep 3, 2026
3d4e92d
Fix: convert_mix misses stack=ref.stack on the factor float socket
Arthur926564 Sep 3, 2026
cfbb7fe
Fix: in vect_math.py, use dr.minimum/dr.maximum instead dr.min/dr.max
Arthur926564 Sep 3, 2026
3a9681c
Move the definition of ConstantVector inside the register factory
Arthur926564 Sep 3, 2026
9690355
Fix: ConstantVector is not accessible from the file itself. Look it u…
Arthur926564 Sep 3, 2026
e754805
Fix: convert_map_range vector branch KeyErrors when Steps isn't present
Arthur926564 Sep 3, 2026
f002cba
Remove dead code and unused imports
Arthur926564 Sep 3, 2026
de7ee4d
Fix: typos
Arthur926564 Sep 3, 2026
d24a3e8
Remove legacy math texture plugin
Arthur926564 Sep 3, 2026
25f9cb5
Fix typo inside io directory
Arthur926564 Sep 3, 2026
4db9591
Add default active set to true inside texture plugins
Arthur926564 Sep 3, 2026
ac6dd18
Switch order of checks in export_image for in blend file images
Arthur926564 Sep 3, 2026
61191d6
Add log when using siblings image in export_image
Arthur926564 Sep 3, 2026
5f28b61
Fix: use absolute filename in vector_from_socket
Arthur926564 Sep 3, 2026
eb3faa3
Use vector_from_socket instead of using the default value for princip…
Arthur926564 Sep 3, 2026
f067814
Refactor BSDF handling inside light exporter
Arthur926564 Sep 3, 2026
ef90a64
Remove the shared empty-emitter-bsdf placeholder
Arthur926564 Sep 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions .github/workflows/nightly_release.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
# This workflow runs on every commit on the master branch. It runs the test suite
# and packages the add-on. It then updates the "nightly release" in the release section
# of the repository.
# Runs on every commit on the master branch. It runs the test suite, builds
# the extension zips, and updates the rolling "nightly" release.
name: Nightly Release

# Triggers the workflow on pushes on the master branch
on:
push:
branches: [master]

# Workflow steps
jobs:
tests:
uses: ./.github/workflows/test.yml

package:
name: "Package Release"
release:
name: "Publish nightly release"
needs: [tests]
runs-on: "ubuntu-latest"
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Git checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v2

- name: Create package
run: python release/package.py
- name: Download the extension zips
uses: actions/download-artifact@v4
with:
name: extension-zips
path: dist

- name: Advance `latest` tag
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
try {
Expand All @@ -55,7 +54,7 @@ jobs:
prerelease: true
allowUpdates: true
replacesArtifacts: true
artifacts: "mitsuba-blender.zip"
artifacts: "dist/*.zip"
artifactErrorsFailBuild: true
tag: "latest"
bodyFile: "release/nightly_release_body.md"
37 changes: 16 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,38 @@
# This workflow runs on every pushed version tags. It runs the tests and
# packages the release. It then creates a new entry in the release section
# of the repo.
# Runs on every pushed version tag. It runs the test suite, builds the
# extension zips, and creates a new draft entry in the release section.
name: Release

# Triggers the workflow on tags with a specific format
on:
push:
tags:
- v*

# Workflow steps
jobs:
tests:
uses: ./.github/workflows/test.yml
package:
name: "Package Release"

release:
name: "Publish draft release"
needs: [tests]
runs-on: "ubuntu-latest"
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Git checkout
uses: actions/checkout@v2

- name: Query Git Tag
id: git-tag
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
uses: actions/checkout@v4

- name: Setup Python
uses: "actions/setup-python@v2"

- name: Create package
run: python release/package.py
- name: Download the extension zips
uses: actions/download-artifact@v4
with:
name: extension-zips
path: dist

- name: Create GitHub draft release
uses: ncipollo/release-action@v1
with:
artifacts: "mitsuba-blender.zip"
artifacts: "dist/*.zip"
artifactErrorsFailBuild: true
bodyFile: "release/release_body_template.md"
draft: true
name: "Mitsuba-Blender ${{ steps.git-tag.outputs.tag }}"
name: "Mitsuba-Blender ${{ github.ref_name }}"
136 changes: 77 additions & 59 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,91 +1,109 @@
# This workflow runs on every pull request and push on any other branch other than master.
# It executes the test suite on different environments to validate the add-on.
# Runs the test suite inside headless Blender and builds the extension zip.
name: Test suite

# Triggers the workflow on pull requests created for the master branch as well as
# push events on other branches than master.
on:
push:
branches:
- master
# Master pushes are covered by nightly_release.yml, which calls this
# workflow; a push trigger here would run the whole matrix twice.
# No branch filter, so pull requests against any base branch run the suite.
pull_request:
branches: [ master ]
workflow_call:
schedule:
# The weekly run additionally tests the daily Blender development build.
- cron: '0 5 * * 1'

# Supersede in-flight runs when a pull request is updated.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

# Workflow steps
jobs:
build:
name: "${{ matrix.environment.os }} | Blender ${{ matrix.blender.version }}"
runs-on: ${{ matrix.environment.os }}
test:
name: "Blender ${{ matrix.blender-version }}"
runs-on: ubuntu-latest
# The daily Blender build only runs on the weekly schedule, so letting it
# fail the (scheduled) workflow is the early-warning signal we want; it
# never gates pull requests or releases.
strategy:
# Do not stop other jobs if one fails
fail-fast: false
matrix:
environment:
- {
os: "ubuntu-latest",
mitsuba-version: "3.7.1"
}
- {
os: "windows-latest",
mitsuba-version: "3.7.1"
}
blender:
- {
version: "3.6",
python-version: "3.10"
}
- {
version: "4.2",
python-version: "3.11"
}
- {
version: "4.5",
python-version: "3.11"
}
blender-version: ${{ fromJSON(github.event_name == 'schedule' && '["4.2", "4.5", "daily"]' || '["4.2", "4.5"]') }}

steps:
- name: Git checkout
uses: actions/checkout@v4

- name: Setup Python
uses: "actions/setup-python@v2"
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.blender.python-version }}
python-version: '3.11'

- name: Install Python dependencies
- name: Install host Python dependencies
run: python -m pip install --upgrade requests

- name: Retrieve Blender full version
id: blender-version
shell: bash
run: |
echo "::set-output name=BLENDER_VERSION::$(python scripts/blender_downloader.py ${{ matrix.blender.version }} --print-version)"
run: echo "version=$(python scripts/blender_downloader.py ${{ matrix.blender-version }} --print-version)" >> "$GITHUB_OUTPUT"

- name: Cache Blender archive
id: cache-blender
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: blender
key: ${{ matrix.environment.os }}-${{ steps.blender-version.outputs.BLENDER_VERSION }}-v1
key: ${{ runner.os }}-${{ steps.blender-version.outputs.version }}

- name: Download Blender
if: steps.cache-blender.outputs.cache-hit != 'true'
run: python scripts/blender_downloader.py ${{ matrix.blender.version }} -o blender
run: python scripts/blender_downloader.py ${{ matrix.blender-version }} -o blender

- name: Install Blender dependencies
shell: bash
run: |
BLENDER_PYTHON=$(find blender/ -regextype posix-extended -regex '.*bin\/python(.exe|[0-9].[0-9]{1,2}m?)' -print -quit)
echo "Blender Python is $BLENDER_PYTHON"
./$BLENDER_PYTHON -m ensurepip
./$BLENDER_PYTHON -m pip install -U pip
./$BLENDER_PYTHON -m pip install --upgrade pytest pytest-cov
./$BLENDER_PYTHON -m pip install mitsuba==${{ matrix.environment.mitsuba-version }} --force-reinstall

- name: Run Addon test suite
shell: bash
- name: Install test dependencies into Blender's Python
run: |
BLENDER_EXECUTABLE=$(find blender/ -maxdepth 1 -regextype posix-extended -regex '.*blender(.exe)?' -print -quit)
echo "Blender Executable is $BLENDER_EXECUTABLE"
./$BLENDER_EXECUTABLE -b -noaudio --factory-startup --python scripts/run_tests.py -- -v --cov=mitsuba-blender
blender_python=$(find blender -path '*/python/bin/python3*' -type f -print -quit)
echo "Blender Python is $blender_python"
"$blender_python" -m ensurepip
"$blender_python" -m pip install --upgrade pip
"$blender_python" -m pip install pytest mitsuba==3.9.0

- name: Run the test suite
run: BLENDER="$PWD/blender/blender" python tests/run.py --all

package:
name: Package extension
needs: test
runs-on: ubuntu-latest

steps:
- name: Git checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install host Python dependencies
run: python -m pip install --upgrade requests

- name: Retrieve Blender full version
id: blender-version
run: echo "version=$(python scripts/blender_downloader.py 4.2 --print-version)" >> "$GITHUB_OUTPUT"

- name: Cache Blender archive
id: cache-blender
uses: actions/cache@v4
with:
path: blender
key: ${{ runner.os }}-${{ steps.blender-version.outputs.version }}

- name: Download Blender
if: steps.cache-blender.outputs.cache-hit != 'true'
run: python scripts/blender_downloader.py 4.2 -o blender

- name: Build the extension with bundled wheels
run: python release/build_extension.py --blender blender/blender --output-dir dist

- name: Upload the extension zips
uses: actions/upload-artifact@v4
with:
name: extension-zips
path: dist/*.zip
if-no-files-found: error
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tests/**/out
blender/
blender-*.tar.xz
.coverage.*
*.serialized
Loading
Loading