Skip to content

Commit

Permalink
Merge pull request #2393 from KhronosGroup/update_gltf_validator
Browse files Browse the repository at this point in the history
Update gltf validator
  • Loading branch information
julienduroure authored Nov 20, 2024
2 parents 9a898ec + 877a04e commit 0b88535
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 27 deletions.
2 changes: 1 addition & 1 deletion tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dependencies": {},
"devDependencies": {
"eslint": "^9.3.0",
"gltf-validator": "2.0.0-dev.3.9",
"gltf-validator": "^2.0.0-dev.3.10",
"mocha": "^10.4.0",
"mochawesome": "^7.1.3"
},
Expand Down
12 changes: 3 additions & 9 deletions tests/roundtrip/24_animation_pointer/24_animation_pointer.gltf
Original file line number Diff line number Diff line change
Expand Up @@ -4883,7 +4883,7 @@
"path": "pointer",
"extensions": {
"KHR_animation_pointer": {
"pointer": "/materials/5/normalTexture/scale"
"pointer": "/materials/5/normalTexture/offset"
}
}
}
Expand Down Expand Up @@ -7507,10 +7507,7 @@
"KHR_texture_transform": {}
}
},
"name": "PBRProperties-NormalScale",
"extensions": {
"KHR_texture_transform": {}
}
"name": "PBRProperties-NormalScale"
},
{
"pbrMetallicRoughness": {
Expand Down Expand Up @@ -7549,10 +7546,7 @@
},
"metallicFactor": 0.0
},
"name": "TextureTransform",
"extensions": {
"KHR_texture_transform": {}
}
"name": "TextureTransform"
},
{
"pbrMetallicRoughness": {
Expand Down

This file was deleted.

1 change: 1 addition & 0 deletions tests/roundtrip/25_anisotropy/25_anisotropy_options.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--export-tangent
27 changes: 15 additions & 12 deletions tests/roundtrip_gltf.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,22 @@
if '--use-variants' in argv:
bpy.context.preferences.addons['io_scene_gltf2'].preferences.KHR_materials_variants_ui = True

if '--export_not_shared_accessors' in argv:
export_shared_accessors = False
else:
export_shared_accessors = True
export_shared_accessors = False if '--export_not_shared_accessors' in argv else True
export_tangent = True if '--export-tangent' in argv else False
export_force_sample_anim = False if '--no-sample-anim' in argv else True
export_attributes = True if '--export-attributes' in argv else False
export_gpu_instances = True if '--export-gpu_instances' in argv else False

if '--no-sample-anim' in argv:
bpy.ops.export_scene.gltf(export_format=export_format, filepath=os.path.join(output_dir, path_parts[1]), export_force_sampling=False)
elif '--export-attributes' in argv:
bpy.ops.export_scene.gltf(export_format=export_format, filepath=os.path.join(output_dir, path_parts[1]), export_attributes=True, export_shared_accessors=export_shared_accessors)
elif '--export-gpu_instances' in argv:
bpy.ops.export_scene.gltf(export_format=export_format, filepath=os.path.join(output_dir, path_parts[1]), export_gpu_instances=True)
else:
bpy.ops.export_scene.gltf(export_format=export_format, filepath=os.path.join(output_dir, path_parts[1]))

bpy.ops.export_scene.gltf(
export_format=export_format,
filepath=os.path.join(output_dir, path_parts[1]),
export_shared_accessors=export_shared_accessors,
export_tangents=export_tangent,
export_force_sampling=export_force_sample_anim,
export_attributes=export_attributes,
export_gpu_instances=export_gpu_instances
)
except Exception as err:
print(err, file=sys.stderr)
sys.exit(1)
Binary file modified tests/scenes/33_anisotropy_from_grayscale.blend
Binary file not shown.
8 changes: 4 additions & 4 deletions tests/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -507,10 +507,10 @@ globals@^14.0.0:
resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e"
integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==

gltf-validator@^2.0.0-dev.3.9:
version "2.0.0-dev.3.9"
resolved "https://registry.yarnpkg.com/gltf-validator/-/gltf-validator-2.0.0-dev.3.9.tgz#831cd4d95ce36bc8a2cc176b739c927012119e98"
integrity sha512-9nPcAgYJwT6sbml7S3/tC+N/BkqTUSL1u8GcmUQLuwToLR0ZH8CF3i/BhVqDwlg7OmKS2GGjjEcnU/oMMeIQUQ==
gltf-validator@^2.0.0-dev.3.10:
version "2.0.0-dev.3.10"
resolved "https://registry.yarnpkg.com/gltf-validator/-/gltf-validator-2.0.0-dev.3.10.tgz#9b09225db864fe3f0a584259f65d087e2213a93a"
integrity sha512-odJ4k0tRkGXiDGn78yDBg+fBbAIvBnXxh3RwAta0emSxGtyagFE8B4xELB1oYe3S5RD8Ci3uZAsZaascH2LAEQ==

graceful-fs@^4.1.6, graceful-fs@^4.2.0:
version "4.2.11"
Expand Down

0 comments on commit 0b88535

Please sign in to comment.