Browse Source

sceneconverter: add .gitattributes and conversion script for test files.

Because no way I'm doing that conversion and diffing by hand every time.
pull/594/head
Vladimír Vondruš 4 years ago
parent
commit
1137b56c25
  1. 11
      src/Magnum/SceneTools/Test/SceneConverterTestFiles/.gitattributes
  2. 8
      src/Magnum/SceneTools/Test/SceneConverterTestFiles/convert.sh
  3. 4
      src/Magnum/SceneTools/Test/SceneConverterTestFiles/two-triangles-transformed.bin.in

11
src/Magnum/SceneTools/Test/SceneConverterTestFiles/.gitattributes vendored

@ -0,0 +1,11 @@
# You have to add the following to your .git/config or global
# ~/.gitconfig to make the binary diffs work (without the comment
# character, of course):
#
# [diff "hex"]
# textconv = hexdump -v -C
# binary = true
#
*.bin binary diff=hex
*.ply binary diff=hex

8
src/Magnum/SceneTools/Test/SceneConverterTestFiles/convert.sh

@ -0,0 +1,8 @@
#!/bin/bash
set -e
# in -> bin
for i in *.bin.in; do
../../../../../../magnum-plugins/src/MagnumPlugins/GltfImporter/Test/in2bin.py ${i}
done

4
src/Magnum/SceneTools/Test/SceneConverterTestFiles/two-triangles-transformed.bin.in

@ -1,6 +1,4 @@
# Like two-triangles.obj, but the second triangle moved 10 units on Y. Convert
# with magnum-plugins/src/MagnumPlugins/GltfImporter/Test/in2bin.py.
# Like two-triangles.obj, but the second triangle moved 10 units on Y
type = "3f3f3f 3f3f3f"
input = [
-1, 1, 0,

Loading…
Cancel
Save