diff --git a/openpype/hosts/max/addon.py b/openpype/hosts/max/addon.py index d3245bbc7e..9d6ab5a8b3 100644 --- a/openpype/hosts/max/addon.py +++ b/openpype/hosts/max/addon.py @@ -12,6 +12,11 @@ class MaxAddon(OpenPypeModule, IHostAddon): def initialize(self, module_settings): self.enabled = True + def add_implementation_envs(self, env, _app): + # Remove auto screen scale factor for Qt + # - let 3dsmax decide it's value + env.pop("QT_AUTO_SCREEN_SCALE_FACTOR", None) + def get_workfile_extensions(self): return [".max"] diff --git a/openpype/hosts/max/startup/startup.py b/openpype/hosts/max/startup/startup.py index 37bcef5db1..0d3135a16f 100644 --- a/openpype/hosts/max/startup/startup.py +++ b/openpype/hosts/max/startup/startup.py @@ -1,4 +1,13 @@ # -*- coding: utf-8 -*- +import os +import sys + +# this might happen in some 3dsmax version where PYTHONPATH isn't added +# to sys.path automatically +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