glTF importer: perf improvment when accessor is shared by multiple primitives
This commit is contained in:
parent
48ef856ed3
commit
0dbe126969
|
@ -15,7 +15,7 @@
|
|||
bl_info = {
|
||||
'name': 'glTF 2.0 format',
|
||||
'author': 'Julien Duroure, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
|
||||
"version": (0, 9, 78),
|
||||
"version": (0, 9, 79),
|
||||
'blender': (2, 81, 6),
|
||||
'location': 'File > Import-Export',
|
||||
'description': 'Import-Export as glTF 2.0',
|
||||
|
|
|
@ -70,12 +70,14 @@ class BlenderPrimitive():
|
|||
# unused)
|
||||
pidx_to_bidx = [-1] * len(positions)
|
||||
bidx = len(bme_verts)
|
||||
for pidx in range(0, len(positions)):
|
||||
if pidx in used_pidxs:
|
||||
bme_verts.new(positions[pidx])
|
||||
vert_idxs.append((bidx, pidx))
|
||||
pidx_to_bidx[pidx] = bidx
|
||||
bidx += 1
|
||||
if bpy.app.debug:
|
||||
used_pidxs = list(used_pidxs)
|
||||
used_pidxs.sort()
|
||||
for pidx in used_pidxs:
|
||||
bme_verts.new(positions[pidx])
|
||||
vert_idxs.append((bidx, pidx))
|
||||
pidx_to_bidx[pidx] = bidx
|
||||
bidx += 1
|
||||
bme_verts.ensure_lookup_table()
|
||||
|
||||
# Add edges/faces to bmesh
|
||||
|
|
Loading…
Reference in New Issue