Skip to content

Commit

Permalink
Refactored Repo Docs and Tests (#10)
Browse files Browse the repository at this point in the history
* Refactored Repo Docs and Tests (#10)
---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: JoshQuake <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jun 12, 2024
1 parent 272c8b6 commit 69dd1be
Show file tree
Hide file tree
Showing 87 changed files with 1,475 additions and 7,727 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ assignees: ''
---

# Before creating an issue DO THIS FIRST!
Search the existing [issues](https://github.com/EpicGamesExt/BlenderTools/issues?q=)
Search the existing [issues](https://github.com/poly-hammer/BlenderTools/issues?q=)

## Bug
### IMPORTANT: Do this before you create a bug ticket!
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ assignees: ''
---

# Before creating an issue DO THIS FIRST!
Search the existing [issues](https://github.com/EpicGamesExt/BlenderTools/issues?q=)
Search the existing [issues](https://github.com/poly-hammer/BlenderTools/issues?q=)

## Feature
### IMPORTANT: Do this before you create a feature ticket!
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ assignees: ''
---

# Before creating an issue DO THIS FIRST!
Search the existing [issues](https://github.com/EpicGamesExt/BlenderTools/issues?q=)
Search the existing [issues](https://github.com/poly-hammer/BlenderTools/issues?q=)

## Questions
### IMPORTANT: Do this before you create a question ticket!
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Docs

on:
# Runs on pushes targeting the main branch
push:
branches:
- "main"
paths:
- "docs/**/*"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Install Python Dependencies
shell: bash
run: |
python3 -m venv .linux-venv
source .linux-venv/bin/activate
pip install --upgrade -r requirements.txt
- name: Build Mkdocs
shell: bash
run: |
export GA_ID=${{ secrets.GA_ID }}
source .linux-venv/bin/activate
mkdocs build
- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload Built Docs
uses: actions/upload-pages-artifact@v3
with:
path: './site'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
75 changes: 75 additions & 0 deletions .github/workflows/re-use-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: re-use-tests

on:
workflow_call:
inputs:
title:
required: true
type: string
blender-version:
required: true
type: string
unreal-version:
required: true
type: string
secrets:
GH_USER:
required: true
GH_PAT:
required: true

jobs:
tests:
name: ${{ inputs.title }}
runs-on: poly-hammer-runner
if: github.repository == 'poly-hammer/BlenderTools'
timeout-minutes: 120
permissions:
contents: read
checks: write
id-token: write

steps:
- name: Checkout Repo
uses: actions/checkout@v4

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

- name: Install Python Dependencies
shell: bash
run: |
python -m venv .venv
source .venv/bin/activate
pip install --upgrade -r requirements.txt
- name: Run All Tests
shell: bash
run: |
source .venv/bin/activate
export GITHUB_TOKEN=${{ secrets.GH_PAT }}
export TEST_ENVIRONMENT=1
export UNREAL_VERSION=${{ inputs.unreal-version }}
export BLENDER_VERSION=${{ inputs.blender-version }}
echo $GITHUB_TOKEN | docker login ghcr.io -u ${{ secrets.GH_USER }} --password-stdin
cd ./tests
python run_tests.py
- name: Publish ${{ inputs.title }} Report
uses: mikepenz/action-junit-report@v4
# always run even if the previous step fails
if: success() || failure()
with:
check_name: ${{ inputs.title }} Results (Unreal ${{ inputs.unreal-version }} Blender ${{ inputs.blender-version }})
include_passed: True
fail_on_failure: True
require_tests: True
require_passed_tests: True
detailed_summary: True
report_paths: './tests/results/*.xml'
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Create Release
on:
workflow_dispatch:
inputs:
addons:
type: choice
description: Make a choice
default: 'send2ue,ue2rigify'
options:
- 'ue2rigify'
- 'send2ue'
- 'send2ue,ue2rigify'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install Requirements
run: |
pip3 install -r requirements.txt
- name: Create Release
run: |
export REPO=${{ github.repository }}
export GITHUB_TOKEN=${{ secrets.GH_PAT }}
export BLENDER_ADDONS=${{ github.event.inputs.addons }}
python3 scripts/create_release.py
37 changes: 37 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Tests

on:
push:
branches:
- main
- ci-testing
paths:
- 'send2ue/**/*'
- 'ue2rigify/**/*'
- 'tests/**/*'
- '.github/workflows/**'

permissions:
contents: read
checks: write
id-token: write

jobs:
test-lts:
name: Test LTS
uses: poly-hammer/BlenderTools/.github/workflows/re-use-tests.yml@main
secrets: inherit
with:
title: Test LTS
unreal-version: 5.3
blender-version: 3.6

test-latest:
needs: test-lts
name: Test Latest
uses: poly-hammer/BlenderTools/.github/workflows/re-use-tests.yml@main
secrets: inherit
with:
title: Test Latest
unreal-version: 5.3
blender-version: 4.1
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,18 @@
*~
*.swp
/venv/*
.vscode
release/*
venv
.env
.venv
.*-venv
results
release
site
scratches
scripts/resources
launch.py
tests/test_files/data
tests/test_files/unreal_projects/**/DefaultInput.ini
tests/test_files/blender_files/textures
29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,48 @@
<p align="center">
<img width="300" src="https://github.com/EpicGamesExt/BlenderTools/blob/main/docs/main/images/1.png?raw=true" alt="icon"/>
<img width="300" src="https://github.com/poly-hammer/BlenderTools/blob/main/docs/images/1.png?raw=true" alt="icon"/>
</p>
<h1 align="center">Blender Tools</h1>
<br></br>

[![Docs](https://github.com/poly-hammer/BlenderTools/actions/workflows/docs.yml/badge.svg)](https://github.com/poly-hammer/BlenderTools/actions/workflows/docs.yml)
[![Tests](https://github.com/poly-hammer/BlenderTools/actions/workflows/tests.yml/badge.svg)](https://github.com/poly-hammer/BlenderTools/actions/workflows/tests.yml)



### NOTE: This is a fork of the original [repository by Epic](https://github.com/EpicGamesExt/BlenderTools).
### This is now maintained by volunteers from the community and is not affiliated with Epic Games.

A repository of blender addons that improve the game development workflow between Blender and Unreal Engine.


## Send to Unreal

![4](docs/main/images/send2ue/4.gif)
![4](docs/images/send2ue/4.gif)

A one-click solution for sending assets from Blender to Unreal Engine.

* [Read Docs](https://epicgamesext.github.io/BlenderTools/send2ue/)
* [Download Addon](https://github.com/EpicGamesExt/BlenderTools/releases?q=Send+to+Unreal&expanded=true)
* [Read Docs](https://poly-hammer.github.io/BlenderTools/send2ue/)
* [Download Addon](https://github.com/poly-hammer/BlenderTools/releases?q=Send+to+Unreal&expanded=true)


## UE to Rigify

![2](./docs/main/images/ue2rigify/2.png)
![2](./docs/images/ue2rigify/2.png)

A node based retargeting system for Blender's
[Rigify](https://docs.blender.org/manual/en/latest/addons/rigging/rigify/index.html) addon. Quickly retarget and author
new animation on unreal marketplace assets and more!

* [Read Docs](https://epicgamesext.github.io/BlenderTools/ue2rigify/)
* [Download Addon](https://github.com/EpicGamesExt/BlenderTools/releases?q=UE+to+Rigify&expanded=true)
* [Read Docs](https://poly-hammer.github.io/BlenderTools/ue2rigify/)
* [Download Addon](https://github.com/poly-hammer/BlenderTools/releases?q=UE+to+Rigify&expanded=true)


## Help Contribute
Contributions are encouraged! Find out how you can contribute to this repo in one of the following ways:

* [Help Develop](https://epicgamesext.github.io/BlenderTools/contributing/development.html)
* [Help Document](https://epicgamesext.github.io/BlenderTools/contributing/documentation.html)
* [Help Test](https://epicgamesext.github.io/BlenderTools/contributing/testing.html)
* [Help Develop](https://poly-hammer.github.io/BlenderTools/contributing/development.html)
* [Help Document](https://poly-hammer.github.io/BlenderTools/contributing/documentation.html)
* [Help Test](https://poly-hammer.github.io/BlenderTools/contributing/testing.html)


## Get Notified on a New Release
Expand Down
3 changes: 0 additions & 3 deletions docs/.dockerignore

This file was deleted.

12 changes: 0 additions & 12 deletions docs/.gitignore

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ with the owners of this repository, before making a change. Each pull request mu
1. Include the updated documentation in the pull request.
1. The pull request will be reviewed, then merged into `dev` if all tests pass, the changes will be pushed to the `master` branch and a new versioned build will be made.

::: tip Note
Any new features require an accompanying unit test for it to be approved.
:::
!!! note

Any new features require an accompanying unit test for it to be approved.


## Getting Setup
Fork the `BlenderTools` repository.
Expand All @@ -35,10 +36,9 @@ git checkout some-task-branch
While developing, you will want to be able to rapidly test your new changes. You can do this by running this script in
the Blender Script Editor.

::: tip Note
You need to change `<your-repo-location>` to match the absolute path to the scripts folder in your local project.
Running this script installs and reloads the tool.
:::
!!! note

You need to change `<your-repo-location>` to match the absolute path to the scripts folder in your local project. Running this script installs and reloads the tool.


```python
Expand Down Expand Up @@ -72,12 +72,13 @@ you want to run the unittests on the open app instances.
These steps must be completed in-order for the addons to hot-reload while you type in PyCharm.
1. If you have the addons already installed, uninstall them and shutdown Blender and PyCharm.
1. You must symlink the addon folders into the blender addon installation location. Then enable the addons
::: tip Windows

!!! Windows
Run this from a commandline launched as administrator. Swapping out the last path with your own.
```commandline:no-line-numbers
mklink /D "%APPDATA%\Blender Foundation\Blender\3.4\scripts\addons\send2ue" "D:\repos\BlenderTools\send2ue"
```shell
mklink /D "%APPDATA%\Blender Foundation\Blender\3.6\scripts\addons\send2ue" "D:\repos\BlenderTools\send2ue"
```
:::

1. You must install the `./scripts/addon-watcher.xml` in Pycharm by going to `Settings > Tools > File Watchers > Import`
1. And finally blender has to be running with the send2ue addon enabled and clicking `Pipeline > Utilities > Start RPC Servers`
Now PyCharm should reload your addons on file save events.
Expand Down
Loading

0 comments on commit 69dd1be

Please sign in to comment.