Skip to content

Commit

Permalink
polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
lejafar committed Aug 19, 2018
1 parent ef4d2d4 commit 587d8cc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 28 deletions.
26 changes: 0 additions & 26 deletions appveyor.yml

This file was deleted.

9 changes: 8 additions & 1 deletion openctm/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@


class CTM:
"""
Object that encapsulates a CTM file
"""

def __init__(self, _vertices, _faces, _normals=None):
def __init__(self, _vertices, _faces, _normals=None, _filename=""):
self.vertices = _vertices
self.faces = _faces
self.normals = _normals
self.filename = _filename

def __eq__(self, other):
return (self.vertices == other.vertices).all() and (self.faces == other.faces).all()
Expand Down Expand Up @@ -51,6 +55,9 @@ def import_mesh(_filename):

def export_mesh(_ctm, _filename):
ctm_context = ctmNewContext(CTM_EXPORT)

if not _filename.lower().endswith('.ctm'):
_filename += '.ctm'

try:
vertex_count = len(_ctm.vertices)
Expand Down
2 changes: 1 addition & 1 deletion openctm/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.0.0rc1'
__version__ = '1.0.0'

0 comments on commit 587d8cc

Please sign in to comment.