Skip to content

Commit

Permalink
Merge pull request #4 from ynput/bugfix/creating_render_instance_erro…
Browse files Browse the repository at this point in the history
…r_out_in_creator

Bugfix the render instance without workfile being saved
  • Loading branch information
moonyuet authored Jul 8, 2024
2 parents 9e89895 + 19d7c58 commit 6edd44d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions client/ayon_blender/plugins/create/create_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import bpy

from ayon_core.lib import version_up
from ayon_core.pipeline.context_tools import version_up_current_workfile
from ayon_blender.api import plugin
from ayon_blender.api.render_lib import prepare_rendering
from ayon_blender.api.workio import save_file
Expand Down Expand Up @@ -39,7 +40,10 @@ def create(
# settings. Even the validator to check that the file is saved will
# detect the file as saved, even if it isn't. The only solution for
# now it is to force the file to be saved.
filepath = version_up(bpy.data.filepath)
save_file(filepath, copy=False)
if not bpy.data.filepath:
version_up_current_workfile()
else:
filepath = version_up(bpy.data.filepath)
save_file(filepath, copy=False)

return collection

0 comments on commit 6edd44d

Please sign in to comment.