[pyassimp] Check cmd line args in sample.py
parent
024bd4c470
commit
43dd6fb3bc
|
@ -77,5 +77,12 @@ def main(filename=None):
|
||||||
# Finally release the model
|
# Finally release the model
|
||||||
pyassimp.release(scene)
|
pyassimp.release(scene)
|
||||||
|
|
||||||
|
def usage():
|
||||||
|
print("Usage: sample.py <3d model>")
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main(sys.argv[1] if len(sys.argv)>1 else None)
|
|
||||||
|
if len(sys.argv) != 2:
|
||||||
|
usage()
|
||||||
|
else:
|
||||||
|
main(sys.argv[1])
|
||||||
|
|
Loading…
Reference in New Issue