Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved addons into src/addons and added VSCode settings and app launcher scripts #35

Merged
merged 10 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# GITHUB_USERNAME=
# GITHUB_TOKEN=
# BLENDER_EXE_PATH=
# UNREAL_EXE_PATH=
# UNREAL_PROJECT_PATH=
4 changes: 3 additions & 1 deletion .github/workflows/re-use-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ jobs:
source .venv/bin/activate

export GITHUB_TOKEN=${{ secrets.GH_PAT }}
export TEST_ENVIRONMENT=1
export DOCKER_ENVIRONMENT=yes
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
docker pull ghcr.io/poly-hammer/blender-linux:$BLENDER_VERSION
docker pull ghcr.io/poly-hammer/unreal-linux:$UNREAL_VERSION

cd ./tests
python run_tests.py
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ permissions:
jobs:
test-lts:
name: Test LTS
uses: poly-hammer/BlenderTools/.github/workflows/re-use-tests.yml@main
uses: poly-hammer/BlenderTools/.github/workflows/re-use-tests.yml@restructure-addons-for-better-dev-setup
secrets: inherit
with:
title: Test LTS
Expand All @@ -32,7 +32,7 @@ jobs:
test-latest:
needs: test-lts
name: Test Latest
uses: poly-hammer/BlenderTools/.github/workflows/re-use-tests.yml@main
uses: poly-hammer/BlenderTools/.github/workflows/re-use-tests.yml@restructure-addons-for-better-dev-setup
secrets: inherit
with:
title: Test Latest
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*~
*.swp
/venv/*
.vscode
release/*
venv
.env
Expand All @@ -17,8 +16,6 @@ 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
140 changes: 140 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
{
"configurations": [
{
"name": "Run Active Python File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"envFile": "${workspaceFolder}/.env",
"justMyCode": false
},
{
"name": "Python Debugger: Attach Blender",
"type": "debugpy",
"request": "attach",
"connect": {
"host": "localhost",
"port": 5678
}
},
{
"name": "Python Debugger: Attach Unreal",
"type": "debugpy",
"request": "attach",
"connect": {
"host": "localhost",
"port": 5679
}
},
{
"name": "Debug Tests: Host Environment",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/tests/run_tests.py",
"console": "integratedTerminal",
"envFile": "${workspaceFolder}/.env",
"cwd": "${workspaceFolder}/tests",
"justMyCode": false,
"env": {
"EXCLUSIVE_TEST_FILES": "${input:test-file}",
"EXCLUSIVE_TESTS": "${input:test-name}",
}
},
{
"name": "Debug Tests: Docker Environment",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/tests/run_tests.py",
"console": "integratedTerminal",
"envFile": "${workspaceFolder}/.env",
"cwd": "${workspaceFolder}/tests",
"justMyCode": false,
"env": {
"DOCKER_ENVIRONMENT": "yes",
"EXCLUSIVE_TEST_FILES": "${input:test-file}",
"EXCLUSIVE_TESTS": "${input:test-name}",
"DEBUGGING_ON": "${input:debugging-on}"
}
},
{
"name": "Python Debugger: Attach Blender Docker",
"type": "debugpy",
"request": "attach",
"pathMappings": [
{
"localRoot": "${workspaceFolder}/",
"remoteRoot": "/tmp/blender_tools/"
}
],
"connect": {
"host": "localhost",
"port": 5668
}
},
{
"name": "Python Debugger: Attach Unreal Docker",
"type": "debugpy",
"request": "attach",
"pathMappings": [
{
"localRoot": "${workspaceFolder}/",
"remoteRoot": "/tmp/blender_tools/"
}
],
"connect": {
"host": "localhost",
"port": 5669
}
}
],
"inputs": [
{
"id": "test-file",
"type": "pickString",
"default": "all",
"options": [
"all",
"test_send2ue_core.py",
"test_send2ue_cubes.py",
"test_send2ue_extension_affixes.py",
"test_send2ue_extension_combine_assets.py",
"test_send2ue_extension_create_post_import_assets_for_groom.py",
"test_send2ue_extension_example.py",
"test_send2ue_extension_instance_assets.py",
"test_send2ue_extension_use_collections_as_folders.py",
"test_send2ue_extension_use_immediate_parent_name.py",
"test_send2ue_mannequins.py",
"test_ue2rigify_core.py",
"test_ue2rigify_mannequins.py"
],
"description": "Which test file to run"
},
{
"id": "docker-environment",
"type": "pickString",
"default": "",
"options": [
"no",
"yes"
],
"description": "Run in docker environment?"
},
{
"id": "test-name",
"type": "promptString",
"default": "all",
"description": "The name of the specific test to run"
},
{
"id": "debugging-on",
"type": "pickString",
"default": "",
"options": [
"no",
"yes"
],
"description": "Turn on remote debugging in the containers?"
}
]
}
2 changes: 2 additions & 0 deletions .vscode/python.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PYTHONPATH=';./.venv/Lib/site-packages;./src/addons;./src/addons/send2ue/dependencies'
PYTHONUNBUFFERED=1
82 changes: 82 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"files.eol": "\n",
"python.pythonPath": "${workspaceFolder}/.venv/Lib/site-packages",
"python.terminal.activateEnvironment": true,
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/Scripts/python.exe",
"python.envFile": "${workspaceFolder}/.vscode/python.env",
"python.analysis.typeCheckingMode": "basic",
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"python.languageServer": "Pylance",
"editor.tabCompletion": "on",
// "python.analysis.disabled": ["unresolved-import"],
"python.autoComplete.extraPaths": [
"${workspaceFolder}/admin/packages"
],
"python.analysis.extraPaths": [
"${workspaceFolder}/admin/packages"
],
"cSpell.ignorePaths": [
"${workspaceFolder}/.venv",
"${workspaceFolder}/.linux-venv",
"${workspaceFolder}/.py3.10-venv",
"${workspaceFolder}/.unreal-venv",
"${workspaceFolder}/build",
"${workspaceFolder}/scratches",
"${workspaceFolder}/reports"
],
"cSpell.words": [
"autoexec",
"compileshaders",
"debugpy",
"dotenv",
"epicgames",
"everytime",
"eyeshell",
"fcurve",
"fcurves",
"fontawesome",
"forcelogflush",
"idname",
"inlinehilite",
"kwargs",
"levelno",
"linenums",
"LODS",
"mathutils",
"mikepenz",
"Mkdocs",
"mklink",
"noloadstartuppackages",
"nopause",
"nosplash",
"nullrhi",
"nytimes",
"outliner",
"POLYHAMMER",
"pygments",
"Pylance",
"pymdownx",
"pytest",
"PYTHONUNBUFFERED",
"quickstart",
"retarget",
"retargeting",
"Rigify",
"runas",
"skincache",
"staticmethod",
"superfences",
"teleporting",
"termynal",
"TOPBAR",
"Unregisters",
"uproject",
"venv"
],
"editor.rulers": [
80,
120
],
"jupyter.notebookFileRoot": "${workspaceFolder}"
}
90 changes: 90 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"label": "launch blender",
"command": "python ${workspaceFolder}/scripts/launch.py blender ${input:blender-version} ${input:blender-debug}",
"type": "shell",
"group": {
"kind": "build"
},
"presentation": {
"reveal": "always",
"panel": "shared",
"focus": true
}
},
{
"label": "launch unreal",
"command": "python ${workspaceFolder}/scripts/launch.py unreal ${input:unreal-version} ${input:unreal-debug}",
"type": "shell",
"group": {
"kind": "build"
},
"presentation": {
"reveal": "always",
"panel": "shared",
"focus": true
}
},
{
"label": "Serve Docs",
"command": "mkdocs serve",
"type": "shell",
"group": {
"kind": "build"
},
"presentation": {
"reveal": "always",
"panel": "shared",
"focus": true
}
}
],
"inputs": [
{
"id": "blender-version",
"type": "pickString",
"default": "4.1",
"options": [
"3.6",
"4.0",
"4.1",
"4.2",
],
"description": "What blender version to launch"
},
{
"id": "blender-debug",
"type": "pickString",
"default": "no",
"options": [
"no",
"yes"
],
"description": "Should use debugger?"
},
{
"id": "unreal-version",
"type": "pickString",
"default": "5.4",
"options": [
"5.3",
"5.4"
],
"description": "What unreal version to launch"
},
{
"id": "unreal-debug",
"type": "pickString",
"default": "no",
"options": [
"no",
"yes"
],
"description": "Should use debugger?"
}
]
}
Loading
Loading