Skip to content

Commit 9f4e62e

Browse files
committed
Merge branch 'for_v2.10'
2 parents 66126de + 97664da commit 9f4e62e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+1312
-1304
lines changed
Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: ''
4+
title: '[Bug Report] '
55
labels: ''
66
assignees: ''
77

88
---
99

10-
.blend file:
10+
Please describe the differences between the expected and observed results:
1111

1212

1313
Steps to reproduce:
1414

1515

16+
Please provide a simple test scene as a .blend-file:
17+
18+
1619
Screenshots or rendered images:
1720

1821

1922
Error message from Blender console:
2023

2124

22-
OS:
25+
Operating System:
2326
Blender version:
24-
LuxCore version:
27+
BlendLuxCore version:
28+
Pyluxcore version:
29+
CPU and GPU model:

.github/ISSUE_TEMPLATE/feature-request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4-
title: ''
4+
title: '[Feature request] '
55
labels: ''
66
assignees: ''
77

.github/ISSUE_TEMPLATE/question.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Question
33
about: Ask a question
4-
title: ''
4+
title: '[Question] '
55
labels: ''
66
assignees: ''
77

.github/workflows/build_bundle.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# SPDX-FileCopyrightText: 2025 Howetuft, Johannes Hinrichs (CodeFHD)
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: BlendLuxCore Build Bundle
6+
7+
on:
8+
pull_request:
9+
inputs:
10+
build_type:
11+
required: false
12+
type: string
13+
default: "Latest"
14+
workflow_call:
15+
inputs:
16+
build_type:
17+
required: true
18+
type: string
19+
default: "Latest"
20+
21+
jobs:
22+
build_bundle:
23+
name: Build bundle
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
28+
- name: Checkout main repository
29+
uses: actions/checkout@v4
30+
31+
- name: Prepare Blender install
32+
uses: gerlero/apt-install@v1
33+
with:
34+
packages: libxxf86vm1 libxfixes3 libxi6 libxkbcommon0 libgl1
35+
36+
- name: Prepare Python
37+
run: touch requirements.txt
38+
39+
- name: Set up Python
40+
uses: actions/setup-python@v5
41+
with:
42+
python-version: '3.11'
43+
44+
- name: Set up Blender
45+
uses: moguri/setup-blender@v1
46+
with:
47+
blender-version: '4.2.8'
48+
49+
- name: Set up cmake
50+
uses: lukka/get-cmake@latest
51+
52+
- name: Package bundle
53+
shell: bash
54+
run: |
55+
build_dir="${{ github.workspace }}/build"
56+
mkdir ${build_dir}
57+
cmake -B ${build_dir} -S . -DCMAKE_BUILD_TYPE=${{ inputs.build_type }}
58+
cmake --build ${build_dir}
59+
60+
- name: Upload artifact
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: "BlendLuxCore"
64+
path: "${{ github.workspace }}/build/BlendLuxCore-*.zip"
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# SPDX-FileCopyrightText: 2025 Howetuft, Johannes Hinrichs (CodeFHD)
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: BlendLuxCore Create Latest Release
6+
7+
on:
8+
push:
9+
branches:
10+
- for_v2.10
11+
workflow_dispatch:
12+
13+
jobs:
14+
build_latest:
15+
name: Build Latest Bundle
16+
uses: ./.github/workflows/build_bundle.yml
17+
with:
18+
build_type: "Latest"
19+
20+
create_release:
21+
name: Create Latest Release
22+
runs-on: ubuntu-latest
23+
needs: build_latest
24+
steps:
25+
26+
- name: Checkout main repository
27+
uses: actions/checkout@v4
28+
29+
- name: Get Bundle
30+
uses: actions/download-artifact@v4
31+
with:
32+
name: "BlendLuxCore"
33+
path: "${{ github.workspace }}/download/"
34+
35+
- name: Update the "latest" tag
36+
uses: richardsimko/update-tag@v1
37+
with:
38+
tag_name: latest
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
42+
- name: Delete old latest release
43+
shell: bash
44+
run: |
45+
echo false > ${{ github.workspace }}/tmp_release_test
46+
gh release list --json name > ${{ github.workspace }}/tmp_releases
47+
jq -r -c .[].name ${{ github.workspace }}/tmp_releases | while read i; do
48+
echo $i
49+
if [[ "$i" = "latest" ]]; then
50+
echo "FOUND"
51+
echo true > "${{ github.workspace }}/tmp_release_test"
52+
fi
53+
done
54+
TESTRESULT=$(cat ${{ github.workspace }}/tmp_release_test)
55+
echo RESULT
56+
echo $TESTRESULT
57+
if [[ $TESTRESULT = 'true' ]]; then
58+
echo DELETE
59+
gh release delete latest
60+
fi
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
64+
- name: Create new release
65+
uses: softprops/action-gh-release@v2
66+
with:
67+
tag_name: latest
68+
files: "${{ github.workspace }}/download/BlendLuxCore-*.zip"
69+
draft: false
70+
prerelease: true
71+
body: "This is the result of automatic compilation of the latest commits.\n\nPlease note that this release may be unstable and is not recommended for production use."
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# SPDX-FileCopyrightText: 2024 Howetuft
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: BlendLuxCore Create Release
6+
7+
on:
8+
release:
9+
types:
10+
- published
11+
12+
jobs:
13+
build_latest:
14+
name: Build Latest Bundle
15+
uses: ./.github/workflows/build_bundle.yml
16+
with:
17+
build_type: "Release"
18+
19+
create_release:
20+
name: Create release
21+
runs-on: ubuntu-latest
22+
needs: build_latest
23+
steps:
24+
25+
- name: Checkout main repository
26+
uses: actions/checkout@v4
27+
28+
- name: Get Bundle
29+
uses: actions/download-artifact@v4
30+
with:
31+
name: "BlendLuxCore"
32+
path: "${{ github.workspace }}/download/"
33+
34+
- name: Release
35+
uses: softprops/action-gh-release@v2
36+
if: github.event_name == 'release'
37+
with:
38+
files: "${{ github.workspace }}/download/BlendLuxCore-*.zip"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ wheels/
1212
# Visual studio files
1313
.vs/
1414
out/
15+
.vscode/
1516

CMakeLists.txt

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# To build extension:
2+
# Get out of the tree, for instance in ..
3+
# cmake -B blc-build -S BlendLuxCore && cmake --build blc-build
4+
5+
cmake_minimum_required(VERSION 3.25)
6+
7+
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
8+
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
9+
if(NOT CMAKE_BUILD_TYPE)
10+
set(CMAKE_BUILD_TYPE "Release")
11+
endif()
12+
13+
project(BlendLuxCore LANGUAGES NONE)
14+
if("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
15+
message(SEND_ERROR "In-source builds are not allowed.")
16+
endif()
17+
18+
function(validate_blender_version result blender)
19+
execute_process(
20+
COMMAND ${blender} --version
21+
OUTPUT_VARIABLE blender_output
22+
)
23+
if (blender_output MATCHES "Blender ([0-9]+\.[0-9]+\.[0-9]+).*")
24+
set(version ${CMAKE_MATCH_1})
25+
message(STATUS "Found Blender - version ${version}")
26+
if (${version} VERSION_LESS "4.2.0")
27+
message(FATAL_ERROR "ERROR: Blender version is not suitable - expected 4.2.0 or higher")
28+
set(${result} FALSE PARENT_SCOPE)
29+
else()
30+
message(STATUS "Blender version OK")
31+
set(${result} TRUE PARENT_SCOPE)
32+
endif()
33+
else()
34+
message(FATAL_ERROR "Blender version: Not found")
35+
set(${result} FALSE PARENT_SCOPE)
36+
endif()
37+
endfunction()
38+
39+
40+
# Get BlendLuxCore version
41+
find_package(Python 3.11 REQUIRED COMPONENTS Interpreter)
42+
if (CMAKE_BUILD_TYPE STREQUAL "Latest")
43+
set(BLC_VERSION "Latest")
44+
else()
45+
execute_process(
46+
COMMAND python
47+
${CMAKE_CURRENT_SOURCE_DIR}/cmake/blendluxcore_version.py
48+
${CMAKE_CURRENT_SOURCE_DIR}/blender_manifest.toml
49+
OUTPUT_VARIABLE BLC_VERSION
50+
)
51+
endif()
52+
53+
find_program(BLENDER blender NAMES blender.exe VALIDATOR validate_blender_version NO_CACHE REQUIRED)
54+
55+
# Add BlendLuxCore target
56+
add_custom_target(
57+
extension ALL ${BLENDER}
58+
--command extension build
59+
--source-dir ${CMAKE_CURRENT_SOURCE_DIR}
60+
--output-filepath ${CMAKE_CURRENT_BINARY_DIR}/BlendLuxCore-${BLC_VERSION}.zip
61+
VERBATIM
62+
)

0 commit comments

Comments
 (0)