Update openpype/hosts/max/startup/startup.py

Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
This commit is contained in:
Ondřej Samohel 2023-02-02 11:40:06 +01:00 committed by GitHub
parent 8fd4c06e71
commit df6031d810
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,17 +4,12 @@ import sys
# this might happen in some 3dsmax version where PYTHONPATH isn't added
# to sys.path automatically
try:
from openpype.hosts.max.api import MaxHost
from openpype.pipeline import install_host
except (ImportError, ModuleNotFoundError):
for path in os.environ["PYTHONPATH"].split(os.pathsep):
if path and path not in sys.path:
sys.path.append(path)
for path in os.environ["PYTHONPATH"].split(os.pathsep):
if path and path not in sys.path:
sys.path.append(path)
from openpype.hosts.max.api import MaxHost
from openpype.pipeline import install_host
from openpype.hosts.max.api import MaxHost
from openpype.pipeline import install_host
host = MaxHost()
install_host(host)