diff --git a/utils/exporters/blender/addons/io_three/exporter/geometry.py b/utils/exporters/blender/addons/io_three/exporter/geometry.py index d6b5267630783c..0e2cc502d2a195 100644 --- a/utils/exporters/blender/addons/io_three/exporter/geometry.py +++ b/utils/exporters/blender/addons/io_three/exporter/geometry.py @@ -363,6 +363,9 @@ def _scene_format(self): data[constants.DATA] = geometry_data = {} geometry_data[constants.ATTRIBUTES] = component_data + index = self.get(constants.INDEX) + if index is not None: + geometry_data[constants.INDEX] = index draw_calls = self.get(constants.DRAW_CALLS) if draw_calls is not None: geometry_data[constants.DRAW_CALLS] = draw_calls @@ -495,8 +498,8 @@ def _parse_buffer_geometry(self): array = attrib_data_out[i][0] self[constants.ATTRIBUTES][key][constants.ARRAY] = array - self[constants.ATTRIBUTES][constants.INDEX] = { - constants.ITEM_SIZE: 3, + self[constants.INDEX] = { + constants.ITEM_SIZE: 1, constants.TYPE: option_index_type, constants.ARRAY: index_data }