Skip to content

Commit

Permalink
finishing touches for toolset
Browse files Browse the repository at this point in the history
  • Loading branch information
PredatorCZ committed Jul 7, 2022
1 parent fe937d1 commit e875710
Show file tree
Hide file tree
Showing 6 changed files with 240 additions and 5 deletions.
36 changes: 33 additions & 3 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
fail-fast: false
matrix:
include:
- name: GCC 10 & GCOV
- name: GCC 10 & GCOV & ODR
CC: gcc-10
CXX: g++-10
use-odr: true
use-gcov: true
- name: Clang 10 & ODR
- name: Clang 10 & Artifacts
CC: clang-10
CXX: clang++-10

Expand All @@ -41,16 +41,33 @@ jobs:
sudo apt install zstd
mkdir ${{github.workspace}}/build
cd ${{github.workspace}}/build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DUSE_GCOV=$USE_GCOV -DODR_TEST=$ODR_TEST -DCMAKE_INSTALL_PREFIX=${{github.workspace}} ..
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DUSE_GCOV=$USE_GCOV -DODR_TEST=$ODR_TEST -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/tmp ..
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . -j 6

- name: Install
if: ${{matrix.use-gcov == false}}
working-directory: ${{github.workspace}}/build
run: |
cmake --build . --target install
cd ../tmp
install -D ../LICENSE share/doc/havok-toolset/LICENSE.md
install -D ../toolset/README.md share/doc/havok-toolset/README.md
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest --output-on-failure

- name: Upload Artifacts
if: ${{matrix.use-gcov == false}}
uses: actions/upload-artifact@v2
with:
name: HavokToolset-linux-amd64
path: ${{github.workspace}}/tmp
retention-days: 5

- name: Upload coverage report
working-directory: ${{github.workspace}}
if: ${{matrix.use-gcov == true}}
Expand Down Expand Up @@ -88,3 +105,16 @@ jobs:
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest --output-on-failure

- name: Install
run: |
cmake --build build --target install
copy LICENSE bin/LICENSE.md
copy toolset/README.md bin/README.md
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: HavokToolset-win64
path: ${{github.workspace}}/bin
retention-days: 5
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: release

on:
release:
types: [published]

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: dawidd6/action-download-artifact@v2
with:
workflow: cmake.yml
branch: ${{ github.event.release.target_commitish }}
workflow_conclusion: success

- name: Repack them
run: |
for file in *; do
if [ -d $file ]; then
pushd $file
7z a ../$file.7z .
popd
fi
done
- name: Release them
uses: softprops/action-gh-release@v1
with:
files: '*.7z'
2 changes: 1 addition & 1 deletion 3rd_party/PreCore
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ Library can also store classic data for XML direct export.\
Library uses wrapper for a python 3 module.\
Library is compilable under Clang 10, Windowns Clang 13.0.1 and G++10.

![Library Diagram](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.github.com/predatorcz/havoklib/master/doc/diag.puml)
## Toolset

Toolset can be found in [Toolset folder](https://github.com/PredatorCZ/HavokLib/tree/master/toolset)

[Toolset releases](https://github.com/PredatorCZ/HavokLib/releases)

## Supported formats/toolset versions

Expand Down Expand Up @@ -62,6 +66,8 @@ Binary exporting is an experimental feature for now.
* hkNamedVariant
* hkaPartition

![Library Diagram](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.github.com/predatorcz/havoklib/master/doc/diag.puml)

## License

This library is available under GPL v3 license. (See LICENSE.md)
Expand Down
159 changes: 159 additions & 0 deletions toolset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
# HavokToolset

Havok Toolset is a collection of conversion tools under HavokLib.

This toolset runs on Spike foundation.

Head to this **[Wiki](https://github.com/PredatorCZ/PreCore/wiki/Spike)** for more information on how to effectively use it.

## Havok2GLTF

### Module command: hk_to_gltf

Converts Havok data into GLTF.

Supports animation and skeleton data.

### Settings

- **extension-patterns**

**CLI Long:** ***--extension-patterns***\
**CLI Short:** ***-p***

Specify extension patterns for file detecting separated by comma.

- **animation**

- **blend-override**

**CLI Long:** ***--blend-override***\
**CLI Short:** ***-b***

**Default value:** AUTO

**Valid values:** AUTO, NORMAL, ADDITIVE_DEPRECATED, ADDITIVE

Override blend hint.

- **sample-rate**

**CLI Long:** ***--sample-rate***\
**CLI Short:** ***-r***

**Default value:** 60

Specify frames per second for GLTF.

- **scale-type**

**CLI Long:** ***--scale-type***\
**CLI Short:** ***-S***

**Default value:** NONE

**Valid values:**

- NONE: Ignore scale tracks.

- INDEPENDENT: Input scale tracks does not affect child nodes positions.
They also doesn't introduce shearing like in MATRICIAL case.
They however require modified skeleton. See SkeletonGeneration.

Select desired processing mode for node scale tracks.

- **skeleton**

- **skeleton-path**

**CLI Long:** ***--skeleton-path***\
**CLI Short:** ***-s***

Specify path to a skeleton hkx.

- **generation**

**CLI Long:** ***--generation***\
**CLI Short:** ***-G***

**Default value:** DEFAULT

**Valid values:**

- DEFAULT: Do not modify skeleton in any way.

- AUTO: Automatically detect nodes with children where scale animation might occur.

- MANUAL: Manually select bones (in gen-cbones) where scale motion occurs and have child nodes.

Set additional skeleton modifications.

- **gen-cbones**

**CLI Long:** ***--gen-cbones***\
**CLI Short:** ***-B***

Comma separated bone names where should be applied scale tracks.

- **visualize**

**CLI Long:** ***--visualize***\
**CLI Short:** ***-V***

**Default value:** true

Create visualization mesh for skeletons. (Enforces armature object for Blender)

- **scene**

- **units**

**CLI Long:** ***--units***\
**CLI Short:** ***-u***

**Default value:** METER

**Valid values:** MM, CM, DM, METER, KM, INCH, FEET, MILE, CUSTOM

Input scene units.

- **custom-scale**

**CLI Long:** ***--custom-scale***\
**CLI Short:** ***-C***

**Default value:** 1

Set unit scale in case of CUSTOM units.

- **up-axis**

**CLI Long:** ***--up-axis***\
**CLI Short:** ***-U***

**Default value:** Y+

**Valid values:** X-, Y-, Z-, X+, Y+, Z+

Input scene up axis.

- **forward-axis**

**CLI Long:** ***--forward-axis***\
**CLI Short:** ***-F***

**Default value:** Z+

**Valid values:** X-, Y-, Z-, X+, Y+, Z+

Input scene forward axis.

- **right-handed**

**CLI Long:** ***--right-handed***\
**CLI Short:** ***-R***

**Default value:** true

Input scene uses right handed coordiante system. (Finicky with root motion rotations)

10 changes: 10 additions & 0 deletions toolset/doc_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<toolset_name>HavokToolset</toolset_name>
<toolset_description>Havok Toolset is a collection of conversion tools under HavokLib.

This toolset runs on Spike foundation.

Head to this **[Wiki](https://github.com/PredatorCZ/PreCore/wiki/Spike)** for more information on how to effectively use it.</toolset_description>
<hk_to_gltf>Converts Havok data into GLTF.

Supports animation and skeleton data.</hk_to_gltf>

0 comments on commit e875710

Please sign in to comment.