Browse Source

Merge branch 'gettingstarted' of scuti/daedevil1 into master

master
suhrke 1 year ago
parent
commit
deee0cc960
2 changed files with 13 additions and 15 deletions
  1. 12
    14
      daedevil1.py
  2. 1
    1
      lib/lib3ddevil1

+ 12
- 14
daedevil1.py View File

@@ -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()

+ 1
- 1
lib/lib3ddevil1

@@ -1 +1 @@
Subproject commit e111ff2e077572ac0bb39baf6a0c2f137d5ff3ee
Subproject commit e41887f7b898ade740ee95dd3f59b1ae9dc2cda2

Loading…
Cancel
Save