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

Blender: Index buffer #7221

Merged
merged 2 commits into from
Sep 22, 2015
Merged
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
7 changes: 5 additions & 2 deletions utils/exporters/blender/addons/io_three/exporter/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down