diff --git a/openpype/hosts/tvpaint/__init__.py b/openpype/hosts/tvpaint/__init__.py index 0e793fcf9f..09b7c52cd1 100644 --- a/openpype/hosts/tvpaint/__init__.py +++ b/openpype/hosts/tvpaint/__init__.py @@ -1,3 +1,6 @@ +import os + + def add_implementation_envs(env, _app): """Modify environments to contain all required for implementation.""" defaults = { @@ -6,3 +9,12 @@ def add_implementation_envs(env, _app): for key, value in defaults.items(): if not env.get(key): env[key] = value + + +def get_launch_script_path(): + current_dir = os.path.dirname(os.path.abspath(__file__)) + return os.path.join( + current_dir, + "api", + "launch_script.py" + ) diff --git a/openpype/hosts/tvpaint/hooks/pre_launch_args.py b/openpype/hosts/tvpaint/hooks/pre_launch_args.py index b0b13529ca..62fd662d79 100644 --- a/openpype/hosts/tvpaint/hooks/pre_launch_args.py +++ b/openpype/hosts/tvpaint/hooks/pre_launch_args.py @@ -44,10 +44,6 @@ class TvpaintPrelaunchHook(PreLaunchHook): self.launch_context.launch_args.extend(remainders) def launch_script_path(self): - avalon_dir = os.path.dirname(os.path.abspath(avalon.__file__)) - script_path = os.path.join( - avalon_dir, - "tvpaint", - "launch_script.py" - ) - return script_path \ No newline at end of file + from openpype.hosts.tvpaint import get_launch_script_path + + return get_launch_script_path()