From a8d2cfeb4a5f76e6986f378eee6c08f0a1cbce64 Mon Sep 17 00:00:00 2001 From: _ <_> Date: Sun, 13 May 2018 13:47:22 -0700 Subject: [PATCH] Added getbatchdata function --- bindings/py3devil1.py | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/bindings/py3devil1.py b/bindings/py3devil1.py index 051df07..65dfb27 100755 --- a/bindings/py3devil1.py +++ b/bindings/py3devil1.py @@ -367,6 +367,9 @@ class MEsh: else: print("nothing to show") + def getbatchdata(self): + return self.cstruct.b.contents.bd.contents + def getpositions(self): length = self.cstruct.b.contents.bd.contents.numVertex return self.cstruct.b.contents.vd.positions[:length] @@ -474,18 +477,21 @@ if __name__ == "__main__": mh.show() m = MEsh(0, data) m.show() - p = m.getpositions() - print("positions:") - for point in p: - print(point) - n = m.getnormals() - print("normals:") - for point in n: - print(point) - u = m.getuvs() - print("uvs:") - for point in u: - print(point) + # p = m.getpositions() + # print("positions:") + # for point in p: + # print(point) + # n = m.getnormals() + # print("normals:") + # for point in n: + # print(point) + # u = m.getuvs() + # print("uvs:") + # for point in u: + # print(point) + dbatch = m.getbatchdata() + print(hex(dbatch.numVertex)) + print(hex(dbatch.padding)) #---------------------------------------+ # main() mainx()