1111from compas .files .gltf .constants import COMPONENT_TYPE_ENUM
1212from compas .files .gltf .constants import COMPONENT_TYPE_FLOAT
1313from compas .files .gltf .constants import COMPONENT_TYPE_UNSIGNED_INT
14+ from compas .files .gltf .constants import COMPONENT_TYPE_UNSIGNED_SHORT
1415from compas .files .gltf .constants import NUM_COMPONENTS_BY_TYPE_ENUM
1516from compas .files .gltf .constants import TYPE_MAT4
1617from compas .files .gltf .constants import TYPE_SCALAR
@@ -283,6 +284,8 @@ def _add_scenes(self):
283284 return
284285 if self ._content .default_scene_key is not None :
285286 self ._gltf_dict ['scene' ] = self ._scene_index_by_key [self ._content .default_scene_key ]
287+ else :
288+ self ._gltf_dict ['scene' ] = list (self ._content .scenes .values ())[0 ].key
286289 scene_list = [None ] * len (self ._content .scenes .values ())
287290 for key , scene in self ._content .scenes .items ():
288291 scene_list [self ._scene_index_by_key [key ]] = scene .to_data (self ._node_index_by_key )
@@ -304,7 +307,7 @@ def _add_nodes(self):
304307 def _construct_primitives (self , mesh_data ):
305308 primitives = []
306309 for primitive_data in mesh_data .primitive_data_list :
307- indices_accessor = self ._construct_accessor (primitive_data .indices , COMPONENT_TYPE_UNSIGNED_INT , TYPE_SCALAR )
310+ indices_accessor = self ._construct_accessor (primitive_data .indices , COMPONENT_TYPE_UNSIGNED_SHORT , TYPE_SCALAR )
308311
309312 attributes = {}
310313 for attr in primitive_data .attributes :
0 commit comments