Retrieve Meshes #1

Merged
suhrke merged 1 commits from gettingstarted into master 4 years ago
  1. 26
      daedevil1.py
  2. 2
      lib/lib3ddevil1

26
daedevil1.py

@ -2,22 +2,20 @@ @@ -2,22 +2,20 @@
import collada
import ctypes
import numpy
import lib.lib3ddevil1.bindings.py3devil1
import sys
from lib.lib3ddevil1.bindings.py3devil1geo import pyMesh, pyGeoHeader
if __name__ == "__main__":
devil1 = lib.lib3ddevil1.bindings.py3devil1
def main():
# Iterate through pld, convert to .dae
sharedlib='./lib/lib3ddevil1/lib3ddevil1.so'
pld="pl01.pld"
PLD = devil1.getpld(pld, sharedlib)
# Create pld, interface tbd
#devil1.createpld(...)
if len(sys.argv) < 2:
print("No file specified - exiting.")
return
filename = sys.argv[1]
with open(filename, "rb") as f:
data = f.read()
header = pyGeoHeader(data)
for i in range(0, header.getnummesh()):
mesh = pyMesh(i, data)
mesh.show()
main()

2
lib/lib3ddevil1

@ -1 +1 @@ @@ -1 +1 @@
Subproject commit e111ff2e077572ac0bb39baf6a0c2f137d5ff3ee
Subproject commit e41887f7b898ade740ee95dd3f59b1ae9dc2cda2
Loading…
Cancel
Save