From 0ce878e7c2d5f69bd3165611dc6cab1100a8caff Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Tue, 13 Apr 2021 19:05:40 +0200 Subject: [PATCH] changed logic of setting tvpaint data on start for Pype 3 --- openpype/hosts/tvpaint/api/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/tvpaint/api/__init__.py b/openpype/hosts/tvpaint/api/__init__.py index 9e5dfa13ba..bd9ef51a76 100644 --- a/openpype/hosts/tvpaint/api/__init__.py +++ b/openpype/hosts/tvpaint/api/__init__.py @@ -37,7 +37,10 @@ def on_instance_toggle(instance, old_value, new_value): def initial_launch(): # Setup project settings if its the template that's launched. - if os.environ.get("PYPE_TVPAINT_LAUNCHED_TEMPLATE_FILE") != "1": + # TODO also check for template creation when it's possible to define + # templates + last_workfile = os.environ.get("AVALON_LAST_WORKFILE") + if not last_workfile or os.path.exists(last_workfile): return log.info("Setting up project...")