Skip to content

Process model | 7ac56a14-03f9-454b-b9ce-6215cfc3a569 | on_hold | false #51969

Process model | 7ac56a14-03f9-454b-b9ce-6215cfc3a569 | on_hold | false

Process model | 7ac56a14-03f9-454b-b9ce-6215cfc3a569 | on_hold | false #51969

name: Process Asset
run-name: Process ${{github.event.inputs.asset_type || github.event.client_payload.asset_type}} | ${{ github.event.inputs.asset_base_id || github.event.client_payload.asset_base_id }} | ${{ github.event.inputs.verification_status || github.event.client_payload.verification_status }} | ${{ github.event.inputs.is_private || github.event.client_payload.is_private }}
on:
workflow_dispatch:
inputs:
asset_base_id:
description: 'Asset Base ID'
required: true
asset_type:
description: 'Asset Type'
required: true
verification_status:
description: 'Verification Status of the Asset'
is_private:
description: 'Asset Is Private'
type: boolean
repository_dispatch:
types: [process-asset]
env:
BLENDERKIT_SERVER: 'https://www.blenderkit.com'
BLENDERKIT_API_KEY: '${{ secrets.BLENDERKIT_API_KEY }}'
BLENDERS_PATH: '/home/headless/blenders'
ASSET_BASE_ID: ${{ github.event.inputs.asset_base_id || github.event.client_payload.asset_base_id }}
jobs:
RESOLUTIONS:
name: Public & Validated -> generate resolutions
runs-on: ubuntu-latest
if: contains(fromJSON('["model", "material", "hdr"]'), github.event.inputs.asset_type || github.event.client_payload.asset_type) &&
(github.event.inputs.verification_status == 'validated' || github.event.client_payload.verification_status == 'validated') &&
(github.event.inputs.is_private != 'true' && github.event.client_payload.is_private != 'true')
container: blenderkit/headless-blender:multi-version
steps:
- uses: actions/checkout@v4
- name: Install lsb-release
run: apt-get update && apt-get install -y lsb-release python3-pip
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: python3 -m pip install -r requirements.txt
- name: Generate resolutions
run: python3 generate_resolutions.py
GLTF:
name: Public, Validated and Model -> generate GLTF
runs-on: ubuntu-latest
if: contains(fromJSON('["model",]'), github.event.inputs.asset_type || github.event.client_payload.asset_type) &&
(github.event.inputs.verification_status == 'validated' || github.event.client_payload.verification_status == 'validated') &&
(github.event.inputs.is_private != 'true' && github.event.client_payload.is_private != 'true')
container: blenderkit/headless-blender:blender-4.2 # LATEST STABLE
steps:
- uses: actions/checkout@v4
- name: Install lsb-release
run: apt-get update && apt-get install -y lsb-release python3-pip
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: python3 -m pip install -r requirements.txt
- name: Set BLENDER_PATH
run: echo "BLENDER_PATH=/home/headless/blender/blender" >> $GITHUB_ENV
- name: Generate GLTF
run: python3 generate_gltf_new.py