Skip to content
Snippets Groups Projects
Commit a19eebe0 authored by Jinglin Li's avatar Jinglin Li
Browse files

Version compatibility blender 2.79.0 and above

parent 0dc52e9a
No related branches found
No related tags found
No related merge requests found
......@@ -63,21 +63,27 @@ class BlenderRender():
output_file.format.file_format = "OPEN_EXR"
output_file.file_slots.remove(output_file.inputs[0])
tmp_fileoutput = dict()
tmp_fileoutput['Image'] = 'Image'
tmp_fileoutput['Depth'] = 'Depth'
tmp_fileoutput['Folder'] = tempfile.TemporaryDirectory().name
tmp_fileoutput['ext'] = '.exr'
output_file.file_slots.new(tmp_fileoutput['Image'])
output_file.file_slots.new(tmp_fileoutput['Depth'])
output_file.base_path = tmp_fileoutput['Folder']
scene.node_tree.links.new(
render_layers.outputs['Image'],
output_file.inputs['Image']
)
scene.node_tree.links.new(
render_layers.outputs['Z'],
output_file.inputs['Depth']
)
tmp_fileoutput['Image'] = 'Image'
tmp_fileoutput['Depth'] = 'Depth'
tmp_fileoutput['Folder'] = tempfile.TemporaryDirectory().name
tmp_fileoutput['ext'] = '.exr'
output_file.file_slots.new(tmp_fileoutput['Image'])
output_file.file_slots.new(tmp_fileoutput['Depth'])
output_file.base_path = tmp_fileoutput['Folder']
scene.node_tree.links.new(
render_layers.outputs['Image'],
output_file.inputs['Image']
)
if bpy.app.version < (2,79,0):
scene.node_tree.links.new(
render_layers.outputs['Z'],
output_file.inputs['Depth']
)
else:
scene.node_tree.links.new(
render_layers.outputs['Depth'],
output_file.inputs['Depth']
)
self.tmp_fileoutput = tmp_fileoutput
@property
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment