Skip to content

Commit 36ec64a

Browse files
authored
Merge pull request #124 from monkeyman192/blender_plugin
Blender plugin
2 parents 5d2e07f + 48f92df commit 36ec64a

170 files changed

Lines changed: 2552 additions & 1459 deletions

File tree

Some content is hidden

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

.github/workflows/pipeline.yml

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,35 +17,43 @@ jobs:
1717
outputs:
1818
nmsdk_version: ${{ steps.get_nmsdk_version.outputs.version }}
1919
steps:
20-
- uses: actions/checkout@v4
21-
- name: Set up Python 3.9
22-
uses: actions/setup-python@v5
20+
- uses: actions/checkout@v6
21+
- name: Set up Python 3.11
22+
uses: actions/setup-python@v6
2323
with:
24-
python-version: "3.9"
24+
python-version: "3.11"
2525
- name: Install dependencies
2626
run: python -m pip install flake8 mkdocs
27-
# - name: Lint code
28-
# run: flake8 .
2927
- name: Build docs
3028
run: mkdocs build
31-
- name: Build release
29+
- name: Install blender
3230
run: |
33-
python ./tools/build.py
34-
Expand-Archive build/nmsdk.zip -DestinationPath ./nmsdk
31+
BLENDER_EXACT_VERSION="5.1.2"
32+
BLENDER_GENERAL_VERSION="5.1"
33+
BLENDER_ARCHIVE="blender-${BLENDER_EXACT_VERSION}-windows-x64.zip"
34+
BLENDER_URL="https://download.blender.org/release/Blender${BLENDER_GENERAL_VERSION}/${BLENDER_ARCHIVE}"
35+
curl -L ${BLENDER_URL} -o ${BLENDER_ARCHIVE}
36+
unzip -qq ${BLENDER_ARCHIVE}
37+
mv blender-${BLENDER_EXACT_VERSION}-windows-x64 blender
38+
ls blender
39+
shell: bash
40+
- name: Build release
41+
run: ./blender/blender.exe --command extension build --source-dir "src\addon\nmsdk"
3542
- name: Get NMSDK tag version
3643
id: get_nmsdk_version
37-
run: echo "version=$(Tools/read_nmsdk_version.sh)" >> $GITHUB_OUTPUT
44+
run: echo "version=$(python get_version.py)" >> $GITHUB_OUTPUT
3845
shell: bash
3946
- name: Upload plugin zip for release
40-
uses: actions/upload-artifact@v4
47+
uses: actions/upload-artifact@v7
4148
with:
42-
name: NMSDK
43-
path: nmsdk
44-
- name: Upload website for release
45-
uses: actions/upload-artifact@v4
46-
with:
47-
name: NMSDK_site
48-
path: html_docs/*
49+
name: NMSDK_plugin
50+
path: nmsdk-${{ steps.get_nmsdk_version.outputs.version }}.zip
51+
archive: false
52+
# - name: Upload website for release
53+
# uses: actions/upload-artifact@v7
54+
# with:
55+
# name: NMSDK_site
56+
# path: html_docs/*
4957
release:
5058
name: Release NMSDK zip and publish docs
5159
# Only run this job if the commit was tagged.
@@ -56,28 +64,21 @@ jobs:
5664
VERSION: ${{ needs.build.outputs.nmsdk_version }}
5765
steps:
5866
- name: Download files for release
59-
uses: actions/download-artifact@v4
67+
uses: actions/download-artifact@v8
6068
with:
61-
name: NMSDK
69+
name: NMSDK_plugin
70+
skip-decompress: true
6271
- name: Get tagged version
6372
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
6473
shell: bash
6574
- name: Upload resources if version matches
6675
if: env.VERSION == env.TAG
67-
uses: softprops/action-gh-release@v2
76+
uses: softprops/action-gh-release@v3
6877
with:
6978
name: "${{ env.TAG }}"
7079
tag_name: ${{ env.TAG }}
71-
prerelease: false
80+
prerelease: ${{ contains(env.VERSION, 'alpha') }}
7281
files: nmsdk.zip
7382
env:
7483
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7584
# TODO: Also upload site.
76-
- name: Check if tag doesn't match version
77-
if: env.VERSION != env.TAG
78-
run: |
79-
echo "There is a version mismatch between the tag and NMSDK version!"
80-
echo "NMSDK version: ${{ env.VERSION }}"
81-
echo "Tag version: ${{ env.TAG }}"
82-
exit 1
83-
shell: bash

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ classes/__pycache__/*
5252
classes/*.pyc
5353
__pycache__/
5454
textures/*
55+
*.egg-info/*
5556

5657
# blender file backups
5758
*.blend1

0 commit comments

Comments
 (0)