mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-27 14:22:37 +01:00
Safer handling of PACKAGE_DIR
PACKAGE_DIR wasn't found in pre_non_python_host_launch.py in some edge cases
This commit is contained in:
parent
307f2c6bba
commit
8cbe6d3f68
2 changed files with 4 additions and 3 deletions
|
|
@ -14,7 +14,7 @@ log = logging.getLogger(__name__)
|
|||
|
||||
PROJECT_PLUGINS_PATH = os.environ.get("PYPE_PROJECT_PLUGINS")
|
||||
STUDIO_PLUGINS_PATH = os.environ.get("PYPE_STUDIO_PLUGINS")
|
||||
PACKAGE_DIR = os.path.dirname(__file__)
|
||||
PACKAGE_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
PLUGINS_DIR = os.path.join(PACKAGE_DIR, "plugins")
|
||||
|
||||
# Global plugin paths
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ from pype.lib import (
|
|||
PreLaunchHook,
|
||||
get_pype_execute_args
|
||||
)
|
||||
import pype.PACKAGE_DIR
|
||||
|
||||
from pype import PACKAGE_DIR as PYPE_DIR
|
||||
|
||||
|
||||
class NonPythonHostHook(PreLaunchHook):
|
||||
|
|
@ -26,7 +27,7 @@ class NonPythonHostHook(PreLaunchHook):
|
|||
remainders.append(self.launch_context.launch_args.pop(0))
|
||||
|
||||
script_path = os.path.join(
|
||||
pype.PACKAGE_DIR,
|
||||
PYPE_DIR,
|
||||
"scripts",
|
||||
"non_python_host_launch.py"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue