By lifeofdave - Tue Jul 22, 2014 4:25 pm
- Tue Jul 22, 2014 4:25 pm
#382068
Hi, I'm writing a python script to do something similar to the pack and go function in Studio, but am having some issues with python and Maxwell 2.7.2.
Calling getDependencies() returns a list, but it contains NULL values as well as dependency paths. Then if I try to loop through the list python crashes completely.
For example the code below...
Ta
Calling getDependencies() returns a list, but it contains NULL values as well as dependency paths. Then if I try to loop through the list python crashes completely.
For example the code below...
Code: Select all
produces this output:
from pymaxwell import *
import sys
def get_dependencies():
mxs_path = r'C:\\Users\\davealot\\Dropbox\\SPARK\\MXS scenes\\Pack_and_go_test_scene\\cube_ball_cube.mxs'
scene = Cmaxwell(mwcallback)
ok = scene.readMXS(mxs_path)
if ok == 0:
print "Error reading scene"
return 0;
scene_dependencies = scene.getDependencies()
print scene_dependencies
get_dependencies()
print sys.version
Code: Select all
It works in Maxwell 3 ok. Any scripting/plugin gurus have any idea what's going wrong? Or if there's another way to create a pack and go like script?>> [<NULL>, <NULL>, <NULL>, <NULL>, 'C:\\Visualisation_PC\\Groundplants0153_5_S.jpg', 'D:\\Visualisation\\concrete-19_d100.png', 'D:\\Visualisation\\White_resin_BUMP.jpg', 'D:\\Visualisation\\1103 Sun Clouds.hdr']
2.6.6 (r266:84297, Aug 24 2010, 18:13:38) [MSC v.1500 64 bit (AMD64)]
Ta