Skip to content

Commit af21991

Browse files
tschwmrdoob
authored andcommitted
Blender: Moved index buffer out of attributes JSON.
1 parent 66e8236 commit af21991

File tree

1 file changed

+4
-1
lines changed
  • utils/exporters/blender/addons/io_three/exporter

1 file changed

+4
-1
lines changed

utils/exporters/blender/addons/io_three/exporter/geometry.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,9 @@ def _scene_format(self):
363363
data[constants.DATA] = geometry_data = {}
364364

365365
geometry_data[constants.ATTRIBUTES] = component_data
366+
index = self.get(constants.INDEX)
367+
if index is not None:
368+
geometry_data[constants.INDEX] = index
366369
draw_calls = self.get(constants.DRAW_CALLS)
367370
if draw_calls is not None:
368371
geometry_data[constants.DRAW_CALLS] = draw_calls
@@ -495,7 +498,7 @@ def _parse_buffer_geometry(self):
495498
array = attrib_data_out[i][0]
496499
self[constants.ATTRIBUTES][key][constants.ARRAY] = array
497500

498-
self[constants.ATTRIBUTES][constants.INDEX] = {
501+
self[constants.INDEX] = {
499502
constants.ITEM_SIZE: 1,
500503
constants.TYPE: option_index_type,
501504
constants.ARRAY: index_data

0 commit comments

Comments
 (0)