To lunch Indigo installed in a path with space, I found some poor results:
Typing this in a python console worked for me:
cmd = '\"c:/Program Files (x86)/indigo.exe\" + sys.argv[default.xml]'
os.system(cmd)
This worked but Indigo could not find its initfile.
And I dit not managed to change the directory
Trying to implement this in the exporter gives me this error message:
AttributeError 'module' object has no attribute 'argv'
it is really frustrating!
Some questions:
Why do we need an IndigoWrapper.cmd after all?
Perhaps could it be easyer to work with a batch file?
[edit]
This seems to work for me
This is my indigowrapper.conf:
Code: Select all
C:/Program Files (x86)/indigo_06
Code: Select all
#########################################################################
### LAUNCH INDIGO AND RENDER CURRENT SCENE (WINDOWS ONLY) ###
### psor's first steps to Python(executing Indigo per shell script) ###
### Modif by Phil to work with with space in path
#########################################################################
def launchIndigo(filename):
filename = os.path.basename (filename)
datadir = Blender.Get("datadir")
# open 'IndigoWrapper.conf' and read the first line
f = open(datadir + '/IndigoWrapper.conf', 'r+')
ic=f.readline()
f.close()
# we change the working directory to indigo
os.chdir(ic)
#now we start indigo
goindigo = "Indigo.exe " + filename + "\n"
os.system(goindigo)
### END OF PSOR ##########################################################
Regards, Phil