Add the directory of the input file to POV-Ray's library path.
Chris Pressey
5 years ago
127 | 127 |
if 'render_command_template' not in config:
|
128 | 128 |
render_type = config.get('type', 'povray')
|
129 | 129 |
if render_type == 'povray':
|
130 | |
config['render_command_template'] = "povray -D +I{infile} +O{outfile} +W{width} +H{height} +A"
|
|
130 |
config['render_command_template'] = "povray +L{indir} -D +I{infile} +O{outfile} +W{width} +H{height} +A"
|
131 | 131 |
elif render_type == 'svg':
|
132 | 132 |
config['render_command_template'] = "inkscape -z -e {outfile} -w {width} -h {height} {infile}"
|
133 | 133 |
else:
|
32 | 32 |
f.write(self.template.render(context))
|
33 | 33 |
fn = os.path.join(self.dirname, self.options.frame_fmt % frame)
|
34 | 34 |
cmd = self.config['render_command_template'].format(
|
35 | |
infile=out_pov, outfile=fn, width=self.options.width, height=self.options.height
|
|
35 |
infile=out_pov, indir=os.path.dirname(self.options.configfile), outfile=fn,
|
|
36 |
width=self.options.width, height=self.options.height
|
36 | 37 |
)
|
37 | 38 |
self.exe.do_it(cmd)
|
38 | 39 |
return fn
|