Just an update on this - I’ve been testing it out and the EXT_mesh_features
is populated in the extensionsUsed array, however EXT_structural_metadata
is not added.
Here’s the resulting GLTF which is created from the example code found here Aspose.3D for .NET 25.5 Release Notes
I’m currently adding the EXT_structural_metadata
extension to the array after the file has been saved. As can be seen below, the EXT_structural_metadata
extension has been used and is correctly set out at the bottom of the file:
{
"extensionsUsed": [
"EXT_mesh_features"
],
"accessors": [
{
"bufferView": 0,
"byteOffset": 0,
"componentType": 5123,
"count": 12,
"type": "SCALAR",
"max": [
7
],
"min": [
0
]
},
{
"bufferView": 1,
"byteOffset": 0,
"componentType": 5126,
"count": 8,
"type": "VEC3",
"max": [
4,
2,
0
],
"min": [
0,
0,
0
],
"name": "POSITION"
},
{
"bufferView": 1,
"byteOffset": 12,
"componentType": 5126,
"count": 8,
"type": "SCALAR",
"max": [
1
],
"min": [
0
],
"name": "_FEATURE_ID_0"
}
],
"asset": {
"generator": "Aspose.3D 25.9.0",
"version": "2.0"
},
"buffers": [
{
"uri": "test_1_data.bin",
"byteLength": 176
}
],
"bufferViews": [
{
"buffer": 0,
"byteOffset": 0,
"byteLength": 24,
"target": 34963
},
{
"buffer": 0,
"byteOffset": 24,
"byteLength": 128,
"byteStride": 16,
"target": 34962
},
{
"buffer": 0,
"byteOffset": 152,
"byteLength": 12
},
{
"buffer": 0,
"byteOffset": 164,
"byteLength": 12
}
],
"meshes": [
{
"primitives": [
{
"attributes": {
"POSITION": 1,
"_FEATURE_ID_0": 2
},
"indices": 0,
"mode": 4,
"extensions": {
"EXT_mesh_features": {
"featureIds": [
{
"featureCount": 2,
"attribute": 0,
"propertyTable": 0
}
]
}
}
}
],
"name": ""
}
],
"nodes": [
{
"mesh": 0,
"name": ""
}
],
"scene": 0,
"scenes": [
{
"nodes": [
0
]
}
],
"extensions": {
"EXT_structural_metadata": {
"schema": {
"id": "metadata",
"classes": {
"test_class": {
"properties": {
"enum_value": {
"name": "enum_value",
"description": "enum_value",
"array": true,
"normalized": false,
"type": "ENUM",
"enumType": "test_enum"
}
},
"name": "test_class"
}
},
"enums": {
"test_enum": {
"name": "test_enum",
"values": [
{
"value": 0,
"name": "ENUM_A"
},
{
"value": 1,
"name": "ENUM_B"
}
]
}
}
},
"propertyTables": [
{
"name": "example",
"class": "test_class",
"properties": {
"enum_value": {
"arrayOffsets": 2,
"values": 3
}
},
"count": 2
}
]
}
}
}