Skip to content

Commit

Permalink
fix flipped faces
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomityGuy committed Mar 14, 2022
1 parent 6511901 commit 33b3c11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion blender_plugin/io_dif/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"author": "RandomityGuy",
"description": "Dif import and export plugin for blender",
"blender": (2, 80, 0),
"version": (1, 2, 0),
"version": (1, 2, 1),
"location": "File > Import-Export",
"warning": "",
"category": "Import-Export",
Expand Down
7 changes: 5 additions & 2 deletions blender_plugin/io_dif/import_csx.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,16 @@ def create_mesh(filepath, brush: CSXBrush):

for face in brush.faces:
for i in range(0, len(face.indices) - 2):
index0 = face.indices[0]
index0 = face.indices[i + 2]
index1 = face.indices[i + 1]
index2 = face.indices[i + 2]
index2 = face.indices[0]

tex_gen = face.texgen

normal = face.plane[:3]
normal[0] *= -1
normal[1] *= -1
normal[2] *= -1

pt0 = brush.vertices[index0]
pt1 = brush.vertices[index1]
Expand Down

0 comments on commit 33b3c11

Please sign in to comment.