Skip to content

Commit e875710

Browse files
committed
finishing touches for toolset
1 parent fe937d1 commit e875710

File tree

6 files changed

+240
-5
lines changed

6 files changed

+240
-5
lines changed

.github/workflows/cmake.yml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
include:
15-
- name: GCC 10 & GCOV
15+
- name: GCC 10 & GCOV & ODR
1616
CC: gcc-10
1717
CXX: g++-10
1818
use-odr: true
1919
use-gcov: true
20-
- name: Clang 10 & ODR
20+
- name: Clang 10 & Artifacts
2121
CC: clang-10
2222
CXX: clang++-10
2323

@@ -41,16 +41,33 @@ jobs:
4141
sudo apt install zstd
4242
mkdir ${{github.workspace}}/build
4343
cd ${{github.workspace}}/build
44-
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DUSE_GCOV=$USE_GCOV -DODR_TEST=$ODR_TEST -DCMAKE_INSTALL_PREFIX=${{github.workspace}} ..
44+
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DUSE_GCOV=$USE_GCOV -DODR_TEST=$ODR_TEST -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/tmp ..
4545
4646
- name: Build
4747
working-directory: ${{github.workspace}}/build
4848
run: cmake --build . -j 6
4949

50+
- name: Install
51+
if: ${{matrix.use-gcov == false}}
52+
working-directory: ${{github.workspace}}/build
53+
run: |
54+
cmake --build . --target install
55+
cd ../tmp
56+
install -D ../LICENSE share/doc/havok-toolset/LICENSE.md
57+
install -D ../toolset/README.md share/doc/havok-toolset/README.md
58+
5059
- name: Test
5160
working-directory: ${{github.workspace}}/build
5261
run: ctest --output-on-failure
5362

63+
- name: Upload Artifacts
64+
if: ${{matrix.use-gcov == false}}
65+
uses: actions/upload-artifact@v2
66+
with:
67+
name: HavokToolset-linux-amd64
68+
path: ${{github.workspace}}/tmp
69+
retention-days: 5
70+
5471
- name: Upload coverage report
5572
working-directory: ${{github.workspace}}
5673
if: ${{matrix.use-gcov == true}}
@@ -88,3 +105,16 @@ jobs:
88105
- name: Test
89106
working-directory: ${{github.workspace}}/build
90107
run: ctest --output-on-failure
108+
109+
- name: Install
110+
run: |
111+
cmake --build build --target install
112+
copy LICENSE bin/LICENSE.md
113+
copy toolset/README.md bin/README.md
114+
115+
- name: Upload Artifacts
116+
uses: actions/upload-artifact@v2
117+
with:
118+
name: HavokToolset-win64
119+
path: ${{github.workspace}}/bin
120+
retention-days: 5

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Download artifacts
12+
uses: dawidd6/action-download-artifact@v2
13+
with:
14+
workflow: cmake.yml
15+
branch: ${{ github.event.release.target_commitish }}
16+
workflow_conclusion: success
17+
18+
- name: Repack them
19+
run: |
20+
for file in *; do
21+
if [ -d $file ]; then
22+
pushd $file
23+
7z a ../$file.7z .
24+
popd
25+
fi
26+
done
27+
- name: Release them
28+
uses: softprops/action-gh-release@v1
29+
with:
30+
files: '*.7z'

3rd_party/PreCore

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ Library can also store classic data for XML direct export.\
1010
Library uses wrapper for a python 3 module.\
1111
Library is compilable under Clang 10, Windowns Clang 13.0.1 and G++10.
1212

13-
![Library Diagram](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.github.com/predatorcz/havoklib/master/doc/diag.puml)
13+
## Toolset
14+
15+
Toolset can be found in [Toolset folder](https://github.com/PredatorCZ/HavokLib/tree/master/toolset)
16+
17+
[Toolset releases](https://github.com/PredatorCZ/HavokLib/releases)
1418

1519
## Supported formats/toolset versions
1620

@@ -62,6 +66,8 @@ Binary exporting is an experimental feature for now.
6266
* hkNamedVariant
6367
* hkaPartition
6468

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

6773
This library is available under GPL v3 license. (See LICENSE.md)

toolset/README.md

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
# HavokToolset
2+
3+
Havok Toolset is a collection of conversion tools under HavokLib.
4+
5+
This toolset runs on Spike foundation.
6+
7+
Head to this **[Wiki](https://github.com/PredatorCZ/PreCore/wiki/Spike)** for more information on how to effectively use it.
8+
9+
## Havok2GLTF
10+
11+
### Module command: hk_to_gltf
12+
13+
Converts Havok data into GLTF.
14+
15+
Supports animation and skeleton data.
16+
17+
### Settings
18+
19+
- **extension-patterns**
20+
21+
**CLI Long:** ***--extension-patterns***\
22+
**CLI Short:** ***-p***
23+
24+
Specify extension patterns for file detecting separated by comma.
25+
26+
- **animation**
27+
28+
- **blend-override**
29+
30+
**CLI Long:** ***--blend-override***\
31+
**CLI Short:** ***-b***
32+
33+
**Default value:** AUTO
34+
35+
**Valid values:** AUTO, NORMAL, ADDITIVE_DEPRECATED, ADDITIVE
36+
37+
Override blend hint.
38+
39+
- **sample-rate**
40+
41+
**CLI Long:** ***--sample-rate***\
42+
**CLI Short:** ***-r***
43+
44+
**Default value:** 60
45+
46+
Specify frames per second for GLTF.
47+
48+
- **scale-type**
49+
50+
**CLI Long:** ***--scale-type***\
51+
**CLI Short:** ***-S***
52+
53+
**Default value:** NONE
54+
55+
**Valid values:**
56+
57+
- NONE: Ignore scale tracks.
58+
59+
- INDEPENDENT: Input scale tracks does not affect child nodes positions.
60+
They also doesn't introduce shearing like in MATRICIAL case.
61+
They however require modified skeleton. See SkeletonGeneration.
62+
63+
Select desired processing mode for node scale tracks.
64+
65+
- **skeleton**
66+
67+
- **skeleton-path**
68+
69+
**CLI Long:** ***--skeleton-path***\
70+
**CLI Short:** ***-s***
71+
72+
Specify path to a skeleton hkx.
73+
74+
- **generation**
75+
76+
**CLI Long:** ***--generation***\
77+
**CLI Short:** ***-G***
78+
79+
**Default value:** DEFAULT
80+
81+
**Valid values:**
82+
83+
- DEFAULT: Do not modify skeleton in any way.
84+
85+
- AUTO: Automatically detect nodes with children where scale animation might occur.
86+
87+
- MANUAL: Manually select bones (in gen-cbones) where scale motion occurs and have child nodes.
88+
89+
Set additional skeleton modifications.
90+
91+
- **gen-cbones**
92+
93+
**CLI Long:** ***--gen-cbones***\
94+
**CLI Short:** ***-B***
95+
96+
Comma separated bone names where should be applied scale tracks.
97+
98+
- **visualize**
99+
100+
**CLI Long:** ***--visualize***\
101+
**CLI Short:** ***-V***
102+
103+
**Default value:** true
104+
105+
Create visualization mesh for skeletons. (Enforces armature object for Blender)
106+
107+
- **scene**
108+
109+
- **units**
110+
111+
**CLI Long:** ***--units***\
112+
**CLI Short:** ***-u***
113+
114+
**Default value:** METER
115+
116+
**Valid values:** MM, CM, DM, METER, KM, INCH, FEET, MILE, CUSTOM
117+
118+
Input scene units.
119+
120+
- **custom-scale**
121+
122+
**CLI Long:** ***--custom-scale***\
123+
**CLI Short:** ***-C***
124+
125+
**Default value:** 1
126+
127+
Set unit scale in case of CUSTOM units.
128+
129+
- **up-axis**
130+
131+
**CLI Long:** ***--up-axis***\
132+
**CLI Short:** ***-U***
133+
134+
**Default value:** Y+
135+
136+
**Valid values:** X-, Y-, Z-, X+, Y+, Z+
137+
138+
Input scene up axis.
139+
140+
- **forward-axis**
141+
142+
**CLI Long:** ***--forward-axis***\
143+
**CLI Short:** ***-F***
144+
145+
**Default value:** Z+
146+
147+
**Valid values:** X-, Y-, Z-, X+, Y+, Z+
148+
149+
Input scene forward axis.
150+
151+
- **right-handed**
152+
153+
**CLI Long:** ***--right-handed***\
154+
**CLI Short:** ***-R***
155+
156+
**Default value:** true
157+
158+
Input scene uses right handed coordiante system. (Finicky with root motion rotations)
159+

toolset/doc_template.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0"?>
2+
<toolset_name>HavokToolset</toolset_name>
3+
<toolset_description>Havok Toolset is a collection of conversion tools under HavokLib.
4+
5+
This toolset runs on Spike foundation.
6+
7+
Head to this **[Wiki](https://github.com/PredatorCZ/PreCore/wiki/Spike)** for more information on how to effectively use it.</toolset_description>
8+
<hk_to_gltf>Converts Havok data into GLTF.
9+
10+
Supports animation and skeleton data.</hk_to_gltf>

0 commit comments

Comments
 (0)