diff --git a/openpype/hosts/max/startup/startup.py b/openpype/hosts/max/startup/startup.py index 21da115baa..0d3135a16f 100644 --- a/openpype/hosts/max/startup/startup.py +++ b/openpype/hosts/max/startup/startup.py @@ -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)