Skip to content

Commit

Permalink
fix: resolve abaspath for output
Browse files Browse the repository at this point in the history
  • Loading branch information
mweibel committed Aug 4, 2023
1 parent 957b781 commit 738ec57
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions helio_blender_addon/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,22 +393,24 @@ def final_name(path: Path, file_format: str) -> str:
path = path.with_suffix(self._extension_from_format[file_format])
return str(path)

render_filepath = str(Path(bpy.path.abspath(render.filepath)).resolve())
output = {
"common": {
"enabled": True,
"final": final_name(Path(render.filepath), render.image_settings.file_format),
"project": os.path.dirname(render.filepath),
"final": final_name(Path(render_filepath), render.image_settings.file_format),
"project": os.path.dirname(render_filepath),
"extension": render.image_settings.file_format.lower()
}
}
tree = scene.node_tree
if tree is not None:
for node in tree.nodes:
if node.bl_idname == 'CompositorNodeOutputFile':
base_path = str(Path(bpy.path.abspath(node.base_path)).resolve())
output[bpy.path.clean_name(node.name)] = {
"enabled": True,
"final": final_name(Path(node.base_path), node.format.file_format),
"project": os.path.dirname(node.base_path),
"final": final_name(Path(base_path), node.format.file_format),
"project": os.path.dirname(base_path),
"extension": node.format.file_format.lower()
}

Expand Down Expand Up @@ -472,7 +474,7 @@ def cancel(self, context):

class ModalOperator(bpy.types.Operator):
bl_idname = "helio.render_modal"
bl_label = "Helio Render Modal"
bl_label = "Render On Helio"
bl_region_type = "UI"
bl_options = {'REGISTER', 'INTERNAL'}

Expand Down

0 comments on commit 738ec57

Please sign in to comment.