Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gltf validator #2393

Merged
merged 6 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading