Skip to content

Commit

Permalink
Moved the vertex optimize dictionary initialization out of the object…
Browse files Browse the repository at this point in the history
… loop to ensure we de-dupe across objects not just within them.

For the C90B_cockpit2 this return the vert count back to that of the original on a round trip 30000->11000
  • Loading branch information
imc committed Oct 5, 2022
1 parent fc3fec2 commit 93195c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion io_xplane2blender/xplane_types/xplane_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def getSortKey(xplaneObject):
xplaneObjects = sorted(xplaneObjects, key=getSortKey)

dg = bpy.context.evaluated_depsgraph_get()
vertices_dct = {}
for xplaneObject in xplaneObjects:
if (
xplaneObject.type == "MESH"
Expand Down Expand Up @@ -115,7 +116,6 @@ def getSortKey(xplaneObject):
)
tmp_faces.append(tmp_face)

vertices_dct = {}
for tmp_face in tmp_faces:
# To reverse the winding order for X-Plane from CCW to CW,
# we iterate backwards through the mesh data structures
Expand Down

0 comments on commit 93195c9

Please sign in to comment.