Skip to content

Make Low Poly GLB

Make Low Poly GLB #7

Workflow file for this run

name: Make Low Poly GLB
on:
workflow_dispatch:
inputs:
filename:
description: 'Input file to convert to low poly GLB'
required: true
targetfaces:
description: 'Target number of faces for the low poly model'
required: false
default: 7500
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.10.11
# - name: Install Linux Dependencies
# run: |
# sudo apt update
# sudo apt-get install -y build-essential git subversion cmake libx11-dev libxxf86vm-dev libxcursor-dev libxi-dev libxrandr-dev libxinerama-dev libegl-dev
# sudo apt-get install -y libwayland-dev wayland-protocols libxkbcommon-dev libdbus-1-dev linux-libc-dev
# install blender bpy
- name: Install Blender and Typer
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade bpy --extra-index-url https://github.com/michaelgold/buildbpy
python -m pip install --upgrade requests python-dotenv typer=='0.9.0' httpx
- name: Convert to Low Poly
run: |
python lowpoly.py ${{ github.event.inputs.filename }} --target-faces ${{ github.event.inputs.targetfaces }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload GLB file as an artifact
uses: actions/upload-artifact@v4
with:
name: lowpoly-mesh
path: |
./*.glb