Skip to content

Commit

Permalink
v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SE2Dev committed Aug 5, 2018
2 parents 182e681 + 79a9a95 commit e23a047
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
from .xanim import Anim
from .sanim import SiegeAnim

version = (0, 2, 1) # Version specifier for PyCoD
version = (0, 3, 0) # Version specifier for PyCoD
21 changes: 21 additions & 0 deletions xmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,27 @@ def save(self, file, version, index_offset, vert_tok_suffix=""):
vert_tok_suffix=vert_tok_suffix)
file.write("\n")

def isValid(self):
'''
Checks to make sure that the face consists of 3 vertices,
all of which refer to different vertex indices
'''
if(len(self.indices) != 3):
return False

indices = [index.vertex for index in self.indices]

if indices[0] == indices[1]:
return False

if indices[0] == indices[2]:
return False

if indices[1] == indices[2]:
return False

return True


class Material(object):
__slots__ = (
Expand Down

0 comments on commit e23a047

Please sign in to comment.