diff --git a/.gitignore b/.gitignore index b56e732c..68f29fe9 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ tests/gltf_export/.import/ tests/blend_export/.import/ tests/blend_export/.godot/imported/ + +tests/blend_export/**/*.import diff --git a/tests/blend_export/blend/45545-relax-name-sanitization.blend b/tests/blend_export/blend/45545-relax-name-sanitization.blend new file mode 100644 index 00000000..25c17d52 Binary files /dev/null and b/tests/blend_export/blend/45545-relax-name-sanitization.blend differ diff --git a/tests/blend_export/blend_export.py b/tests/blend_export/blend_export.py index 5faf4164..cbf3d014 100644 --- a/tests/blend_export/blend_export.py +++ b/tests/blend_export/blend_export.py @@ -1,4 +1,13 @@ -# blender --background --python .\blend_export.py +#! blender --background --python .\blend_export.py + +""" +Automates the regeneration of various export formats from golden blend files. + +Note: In environments that do not support shebang execution, Blender may be +invoked from the command line with the arguments from the first line of this +script (see run_tests.bat). +""" + import bpy import posixpath import shutil diff --git a/tests/blend_export/gltf/45545-relax-name-sanitization.bin b/tests/blend_export/gltf/45545-relax-name-sanitization.bin new file mode 100644 index 00000000..a8dafb41 Binary files /dev/null and b/tests/blend_export/gltf/45545-relax-name-sanitization.bin differ diff --git a/tests/blend_export/gltf/45545-relax-name-sanitization.gltf b/tests/blend_export/gltf/45545-relax-name-sanitization.gltf new file mode 100644 index 00000000..03e91da3 --- /dev/null +++ b/tests/blend_export/gltf/45545-relax-name-sanitization.gltf @@ -0,0 +1,3475 @@ +{ + "asset" : { + "copyright" : "Creative Commons Attribution 4.0 International Public License 2020 Godot Engine", + "generator" : "Khronos glTF Blender I/O v1.4.40", + "version" : "2.0" + }, + "scene" : 0, + "scenes" : [ + { + "name" : "Scene", + "nodes" : [ + 0, + 1, + 2, + 3, + 4, + 5, + 8, + 9, + 10, + 11, + 12, + 13, + 16, + 17, + 18, + 19, + 25, + 26, + 27, + 28, + 29, + 32, + 33, + 34, + 35 + ] + } + ], + "nodes" : [ + { + "mesh" : 0, + "name" : "Basic_Alphanumeric123", + "translation" : [ + 0, + 0, + 30 + ] + }, + { + "mesh" : 1, + "name" : "Basic_Katakana_\u30b4\u30c9\u30c4", + "translation" : [ + 0, + 0, + 26 + ] + }, + { + "mesh" : 2, + "name" : "Basic_Emoji_\ud83d\ude00\ud83e\udd16", + "translation" : [ + 0, + 0, + 22 + ] + }, + { + "mesh" : 3, + "name" : "Basic_AllowedSymbols_!#$%^&*()-=[]{}';<>,~", + "translation" : [ + 0, + 0, + 18 + ] + }, + { + "mesh" : 4, + "name" : "Basic_Disallowed_Non-clashing_.:@\"/", + "translation" : [ + 0, + 0, + 14 + ] + }, + { + "mesh" : 5, + "name" : "Basic_Disallowed_Clashing_.", + "translation" : [ + 0, + 0, + 10 + ] + }, + { + "mesh" : 6, + "name" : "Basic_Disallowed_Clashing_Deep_Tree_@@@", + "translation" : [ + -4, + 0, + 0 + ] + }, + { + "children" : [ + 6 + ], + "mesh" : 7, + "name" : "Basic_Disallowed_Clashing_Deep_Tree_@@", + "translation" : [ + -4, + 0, + 0 + ] + }, + { + "children" : [ + 7 + ], + "mesh" : 8, + "name" : "Basic_Disallowed_Clashing_Deep_Tree_@", + "translation" : [ + 0, + 0, + 6 + ] + }, + { + "mesh" : 9, + "name" : "Basic_Disallowed_Clashing_@", + "translation" : [ + -4, + 0, + 10 + ] + }, + { + "mesh" : 10, + "name" : "Animated_AllowedSymbols_!#$%^&*()-=[]{}';<>,~", + "translation" : [ + -24, + 0, + 18 + ] + }, + { + "mesh" : 11, + "name" : "Animated_Alphanumeric123", + "translation" : [ + -24, + 0, + 30 + ] + }, + { + "mesh" : 12, + "name" : "Animated_Disallowed_Clashing_.", + "translation" : [ + -24, + 0, + 10 + ] + }, + { + "mesh" : 13, + "name" : "Animated_Disallowed_Clashing_@", + "translation" : [ + -28, + 0, + 10 + ] + }, + { + "mesh" : 14, + "name" : "Animated_Disallowed_Clashing_Deep_Tree_@@@", + "translation" : [ + -4, + 0, + 0 + ] + }, + { + "children" : [ + 14 + ], + "mesh" : 15, + "name" : "Animated_Disallowed_Clashing_Deep_Tree_@@", + "translation" : [ + -4, + 0, + 0 + ] + }, + { + "children" : [ + 15 + ], + "mesh" : 16, + "name" : "Animated_Disallowed_Clashing_Deep_Tree_@", + "translation" : [ + -24, + 0, + 6 + ] + }, + { + "mesh" : 17, + "name" : "Animated_Disallowed_Non-clashing_.:@\"/", + "translation" : [ + -24, + 0, + 14 + ] + }, + { + "mesh" : 18, + "name" : "Animated_Emoji_\ud83d\ude00\ud83e\udd16", + "translation" : [ + -24, + 0, + 22 + ] + }, + { + "mesh" : 19, + "name" : "Animated_Katakana_\u30b4\u30c9\u30c4", + "translation" : [ + -24, + 0, + 26 + ] + }, + { + "name" : "Bone.003", + "translation" : [ + 0, + 1.672703742980957, + 4.656612873077393e-10 + ] + }, + { + "children" : [ + 20 + ], + "name" : "Bone.002", + "scale" : [ + 1, + 0.9999999403953552, + 1 + ], + "translation" : [ + 0, + 2.12692928314209, + 4.656612873077393e-10 + ] + }, + { + "children" : [ + 21 + ], + "name" : "Bone.001", + "translation" : [ + 0, + 2.2213709354400635, + 0 + ] + }, + { + "children" : [ + 22 + ], + "name" : "Bone", + "rotation" : [ + -0.7071068286895752, + 0, + 0, + 0.7071068286895752 + ], + "translation" : [ + -21.932249069213867, + -0.005949795246124268, + -1.8548247814178467 + ] + }, + { + "mesh" : 20, + "name" : "Cylinder", + "skin" : 0 + }, + { + "children" : [ + 24, + 23 + ], + "name" : "Animated_Bones" + }, + { + "mesh" : 21, + "name" : "Hinted_AllowedSymbols_!#$%^&*()-=[]{}';<>,~-col", + "translation" : [ + 0, + 0, + -18 + ] + }, + { + "mesh" : 22, + "name" : "Hinted_Katakana_\u30b4\u30c9\u30c4-col", + "translation" : [ + 0, + 0, + -10 + ] + }, + { + "mesh" : 23, + "name" : "Hinted_Disallowed_Clashing_.-col", + "translation" : [ + 0, + 0, + -26 + ] + }, + { + "mesh" : 24, + "name" : "Hinted_Disallowed_Clashing_@-col", + "translation" : [ + -4, + 0, + -26 + ] + }, + { + "mesh" : 25, + "name" : "Hinted_Disallowed_Clashing_Deep_Tree_@@@-col", + "translation" : [ + -4, + 0, + 0 + ] + }, + { + "children" : [ + 30 + ], + "mesh" : 26, + "name" : "Hinted_Disallowed_Clashing_Deep_Tree_@@-col", + "translation" : [ + -4, + 0, + 0 + ] + }, + { + "children" : [ + 31 + ], + "mesh" : 27, + "name" : "Hinted_Disallowed_Clashing_Deep_Tree_@-col", + "translation" : [ + 0, + 0, + -30 + ] + }, + { + "mesh" : 28, + "name" : "Hinted_Disallowed_Non-clashing_.:@\"/-col", + "translation" : [ + 0, + 0, + -22 + ] + }, + { + "mesh" : 29, + "name" : "Hinted_Emoji_\ud83d\ude00\ud83e\udd16-col", + "translation" : [ + 0, + 0, + -14 + ] + }, + { + "mesh" : 30, + "name" : "Hinted_Alphanumeric123-col", + "translation" : [ + 0, + 0, + -6 + ] + } + ], + "animations" : [ + { + "channels" : [ + { + "sampler" : 0, + "target" : { + "node" : 10, + "path" : "translation" + } + }, + { + "sampler" : 1, + "target" : { + "node" : 10, + "path" : "rotation" + } + }, + { + "sampler" : 2, + "target" : { + "node" : 10, + "path" : "scale" + } + } + ], + "name" : "Animated_AllowedSymbols_!#$%^&*()-=[]{}';<>,~Action-loop", + "samplers" : [ + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 100 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 101 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 102 + } + ] + }, + { + "channels" : [ + { + "sampler" : 0, + "target" : { + "node" : 11, + "path" : "translation" + } + }, + { + "sampler" : 1, + "target" : { + "node" : 11, + "path" : "rotation" + } + }, + { + "sampler" : 2, + "target" : { + "node" : 11, + "path" : "scale" + } + } + ], + "name" : "Animated_Alphanumeric123Action-loop", + "samplers" : [ + { + "input" : 103, + "interpolation" : "LINEAR", + "output" : 104 + }, + { + "input" : 103, + "interpolation" : "LINEAR", + "output" : 105 + }, + { + "input" : 103, + "interpolation" : "LINEAR", + "output" : 106 + } + ] + }, + { + "channels" : [ + { + "sampler" : 0, + "target" : { + "node" : 12, + "path" : "translation" + } + }, + { + "sampler" : 1, + "target" : { + "node" : 12, + "path" : "rotation" + } + }, + { + "sampler" : 2, + "target" : { + "node" : 12, + "path" : "scale" + } + } + ], + "name" : "Animated_Disallowed_Clashing_.Action-loop", + "samplers" : [ + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 107 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 108 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 109 + } + ] + }, + { + "channels" : [ + { + "sampler" : 0, + "target" : { + "node" : 13, + "path" : "translation" + } + }, + { + "sampler" : 1, + "target" : { + "node" : 13, + "path" : "rotation" + } + }, + { + "sampler" : 2, + "target" : { + "node" : 13, + "path" : "scale" + } + } + ], + "name" : "Animated_Disallowed_Clashing_@Action-loop", + "samplers" : [ + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 110 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 111 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 112 + } + ] + }, + { + "channels" : [ + { + "sampler" : 0, + "target" : { + "node" : 16, + "path" : "translation" + } + }, + { + "sampler" : 1, + "target" : { + "node" : 16, + "path" : "rotation" + } + }, + { + "sampler" : 2, + "target" : { + "node" : 16, + "path" : "scale" + } + } + ], + "name" : "Animated_Disallowed_Clashing_Deep_Tree_@Action-loop", + "samplers" : [ + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 113 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 114 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 115 + } + ] + }, + { + "channels" : [ + { + "sampler" : 0, + "target" : { + "node" : 17, + "path" : "translation" + } + }, + { + "sampler" : 1, + "target" : { + "node" : 17, + "path" : "rotation" + } + }, + { + "sampler" : 2, + "target" : { + "node" : 17, + "path" : "scale" + } + } + ], + "name" : "Animated_Disallowed_Non-clashing_.:@\"/Action-loop", + "samplers" : [ + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 116 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 117 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 118 + } + ] + }, + { + "channels" : [ + { + "sampler" : 0, + "target" : { + "node" : 18, + "path" : "translation" + } + }, + { + "sampler" : 1, + "target" : { + "node" : 18, + "path" : "rotation" + } + }, + { + "sampler" : 2, + "target" : { + "node" : 18, + "path" : "scale" + } + } + ], + "name" : "Animated_Emoji_\ud83d\ude00\ud83e\udd16Action-loop", + "samplers" : [ + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 119 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 120 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 121 + } + ] + }, + { + "channels" : [ + { + "sampler" : 0, + "target" : { + "node" : 19, + "path" : "translation" + } + }, + { + "sampler" : 1, + "target" : { + "node" : 19, + "path" : "rotation" + } + }, + { + "sampler" : 2, + "target" : { + "node" : 19, + "path" : "scale" + } + } + ], + "name" : "Animated_Katakana_\u30b4\u30c9\u30c4Action-loop", + "samplers" : [ + { + "input" : 122, + "interpolation" : "LINEAR", + "output" : 123 + }, + { + "input" : 122, + "interpolation" : "LINEAR", + "output" : 124 + }, + { + "input" : 122, + "interpolation" : "LINEAR", + "output" : 125 + } + ] + }, + { + "channels" : [ + { + "sampler" : 0, + "target" : { + "node" : 15, + "path" : "translation" + } + }, + { + "sampler" : 1, + "target" : { + "node" : 15, + "path" : "rotation" + } + }, + { + "sampler" : 2, + "target" : { + "node" : 15, + "path" : "scale" + } + } + ], + "name" : "Animated_Disallowed_Clashing_Deep_Tree_@@Action-loop", + "samplers" : [ + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 126 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 127 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 128 + } + ] + }, + { + "channels" : [ + { + "sampler" : 0, + "target" : { + "node" : 14, + "path" : "translation" + } + }, + { + "sampler" : 1, + "target" : { + "node" : 14, + "path" : "rotation" + } + }, + { + "sampler" : 2, + "target" : { + "node" : 14, + "path" : "scale" + } + } + ], + "name" : "Animated_Disallowed_Clashing_Deep_Tree_@@@Action-loop", + "samplers" : [ + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 129 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 130 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 131 + } + ] + }, + { + "channels" : [ + { + "sampler" : 0, + "target" : { + "node" : 23, + "path" : "translation" + } + }, + { + "sampler" : 1, + "target" : { + "node" : 23, + "path" : "rotation" + } + }, + { + "sampler" : 2, + "target" : { + "node" : 23, + "path" : "scale" + } + }, + { + "sampler" : 3, + "target" : { + "node" : 22, + "path" : "translation" + } + }, + { + "sampler" : 4, + "target" : { + "node" : 22, + "path" : "rotation" + } + }, + { + "sampler" : 5, + "target" : { + "node" : 22, + "path" : "scale" + } + }, + { + "sampler" : 6, + "target" : { + "node" : 21, + "path" : "translation" + } + }, + { + "sampler" : 7, + "target" : { + "node" : 21, + "path" : "rotation" + } + }, + { + "sampler" : 8, + "target" : { + "node" : 21, + "path" : "scale" + } + }, + { + "sampler" : 9, + "target" : { + "node" : 20, + "path" : "translation" + } + }, + { + "sampler" : 10, + "target" : { + "node" : 20, + "path" : "rotation" + } + }, + { + "sampler" : 11, + "target" : { + "node" : 20, + "path" : "scale" + } + }, + { + "sampler" : 12, + "target" : { + "node" : 25, + "path" : "translation" + } + }, + { + "sampler" : 13, + "target" : { + "node" : 25, + "path" : "rotation" + } + }, + { + "sampler" : 14, + "target" : { + "node" : 25, + "path" : "scale" + } + } + ], + "name" : "Animated_BonesAction-loop", + "samplers" : [ + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 132 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 133 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 134 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 135 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 136 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 137 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 138 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 139 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 140 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 141 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 142 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 143 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 144 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 145 + }, + { + "input" : 99, + "interpolation" : "LINEAR", + "output" : 146 + } + ] + } + ], + "materials" : [ + { + "doubleSided" : true, + "name" : "OutputShouldMatchInput", + "pbrMetallicRoughness" : { + "baseColorFactor" : [ + 0.004584562033414841, + 0.8000000715255737, + 0.03178425878286362, + 1 + ], + "metallicFactor" : 0, + "roughnessFactor" : 0.4000000059604645 + } + }, + { + "doubleSided" : true, + "name" : "OutputShouldMatchInputWithThisPR", + "pbrMetallicRoughness" : { + "baseColorFactor" : [ + 0, + 0.23689919710159302, + 0.8000000715255737, + 1 + ], + "metallicFactor" : 0, + "roughnessFactor" : 0.4000000059604645 + } + }, + { + "doubleSided" : true, + "name" : "OutputShouldStripCharacters", + "pbrMetallicRoughness" : { + "baseColorFactor" : [ + 0.8000000715255737, + 0.7679088711738586, + 0.0013346263440325856, + 1 + ], + "metallicFactor" : 0, + "roughnessFactor" : 0.5 + } + }, + { + "doubleSided" : true, + "name" : "OutputShouldRenameNode", + "pbrMetallicRoughness" : { + "baseColorFactor" : [ + 0.8000000715255737, + 0.010132349096238613, + 0, + 1 + ], + "metallicFactor" : 0, + "roughnessFactor" : 0.4000000059604645 + } + } + ], + "meshes" : [ + { + "name" : "Cube", + "primitives" : [ + { + "attributes" : { + "POSITION" : 0, + "NORMAL" : 1, + "TEXCOORD_0" : 2 + }, + "indices" : 3, + "material" : 0 + } + ] + }, + { + "name" : "Cube.001", + "primitives" : [ + { + "attributes" : { + "POSITION" : 4, + "NORMAL" : 5, + "TEXCOORD_0" : 6 + }, + "indices" : 7, + "material" : 1 + } + ] + }, + { + "name" : "Cube.002", + "primitives" : [ + { + "attributes" : { + "POSITION" : 8, + "NORMAL" : 9, + "TEXCOORD_0" : 10 + }, + "indices" : 3, + "material" : 1 + } + ] + }, + { + "name" : "Cube.003", + "primitives" : [ + { + "attributes" : { + "POSITION" : 11, + "NORMAL" : 12, + "TEXCOORD_0" : 13 + }, + "indices" : 7, + "material" : 1 + } + ] + }, + { + "name" : "Cube.005", + "primitives" : [ + { + "attributes" : { + "POSITION" : 14, + "NORMAL" : 15, + "TEXCOORD_0" : 16 + }, + "indices" : 7, + "material" : 2 + } + ] + }, + { + "name" : "Cube.006", + "primitives" : [ + { + "attributes" : { + "POSITION" : 17, + "NORMAL" : 18, + "TEXCOORD_0" : 19 + }, + "indices" : 3, + "material" : 3 + } + ] + }, + { + "name" : "Cube.018", + "primitives" : [ + { + "attributes" : { + "POSITION" : 20, + "NORMAL" : 21, + "TEXCOORD_0" : 22 + }, + "indices" : 7, + "material" : 3 + } + ] + }, + { + "name" : "Cube.017", + "primitives" : [ + { + "attributes" : { + "POSITION" : 23, + "NORMAL" : 24, + "TEXCOORD_0" : 25 + }, + "indices" : 7, + "material" : 3 + } + ] + }, + { + "name" : "Cube.007", + "primitives" : [ + { + "attributes" : { + "POSITION" : 26, + "NORMAL" : 27, + "TEXCOORD_0" : 28 + }, + "indices" : 7, + "material" : 3 + } + ] + }, + { + "name" : "Cube.016", + "primitives" : [ + { + "attributes" : { + "POSITION" : 29, + "NORMAL" : 30, + "TEXCOORD_0" : 31 + }, + "indices" : 3, + "material" : 3 + } + ] + }, + { + "name" : "Cube.028", + "primitives" : [ + { + "attributes" : { + "POSITION" : 32, + "NORMAL" : 33, + "TEXCOORD_0" : 34 + }, + "indices" : 7, + "material" : 1 + } + ] + }, + { + "name" : "Cube.025", + "primitives" : [ + { + "attributes" : { + "POSITION" : 35, + "NORMAL" : 36, + "TEXCOORD_0" : 37 + }, + "indices" : 3, + "material" : 0 + } + ] + }, + { + "name" : "Cube.030", + "primitives" : [ + { + "attributes" : { + "POSITION" : 38, + "NORMAL" : 39, + "TEXCOORD_0" : 40 + }, + "indices" : 3, + "material" : 3 + } + ] + }, + { + "name" : "Cube.032", + "primitives" : [ + { + "attributes" : { + "POSITION" : 41, + "NORMAL" : 42, + "TEXCOORD_0" : 43 + }, + "indices" : 3, + "material" : 3 + } + ] + }, + { + "name" : "Cube.034", + "primitives" : [ + { + "attributes" : { + "POSITION" : 44, + "NORMAL" : 45, + "TEXCOORD_0" : 46 + }, + "indices" : 7, + "material" : 3 + } + ] + }, + { + "name" : "Cube.033", + "primitives" : [ + { + "attributes" : { + "POSITION" : 47, + "NORMAL" : 48, + "TEXCOORD_0" : 49 + }, + "indices" : 7, + "material" : 3 + } + ] + }, + { + "name" : "Cube.031", + "primitives" : [ + { + "attributes" : { + "POSITION" : 50, + "NORMAL" : 51, + "TEXCOORD_0" : 52 + }, + "indices" : 7, + "material" : 3 + } + ] + }, + { + "name" : "Cube.029", + "primitives" : [ + { + "attributes" : { + "POSITION" : 53, + "NORMAL" : 54, + "TEXCOORD_0" : 55 + }, + "indices" : 7, + "material" : 2 + } + ] + }, + { + "name" : "Cube.027", + "primitives" : [ + { + "attributes" : { + "POSITION" : 56, + "NORMAL" : 57, + "TEXCOORD_0" : 58 + }, + "indices" : 3, + "material" : 1 + } + ] + }, + { + "name" : "Cube.026", + "primitives" : [ + { + "attributes" : { + "POSITION" : 59, + "NORMAL" : 60, + "TEXCOORD_0" : 61 + }, + "indices" : 7, + "material" : 1 + } + ] + }, + { + "name" : "Cylinder", + "primitives" : [ + { + "attributes" : { + "POSITION" : 62, + "NORMAL" : 63, + "TEXCOORD_0" : 64, + "JOINTS_0" : 65, + "WEIGHTS_0" : 66 + }, + "indices" : 67 + } + ] + }, + { + "name" : "Cube.010", + "primitives" : [ + { + "attributes" : { + "POSITION" : 69, + "NORMAL" : 70, + "TEXCOORD_0" : 71 + }, + "indices" : 3, + "material" : 1 + } + ] + }, + { + "name" : "Cube.008", + "primitives" : [ + { + "attributes" : { + "POSITION" : 72, + "NORMAL" : 73, + "TEXCOORD_0" : 74 + }, + "indices" : 3, + "material" : 1 + } + ] + }, + { + "name" : "Cube.020", + "primitives" : [ + { + "attributes" : { + "POSITION" : 75, + "NORMAL" : 76, + "TEXCOORD_0" : 77 + }, + "indices" : 3, + "material" : 3 + } + ] + }, + { + "name" : "Cube.022", + "primitives" : [ + { + "attributes" : { + "POSITION" : 78, + "NORMAL" : 79, + "TEXCOORD_0" : 80 + }, + "indices" : 3, + "material" : 3 + } + ] + }, + { + "name" : "Cube.024", + "primitives" : [ + { + "attributes" : { + "POSITION" : 81, + "NORMAL" : 82, + "TEXCOORD_0" : 83 + }, + "indices" : 7, + "material" : 3 + } + ] + }, + { + "name" : "Cube.023", + "primitives" : [ + { + "attributes" : { + "POSITION" : 84, + "NORMAL" : 85, + "TEXCOORD_0" : 86 + }, + "indices" : 7, + "material" : 3 + } + ] + }, + { + "name" : "Cube.021", + "primitives" : [ + { + "attributes" : { + "POSITION" : 87, + "NORMAL" : 88, + "TEXCOORD_0" : 89 + }, + "indices" : 7, + "material" : 3 + } + ] + }, + { + "name" : "Cube.019", + "primitives" : [ + { + "attributes" : { + "POSITION" : 90, + "NORMAL" : 91, + "TEXCOORD_0" : 92 + }, + "indices" : 7, + "material" : 2 + } + ] + }, + { + "name" : "Cube.009", + "primitives" : [ + { + "attributes" : { + "POSITION" : 93, + "NORMAL" : 94, + "TEXCOORD_0" : 95 + }, + "indices" : 7, + "material" : 1 + } + ] + }, + { + "name" : "Cube.004", + "primitives" : [ + { + "attributes" : { + "POSITION" : 96, + "NORMAL" : 97, + "TEXCOORD_0" : 98 + }, + "indices" : 3, + "material" : 0 + } + ] + } + ], + "skins" : [ + { + "inverseBindMatrices" : 68, + "joints" : [ + 23, + 22, + 21, + 20 + ], + "name" : "Animated_Bones" + } + ], + "accessors" : [ + { + "bufferView" : 0, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 1, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 2, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 3, + "componentType" : 5123, + "count" : 36, + "type" : "SCALAR" + }, + { + "bufferView" : 4, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 5, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 6, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 7, + "componentType" : 5123, + "count" : 36, + "type" : "SCALAR" + }, + { + "bufferView" : 8, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 9, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 10, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 11, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 12, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 13, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 14, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 15, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 16, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 17, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 18, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 19, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 20, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 21, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 22, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 23, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 24, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 25, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 26, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 27, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 28, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 29, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 30, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 31, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 32, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 33, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 34, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 35, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 36, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 37, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 38, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 39, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 40, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 41, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 42, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 43, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 44, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 45, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 46, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 47, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 48, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 49, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 50, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 51, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 52, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 53, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 54, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 55, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 56, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 57, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 58, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 59, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 60, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 61, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 62, + "componentType" : 5126, + "count" : 1242, + "max" : [ + -20.93852424621582, + 1.0000001192092896, + -1.816150426864624 + ], + "min" : [ + -22.93852424621582, + -1.0000001192092896, + -8.918821334838867 + ], + "type" : "VEC3" + }, + { + "bufferView" : 63, + "componentType" : 5126, + "count" : 1242, + "type" : "VEC3" + }, + { + "bufferView" : 64, + "componentType" : 5126, + "count" : 1242, + "type" : "VEC2" + }, + { + "bufferView" : 65, + "componentType" : 5121, + "count" : 1242, + "type" : "VEC4" + }, + { + "bufferView" : 66, + "componentType" : 5126, + "count" : 1242, + "type" : "VEC4" + }, + { + "bufferView" : 67, + "componentType" : 5123, + "count" : 2100, + "type" : "SCALAR" + }, + { + "bufferView" : 68, + "componentType" : 5126, + "count" : 4, + "type" : "MAT4" + }, + { + "bufferView" : 69, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 70, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 71, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 72, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 73, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 74, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 75, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 76, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 77, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 78, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 79, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 80, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 81, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 82, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 83, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 84, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 85, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 86, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 87, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 88, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 89, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 90, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 91, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 92, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 93, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 94, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 95, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 96, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 97, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 98, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 99, + "componentType" : 5126, + "count" : 41, + "max" : [ + 1.6666666666666667 + ], + "min" : [ + 0 + ], + "type" : "SCALAR" + }, + { + "bufferView" : 100, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 101, + "componentType" : 5126, + "count" : 41, + "type" : "VEC4" + }, + { + "bufferView" : 102, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 103, + "componentType" : 5126, + "count" : 61, + "max" : [ + 2.5 + ], + "min" : [ + 0 + ], + "type" : "SCALAR" + }, + { + "bufferView" : 104, + "componentType" : 5126, + "count" : 61, + "type" : "VEC3" + }, + { + "bufferView" : 105, + "componentType" : 5126, + "count" : 61, + "type" : "VEC4" + }, + { + "bufferView" : 106, + "componentType" : 5126, + "count" : 61, + "type" : "VEC3" + }, + { + "bufferView" : 107, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 108, + "componentType" : 5126, + "count" : 41, + "type" : "VEC4" + }, + { + "bufferView" : 109, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 110, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 111, + "componentType" : 5126, + "count" : 41, + "type" : "VEC4" + }, + { + "bufferView" : 112, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 113, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 114, + "componentType" : 5126, + "count" : 41, + "type" : "VEC4" + }, + { + "bufferView" : 115, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 116, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 117, + "componentType" : 5126, + "count" : 41, + "type" : "VEC4" + }, + { + "bufferView" : 118, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 119, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 120, + "componentType" : 5126, + "count" : 41, + "type" : "VEC4" + }, + { + "bufferView" : 121, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 122, + "componentType" : 5126, + "count" : 21, + "max" : [ + 0.8333333333333334 + ], + "min" : [ + 0 + ], + "type" : "SCALAR" + }, + { + "bufferView" : 123, + "componentType" : 5126, + "count" : 21, + "type" : "VEC3" + }, + { + "bufferView" : 124, + "componentType" : 5126, + "count" : 21, + "type" : "VEC4" + }, + { + "bufferView" : 125, + "componentType" : 5126, + "count" : 21, + "type" : "VEC3" + }, + { + "bufferView" : 126, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 127, + "componentType" : 5126, + "count" : 41, + "type" : "VEC4" + }, + { + "bufferView" : 128, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 129, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 130, + "componentType" : 5126, + "count" : 41, + "type" : "VEC4" + }, + { + "bufferView" : 131, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 132, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 133, + "componentType" : 5126, + "count" : 41, + "type" : "VEC4" + }, + { + "bufferView" : 134, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 135, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 136, + "componentType" : 5126, + "count" : 41, + "type" : "VEC4" + }, + { + "bufferView" : 137, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 138, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 139, + "componentType" : 5126, + "count" : 41, + "type" : "VEC4" + }, + { + "bufferView" : 140, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 141, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 142, + "componentType" : 5126, + "count" : 41, + "type" : "VEC4" + }, + { + "bufferView" : 143, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 144, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + }, + { + "bufferView" : 145, + "componentType" : 5126, + "count" : 41, + "type" : "VEC4" + }, + { + "bufferView" : 146, + "componentType" : 5126, + "count" : 41, + "type" : "VEC3" + } + ], + "bufferViews" : [ + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 0 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 288 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 576 + }, + { + "buffer" : 0, + "byteLength" : 72, + "byteOffset" : 768 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 840 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 1128 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 1416 + }, + { + "buffer" : 0, + "byteLength" : 72, + "byteOffset" : 1608 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 1680 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 1968 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 2256 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 2448 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 2736 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 3024 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 3216 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 3504 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 3792 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 3984 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 4272 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 4560 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 4752 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 5040 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 5328 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 5520 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 5808 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 6096 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 6288 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 6576 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 6864 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 7056 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 7344 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 7632 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 7824 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 8112 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 8400 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 8592 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 8880 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 9168 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 9360 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 9648 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 9936 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 10128 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 10416 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 10704 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 10896 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 11184 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 11472 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 11664 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 11952 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 12240 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 12432 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 12720 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 13008 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 13200 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 13488 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 13776 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 13968 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 14256 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 14544 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 14736 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 15024 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 15312 + }, + { + "buffer" : 0, + "byteLength" : 14904, + "byteOffset" : 15504 + }, + { + "buffer" : 0, + "byteLength" : 14904, + "byteOffset" : 30408 + }, + { + "buffer" : 0, + "byteLength" : 9936, + "byteOffset" : 45312 + }, + { + "buffer" : 0, + "byteLength" : 4968, + "byteOffset" : 55248 + }, + { + "buffer" : 0, + "byteLength" : 19872, + "byteOffset" : 60216 + }, + { + "buffer" : 0, + "byteLength" : 4200, + "byteOffset" : 80088 + }, + { + "buffer" : 0, + "byteLength" : 256, + "byteOffset" : 84288 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 84544 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 84832 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 85120 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 85312 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 85600 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 85888 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 86080 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 86368 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 86656 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 86848 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 87136 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 87424 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 87616 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 87904 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 88192 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 88384 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 88672 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 88960 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 89152 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 89440 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 89728 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 89920 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 90208 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 90496 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 90688 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 90976 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 91264 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 91456 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 91744 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 92032 + }, + { + "buffer" : 0, + "byteLength" : 164, + "byteOffset" : 92224 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 92388 + }, + { + "buffer" : 0, + "byteLength" : 656, + "byteOffset" : 92880 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 93536 + }, + { + "buffer" : 0, + "byteLength" : 244, + "byteOffset" : 94028 + }, + { + "buffer" : 0, + "byteLength" : 732, + "byteOffset" : 94272 + }, + { + "buffer" : 0, + "byteLength" : 976, + "byteOffset" : 95004 + }, + { + "buffer" : 0, + "byteLength" : 732, + "byteOffset" : 95980 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 96712 + }, + { + "buffer" : 0, + "byteLength" : 656, + "byteOffset" : 97204 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 97860 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 98352 + }, + { + "buffer" : 0, + "byteLength" : 656, + "byteOffset" : 98844 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 99500 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 99992 + }, + { + "buffer" : 0, + "byteLength" : 656, + "byteOffset" : 100484 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 101140 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 101632 + }, + { + "buffer" : 0, + "byteLength" : 656, + "byteOffset" : 102124 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 102780 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 103272 + }, + { + "buffer" : 0, + "byteLength" : 656, + "byteOffset" : 103764 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 104420 + }, + { + "buffer" : 0, + "byteLength" : 84, + "byteOffset" : 104912 + }, + { + "buffer" : 0, + "byteLength" : 252, + "byteOffset" : 104996 + }, + { + "buffer" : 0, + "byteLength" : 336, + "byteOffset" : 105248 + }, + { + "buffer" : 0, + "byteLength" : 252, + "byteOffset" : 105584 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 105836 + }, + { + "buffer" : 0, + "byteLength" : 656, + "byteOffset" : 106328 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 106984 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 107476 + }, + { + "buffer" : 0, + "byteLength" : 656, + "byteOffset" : 107968 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 108624 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 109116 + }, + { + "buffer" : 0, + "byteLength" : 656, + "byteOffset" : 109608 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 110264 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 110756 + }, + { + "buffer" : 0, + "byteLength" : 656, + "byteOffset" : 111248 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 111904 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 112396 + }, + { + "buffer" : 0, + "byteLength" : 656, + "byteOffset" : 112888 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 113544 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 114036 + }, + { + "buffer" : 0, + "byteLength" : 656, + "byteOffset" : 114528 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 115184 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 115676 + }, + { + "buffer" : 0, + "byteLength" : 656, + "byteOffset" : 116168 + }, + { + "buffer" : 0, + "byteLength" : 492, + "byteOffset" : 116824 + } + ], + "buffers" : [ + { + "byteLength" : 117316, + "uri" : "45545-relax-name-sanitization.bin" + } + ] +} diff --git a/tests/blend_export/test_45545.gd b/tests/blend_export/test_45545.gd new file mode 100644 index 00000000..93fbcdf2 --- /dev/null +++ b/tests/blend_export/test_45545.gd @@ -0,0 +1,383 @@ +extends ColorRect + +const GOLDEN_GLTF_SCENE: PackedScene = preload("res://gltf/45545-relax-name-sanitization.gltf") + +## These constants are the prefix part of the node names used in the golden glTF file. +# Prefix for "basic" nodes, no import hints, no animation, etc... +const GLTF_PREFIX_BASIC: String = "Basic_" + +# Prefix for nodes that have an import hint. +const GLTF_PREFIX_HINTED: String = "Hinted_" + +# Prefix for nodes that have an associated animation. +const GLTF_PREFIX_ANIMATED: String = "Animated_" + +# The suffix for animations (all animations in the golden glTF file use the Blender default suffix +# "Action" and the looping import hint "-loop". +const GLTF_SUFFIX_ANIMATION: String = "Action-loop" + +## These constants are the infix part of the node names used in the golden glTF file. +const GLTF_ALPHANUMERIC: String = "Alphanumeric123" +# The last three symbols are: +# https://en.wiktionary.org/wiki/%E3%82%B4#Japanese +# https://en.wiktionary.org/wiki/%E3%83%89#Japanese +# https://en.wiktionary.org/wiki/%E3%83%84#Japanese +const GLTF_KATAKANA: String = "Katakana_ใ‚ดใƒ‰ใƒ„" +# The last two symbols are: +# https://emojipedia.org/grinning-face +# https://emojipedia.org/robot/ +const GLTF_EMOJI: String = "Emoji_๐Ÿ˜€๐Ÿค–" +const GLTF_ALLOWED_SYMBOLS: String = "AllowedSymbols_!#$%^&*()-=[]{}';<>,~" +const GLTF_DISALLOWED_NONCLASHING: String = "Disallowed_Non-clashing_.:@\"/" +const GLTF_DISALLOWED_CLASHING_1: String = "Disallowed_Clashing_." +const GLTF_DISALLOWED_CLASHING_2: String = "Disallowed_Clashing_@" +const GLTF_DISALLOWED_CLASHING_DEEP_TREE_1: String = "Disallowed_Clashing_Deep_Tree_@" +const GLTF_DISALLOWED_CLASHING_DEEP_TREE_2: String = "Disallowed_Clashing_Deep_Tree_@@" +const GLTF_DISALLOWED_CLASHING_DEEP_TREE_3: String = "Disallowed_Clashing_Deep_Tree_@@@" + +var output: BoxContainer +var test_scene: Node +var test_animation_player: AnimationPlayer + + +func _ready(): + output = $ScrollContainer/OutputWindow + test_scene = GOLDEN_GLTF_SCENE.instance() + test_animation_player = test_scene.get_node_or_null("AnimationPlayer") + if not test_animation_player: + _add_line("ERROR: imported glTF scene has no AnimationPlayer node!", Color.orangered) + print("FAIL: imported glTF scene has no AnimationPlayer so no tests will be run.") + return + + var passed_tests: Array = [] + var failed_tests: Array = [] + + for method_name in _find_tests(): + _add_test_header(method_name) + var result: bool = self.call(method_name) + _add_line(" ") + if result: + passed_tests.push_back(method_name) + else: + failed_tests.push_back(method_name) + + if failed_tests: + print("FAIL: %d failed tests:" % len(failed_tests)) + for test in failed_tests: + print("\t%s" % test) + print("") + print("Animations:") + for animation_name in test_animation_player.get_animation_list(): + print("\t%s" % animation_name) + else: + print("PASS: Passed all %d tests" % len(passed_tests)) + + +func _find_tests() -> Array: + var ret: Array = [] + for method in get_method_list(): + var method_name: String = method.get("name") + if method_name.begins_with("_test_"): + ret.push_back(method_name) + ret.sort() + return ret + + +func _add_test_header(method_name: String) -> void: + _add_line(method_name, Color.royalblue) + + +func _add_result(succeeded: bool, message: String) -> void: + var prefix: String = " [OK] " if succeeded else " [FAIL] " + _add_line(prefix + message, Color.forestgreen if succeeded else Color.orangered) + + +func _add_line(text: String, font_color: Color = Color.black) -> void: + var line: Label = Label.new() + line.text = text + line.add_theme_font_size_override("font_size", 22) + line.add_theme_color_override("font_color", font_color) + output.add_child(line) + print(text) + + +func _check_basic(original: String, expected: String) -> bool: + var node: Node = test_scene.get_node_or_null(expected) + if not node: + _add_result( + false, + "Missing expected Godot node '%s' for glTF node '%s'" % [expected, original]) + return false + _add_result(true, "Found expected node '%s'" % expected) + return true + + +func _test_basic_alphanumeric_is_unchanged() -> bool: + var original: String = GLTF_PREFIX_BASIC + GLTF_ALPHANUMERIC + var expected: String = original + return _check_basic(original, expected) + + +func _test_basic_allowed_symbols_is_unchanged() -> bool: + var original: String = GLTF_PREFIX_BASIC + GLTF_ALLOWED_SYMBOLS + var expected: String = original + return _check_basic(original, expected) + + +func _test_basic_katakana_is_unchanged() -> bool: + var original: String = GLTF_PREFIX_BASIC + GLTF_KATAKANA + var expected: String = original + return _check_basic(original, expected) + + +func _test_basic_emoji_is_unchanged() -> bool: + var original: String = GLTF_PREFIX_BASIC + GLTF_EMOJI + var expected: String = original + return _check_basic(original, expected) + + +func _test_basic_disallowed_characters_are_stripped() -> bool: + var original: String = GLTF_PREFIX_BASIC + GLTF_DISALLOWED_NONCLASHING + var expected: String = GLTF_PREFIX_BASIC + "Disallowed_Non-clashing_" + return _check_basic(original, expected) + + +func _test_basic_disallowed_clashing_nodes_are_uniquified() -> bool: + var original: String = GLTF_PREFIX_BASIC + GLTF_DISALLOWED_CLASHING_1 + var expected: String = GLTF_PREFIX_BASIC + "Disallowed_Clashing_" + if not _check_basic(original, expected): + return false + + original = GLTF_PREFIX_BASIC + GLTF_DISALLOWED_CLASHING_2 + expected = GLTF_PREFIX_BASIC + "Disallowed_Clashing_2" + return _check_basic(original, expected) + + +func _test_basic_disallowed_nested_nodes_are_uniquified() -> bool: + # Note: Blender 9.2 serializes in prefix order, so the leaf child will be named first. + var original: String = GLTF_PREFIX_BASIC + GLTF_DISALLOWED_CLASHING_DEEP_TREE_1 + var expected_root: String = GLTF_PREFIX_BASIC + "Disallowed_Clashing_Deep_Tree_3" + if not _check_basic(original, expected_root): + return false + + original = GLTF_PREFIX_BASIC + GLTF_DISALLOWED_CLASHING_DEEP_TREE_2 + var expected_mid = expected_root + "/" + GLTF_PREFIX_BASIC + "Disallowed_Clashing_Deep_Tree_2" + if not _check_basic(original, expected_mid): + return false + + original = GLTF_PREFIX_BASIC + GLTF_DISALLOWED_CLASHING_DEEP_TREE_3 + var expected_leaf = expected_mid + "/" + GLTF_PREFIX_BASIC + "Disallowed_Clashing_Deep_Tree_" + return _check_basic(original, expected_leaf) + + +# Verifies that a node exists with the expected name and that it has a StaticBody3D child. +func _check_hinted_col(original: String, expected: String) -> bool: + var node: Node = test_scene.get_node_or_null(expected) + if not node: + _add_result( + false, + "Missing expected Godot node '%s' for glTF node '%s'" % [expected, original]) + return false + + var collision_body: StaticBody3D = node.get_node_or_null("static_collision") + if not collision_body: + _add_result( + false, + "Missing 'static_collision' child for Godot node '%s' (glTF '%s')" % [ + expected, original]) + return false + + # This test assumes that if the static_collision node was created the -col hint was properly + # handled (as that behavior should be tested elsewhere). + _add_result(true, "Expected node '%s' contains a static_collision StaticBody3D" % expected) + return true + + +func _test_hinted_alphanumeric_is_unchanged() -> bool: + var original: String = GLTF_PREFIX_HINTED + GLTF_ALPHANUMERIC + var expected: String = original + return _check_hinted_col(original, expected) + + +func _test_hinted_allowed_symbols_is_unchanged() -> bool: + var original: String = GLTF_PREFIX_HINTED + GLTF_ALLOWED_SYMBOLS + var expected: String = original + return _check_hinted_col(original, expected) + + +func _test_hinted_katakana_is_unchanged() -> bool: + var original: String = GLTF_PREFIX_HINTED + GLTF_KATAKANA + var expected: String = original + return _check_hinted_col(original, expected) + + +func _test_hinted_emoji_is_unchanged() -> bool: + var original: String = GLTF_PREFIX_HINTED + GLTF_EMOJI + var expected: String = original + return _check_hinted_col(original, expected) + + +func _test_hinted_disallowed_characters_are_stripped() -> bool: + var original: String = GLTF_PREFIX_HINTED + GLTF_DISALLOWED_NONCLASHING + var expected: String = GLTF_PREFIX_HINTED + "Disallowed_Non-clashing_" + return _check_hinted_col(original, expected) + + +func _test_hinted_disallowed_clashing_nodes_are_uniquified() -> bool: + var original: String = GLTF_PREFIX_HINTED + GLTF_DISALLOWED_CLASHING_1 + var expected: String = GLTF_PREFIX_HINTED + "Disallowed_Clashing_" + if not _check_hinted_col(original, expected): + return false + + original = GLTF_PREFIX_HINTED + GLTF_DISALLOWED_CLASHING_2 + expected = GLTF_PREFIX_HINTED + "Disallowed_Clashing_2" + return _check_hinted_col(original, expected) + + +func _test_hinted_disallowed_nested_nodes_are_uniquified() -> bool: + var original: String = GLTF_PREFIX_HINTED + GLTF_DISALLOWED_CLASHING_DEEP_TREE_1 + var expected_root: String = GLTF_PREFIX_HINTED + "Disallowed_Clashing_Deep_Tree_3" + if not _check_hinted_col(original, expected_root): + return false + + original = GLTF_PREFIX_HINTED + GLTF_DISALLOWED_CLASHING_DEEP_TREE_2 + var expected_mid = expected_root + "/" + GLTF_PREFIX_HINTED + "Disallowed_Clashing_Deep_Tree_2" + if not _check_hinted_col(original, expected_mid): + return false + + original = GLTF_PREFIX_HINTED + GLTF_DISALLOWED_CLASHING_DEEP_TREE_3 + var expected_leaf = expected_mid + "/" + GLTF_PREFIX_HINTED + "Disallowed_Clashing_Deep_Tree_" + return _check_hinted_col(original, expected_leaf) + + +# Verifies that a node exists with the expected name and that an associated animation exists. +func _check_animated(original: String, expected: String, expected_animation: String = "") -> bool: + var node: Node = test_scene.get_node_or_null(expected) + if not node: + _add_result( + false, + "Missing expected Godot node '%s' for glTF node '%s'" % [expected, original]) + return false + + if expected_animation.is_empty(): + expected_animation = expected + GLTF_SUFFIX_ANIMATION + var animation: Animation = test_animation_player.get_animation(expected_animation) + if not animation: + _add_result( + false, + "Missing expected animation '%s' for Godot node '%s' (glTF '%s')" % [ + expected_animation, expected, original]) + return false + + var track_count: int = animation.get_track_count() + if track_count != 1: + _add_result( + false, + "Track count %d != 1 on animation '%s' for Godot node '%s' (glTF '%s')" % [ + track_count, expected_animation, expected, original]) + return false + + # All of the golden test animations are transforms. + var track_type: int = animation.track_get_type(0) + if track_type != Animation.TYPE_TRANSFORM: + _add_result( + false, + "Unexpected track type %d on animation '%s' for Godot node '%s' (glTF '%s')" % [ + track_type, expected_animation, expected, original]) + return false + + var track_key_count: int = animation.track_get_key_count(0) + if track_key_count <= 0: + _add_result( + false, + ("Animation track has unexpected %d (<= 0) key frames on animation '%s' for Godot node \ + '%s' (glTF '%s')" % [ + track_key_count, expected_animation, expected, original])) + return false + + var track_path: NodePath = animation.track_get_path(0) + var expected_track_path = NodePath(expected) + if track_path != expected_track_path: + _add_result( + false, + ("Incorrect track_path '%s' (expected '%s') on animation '%s' for Godot node '%s' \ + (glTF '%s')" % [ + track_path, expected_track_path, expected_animation, expected, original])) + return false + + # This test assumes that if the static_collision node was created the -col hint was properly + # handled (as that behavior should be tested elsewhere). + _add_result(true, "Expected node '%s' has an associated animation" % expected) + return true + + +func _test_animated_alphanumeric_is_unchanged() -> bool: + var original: String = GLTF_PREFIX_ANIMATED + GLTF_ALPHANUMERIC + var expected: String = original + return _check_animated(original, expected) + + +func _test_animated_allowed_symbols_is_unchanged() -> bool: + var original: String = GLTF_PREFIX_ANIMATED + GLTF_ALLOWED_SYMBOLS + var expected_node: String = original + var expected_animation: String = original.replace(",", "").replace("[", "") + expected_animation += GLTF_SUFFIX_ANIMATION + return _check_animated(original, expected_node, expected_animation) + + +func _test_animated_katakana_is_unchanged() -> bool: + var original: String = GLTF_PREFIX_ANIMATED + GLTF_KATAKANA + var expected: String = original + return _check_animated(original, expected) + + +func _test_animated_emoji_is_unchanged() -> bool: + var original: String = GLTF_PREFIX_ANIMATED + GLTF_EMOJI + var expected: String = original + return _check_animated(original, expected) + + +func _test_animated_disallowed_characters_are_stripped() -> bool: + var original: String = GLTF_PREFIX_ANIMATED + GLTF_DISALLOWED_NONCLASHING + var expected: String = GLTF_PREFIX_ANIMATED + "Disallowed_Non-clashing_" + return _check_animated(original, expected) + + +func _test_animated_disallowed_clashing_nodes_are_uniquified() -> bool: + var original: String = GLTF_PREFIX_ANIMATED + GLTF_DISALLOWED_CLASHING_1 + var expected: String = GLTF_PREFIX_ANIMATED + "Disallowed_Clashing_" + # WARNING: Animation name disambiguation is dependent on the order in the gltf file. The + # ordering appears to be deterministic within a given Blender version, but if this fails + # it would be good to first check that the ordering has not changed. + var expected_animation = GLTF_PREFIX_ANIMATED + "Disallowed_Clashing_Action-loop" + if not _check_animated(original, expected, expected_animation): + return false + + original = GLTF_PREFIX_ANIMATED + GLTF_DISALLOWED_CLASHING_2 + expected = GLTF_PREFIX_ANIMATED + "Disallowed_Clashing_2" + expected_animation = GLTF_PREFIX_ANIMATED + "Disallowed_Clashing_Action-loop2" + return _check_animated(original, expected, expected_animation) + + +func _test_animated_disallowed_nested_nodes_are_uniquified() -> bool: + var original: String = GLTF_PREFIX_ANIMATED + GLTF_DISALLOWED_CLASHING_DEEP_TREE_1 + var expected_root: String = GLTF_PREFIX_ANIMATED + "Disallowed_Clashing_Deep_Tree_3" + # WARNING: Animation name disambiguation is dependent on the order in the gltf file. The + # ordering appears to be deterministic within a given Blender version, but if this fails + # it would be good to first check that the ordering has not changed. + var expected_animation = GLTF_PREFIX_ANIMATED + "Disallowed_Clashing_Deep_Tree_Action-loop" + if not _check_animated(original, expected_root, expected_animation): + return false + + original = GLTF_PREFIX_ANIMATED + GLTF_DISALLOWED_CLASHING_DEEP_TREE_2 + var expected_mid = (expected_root + "/" + + GLTF_PREFIX_ANIMATED + "Disallowed_Clashing_Deep_Tree_2") + expected_animation = GLTF_PREFIX_ANIMATED + "Disallowed_Clashing_Deep_Tree_Action-loop2" + if not _check_animated(original, expected_mid, expected_animation): + return false + + original = GLTF_PREFIX_ANIMATED + GLTF_DISALLOWED_CLASHING_DEEP_TREE_3 + var expected_leaf = (expected_mid + "/" + + GLTF_PREFIX_ANIMATED + "Disallowed_Clashing_Deep_Tree_") + expected_animation = GLTF_PREFIX_ANIMATED + "Disallowed_Clashing_Deep_Tree_Action-loop3" + return _check_animated(original, expected_leaf, expected_animation) diff --git a/tests/blend_export/test_45545.tscn b/tests/blend_export/test_45545.tscn new file mode 100644 index 00000000..8bb53830 --- /dev/null +++ b/tests/blend_export/test_45545.tscn @@ -0,0 +1,22 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://test_45545.gd" type="Script" id=1] + +[node name="Test45545" type="ColorRect"] +anchor_right = 1.0 +anchor_bottom = 1.0 +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="ScrollContainer" type="ScrollContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +script = null +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="OutputWindow" type="VBoxContainer" parent="ScrollContainer"] +script = null