From 3e64f2d0ce224af2d3adabb518be4689c2e1e9c8 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Tue, 18 Jan 2022 12:41:05 +0100 Subject: [PATCH] OP-1117 - fixed start_last_workfile logic It wasnt setting this property all the time. --- openpype/lib/applications.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/openpype/lib/applications.py b/openpype/lib/applications.py index 772514823e..152dc6af6b 100644 --- a/openpype/lib/applications.py +++ b/openpype/lib/applications.py @@ -1504,14 +1504,16 @@ def _prepare_last_workfile(data, workdir): project_name = data["project_name"] task_name = data["task_name"] task_type = data["task_type"] - start_last_workfile = should_start_last_workfile( - project_name, app.host_name, task_name, task_type - ) - if not data.get("start_last_workfile", True): - log.info("Explicitly forbidden to open last workfile") - start_last_workfile = False + + start_last_workfile = data.get("start_last_workfile", True) + if start_last_workfile: + start_last_workfile = should_start_last_workfile( + project_name, app.host_name, task_name, task_type + ) else: - data["start_last_workfile"] = start_last_workfile + log.info("Explicitly forbidden to open last workfile") + + data["start_last_workfile"] = start_last_workfile workfile_startup = should_workfile_tool_start( project_name, app.host_name, task_name, task_type