renderlib changed to use full directory names for inkscape to make it work on mac

This commit is contained in:
Matt Gray 2016-07-31 16:30:46 +01:00
parent e6d97a09ee
commit e659b8437f

View file

@ -129,7 +129,7 @@ def rendertask(task):
fp.write( etree.tostring(svg, encoding='unicode') ) fp.write( etree.tostring(svg, encoding='unicode') )
# invoke inkscape to convert the generated svg-file into a png inside the .frames-directory # invoke inkscape to convert the generated svg-file into a png inside the .frames-directory
errorReturn = subprocess.check_output('cd {0} && inkscape --export-background=white --export-png=.frames/{1:04d}.png .gen.svg 2>&1 >/dev/null'.format(task.workdir, frameNr), shell=True, universal_newlines=True) errorReturn = subprocess.check_output('cd {0} && inkscape --export-background=white --export-png=$(pwd)/.frames/{1:04d}.png $(pwd)/.gen.svg 2>&1 >/dev/null'.format(task.workdir, frameNr), shell=True, universal_newlines=True)
if errorReturn != '': if errorReturn != '':
print("inkscape exitted with error\n"+errorReturn) print("inkscape exitted with error\n"+errorReturn)
sys.exit(42) sys.exit(42)