diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 4adbec5..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,26 +0,0 @@ -image: -- Visual Studio 2015 - -environment: - global: - TWINE_USERNAME: lejafar - - matrix: - # VS 2015 - - BUILD_TYPE: nmake - VS_VERSION: Visual Studio 14 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - -build_script: - - bash travis/build-openctm-win.sh - - pip install cibuildwheel==0.9.4 - - touch stub.cc - - cibuildwheel --output-dir wheelhouse - - ps: >- - if ($env:APPVEYOR_REPO_TAG -eq "true") { - python -m pip install twine - python -m twine upload (resolve-path wheelhouse\*.whl) - } -artifacts: - - path: "wheelhouse\\*.whl" - name: Wheels \ No newline at end of file diff --git a/openctm/io.py b/openctm/io.py index 7742c82..a785faa 100644 --- a/openctm/io.py +++ b/openctm/io.py @@ -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() @@ -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) diff --git a/openctm/version.py b/openctm/version.py index f617a23..75977e6 100644 --- a/openctm/version.py +++ b/openctm/version.py @@ -1 +1 @@ -__version__ = '1.0.0rc1' \ No newline at end of file +__version__ = '1.0.0' \ No newline at end of file