From d20efa41df52280308f225c765d69ce8da57a596 Mon Sep 17 00:00:00 2001 From: Federico De Felici Date: Tue, 15 May 2018 13:29:32 +0200 Subject: [PATCH] Removed types from arguments to be compliant with python 2.7 --- maya/draco_maya_wrapper.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/maya/draco_maya_wrapper.py b/maya/draco_maya_wrapper.py index eb0b710..84fbff3 100644 --- a/maya/draco_maya_wrapper.py +++ b/maya/draco_maya_wrapper.py @@ -20,6 +20,7 @@ class Drc2PyMesh(ctypes.Structure): ("uvs_real_num", ctypes.c_uint), ("uvs", ctypes.POINTER(ctypes.c_float)) ] + class DrcMesh: def __init__(self): self.faces = [] @@ -102,12 +103,11 @@ class Draco: # Free memory allocated by the lib self.drc_free(ctypes.byref(mesh_ptr)) mesh_ptr = None - return result; + return result - def encode(self, mesh_data: DrcMesh, file: str): + def encode(self, mesh_data, file): mesh = Drc2PyMesh() - mesh.faces = array_to_ptr(mesh_data.faces, mesh_data.faces_num * 3, ctypes.c_uint) mesh.faces_num = ctypes.c_uint(mesh_data.faces_num) mesh.vertices = array_to_ptr(mesh_data.vertices, mesh_data.vertices_num * 3, ctypes.c_float) @@ -117,9 +117,7 @@ class Draco: mesh.uvs = array_to_ptr(mesh_data.uvs, mesh_data.uvs_num * 3, ctypes.c_float) mesh.uvs_num = ctypes.c_uint(mesh_data.uvs_num) - mesh_ptr = ctypes.byref(mesh) file_ptr = ctypes.c_char_p(file.encode()) - self.drc_encode(mesh_ptr, file_ptr) - #self.string(ctypes.c_char_p(file.encode())) +