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

Remove check for known extension prefixes #218

Merged
merged 2 commits into from
May 31, 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
1 change: 0 additions & 1 deletion ISSUES.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
|SKIN_SKELETON_INVALID|Skeleton node is not a common root.|Error|
|UNKNOWN_ASSET_MAJOR_VERSION|Unknown glTF major asset version: `%1`.|Error|
|UNKNOWN_ASSET_MINOR_VERSION|Unknown glTF minor asset version: `%1`.|Warning|
|UNRESERVED_EXTENSION_PREFIX|Extension uses unreserved extension prefix '`%1`'.|Warning|
|UNUSED_EXTENSION_REQUIRED|Unused extension '`%1`' cannot be required.|Error|
## LinkError
| Code | Message | Severity |
Expand Down
3 changes: 0 additions & 3 deletions lib/src/context.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,6 @@ class Context {
if (prefix == null) {
addIssue(SemanticError.invalidExtensionNameFormat,
name: '/$EXTENSIONS_USED/$i');
} else if (!kReservedPrefixes.contains(prefix)) {
addIssue(SemanticError.unreservedExtensionPrefix,
name: '/$EXTENSIONS_USED/$i', args: [prefix]);
}

final extension = _userExtensions.firstWhere(
Expand Down
5 changes: 0 additions & 5 deletions lib/src/errors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -433,11 +433,6 @@ class SemanticError extends IssueType {
'NON_REQUIRED_EXTENSION',
(args) => 'Extension ${_q(args[0])} cannot be optional.');

static final SemanticError unreservedExtensionPrefix = SemanticError._(
'UNRESERVED_EXTENSION_PREFIX',
(args) => 'Extension uses unreserved extension prefix ${_q(args[0])}.',
Severity.Warning);

static final SemanticError invalidExtensionNameFormat = SemanticError._(
'INVALID_EXTENSION_NAME_FORMAT',
(args) => 'Extension name has invalid format.',
Expand Down
68 changes: 0 additions & 68 deletions lib/src/ext/extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,71 +113,3 @@ const List<Extension> kDefaultExtensions = <Extension>[
khrMeshQuantizationExtension,
khrTextureTransformExtension
];

// https://github.com/KhronosGroup/glTF/blob/main/extensions/Prefixes.md
const Set<String> kReservedPrefixes = <String>{
'KHR',
'EXT',
'ADOBE',
'AGI',
'AGT',
'ALCM',
'ALI',
'AMZN',
'ANIMECH',
'ASOBO',
'AVR',
'BLENDER',
'CAPTURE',
'CESIUM',
'CITRUS',
'CLO',
'CVTOOLS',
'DOTV',
'EMBARK',
'EPIC',
'ESSILORLUXOTTICA',
'F8',
'FB',
'FOXIT',
'GOOGLE',
'GRIFFEL',
'HEVOLUS',
'INTEL',
'KDAB',
'LLQ',
'MAXAR',
'MESHOPT',
'MOZ',
'MPEG',
'MSFT',
'MTTR',
'MX',
'NEEDLE',
'NTAR',
'NV',
'OFT',
'OMI',
'OTOY',
'OWLII',
'PANDA3D',
'POLUTROPON',
'PTC',
'S8S',
'SE',
'SEIN',
'SHAPEDIVER',
'SI',
'SKFB',
'SKYLINE',
'SNAP',
'SPECTRUM',
'TENCENT',
'TRYON',
'UNITY',
'USSF',
'UX3D',
'VRMC',
'VSEKAI',
'WEB3D'
};
1 change: 0 additions & 1 deletion test/base/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@
"invalid_extension_name.gltf": "Invalid extension name",
"named_objects.gltf": "Valid named objects",
"undefined_used_extensions.gltf": "Undefined used extensions array",
"unreserved_extension_prefix.gltf": "Unreserved extension prefix",
"unused_objects.gltf": "Unused objects",
"valid.gltf": "Valid"
}
Expand Down
6 changes: 0 additions & 6 deletions test/base/data/root/unreserved_extension_prefix.gltf

This file was deleted.

44 changes: 0 additions & 44 deletions test/base/data/root/unreserved_extension_prefix.gltf.report.json

This file was deleted.

Loading