Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/add tmp dir for deadline submission #21

Merged
merged 15 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions client/ayon_blender/api/render_lib.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
from pathlib import Path

import bpy
import tempfile

from ayon_core.settings import get_project_settings
from ayon_core.pipeline import get_current_project_name
Expand Down Expand Up @@ -346,8 +346,9 @@ def prepare_rendering(asset_group):

# Clear the render filepath, so that the output is handled only by the
# output node in the compositor.
bpy.context.scene.render.filepath = ""

tmp_render_path = os.path.join(tempfile.gettempdir(), "renders", "tmp")
tmp_render_path = tmp_render_path.replace("\\", "/")
bpy.context.scene.render.filepath = f"{tmp_render_path}/"
render_settings = {
"render_folder": render_folder,
"aov_separator": aov_sep,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,4 @@ def repair(cls, instance):
container = instance.data["transientData"]["instance_node"]
prepare_rendering(container)
bpy.ops.wm.save_as_mainfile(filepath=bpy.data.filepath)
bpy.context.scene.render.filepath = "/tmp/"
cls.log.debug("Reset the render output folder...")
cls.log.debug("Reset the render output folder...")
moonyuet marked this conversation as resolved.
Show resolved Hide resolved
Loading