diff --git a/openpype/hosts/flame/hooks/pre_flame_setup.py b/openpype/hosts/flame/hooks/pre_flame_setup.py index ff72609f34..26056e6c16 100644 --- a/openpype/hosts/flame/hooks/pre_flame_setup.py +++ b/openpype/hosts/flame/hooks/pre_flame_setup.py @@ -7,9 +7,11 @@ from openpype.lib import ( PreLaunchHook, get_openpype_username ) +from openpype.lib.applications import ( + ApplicationLaunchFailed +) from openpype.api import get_anatomy_settings from openpype.hosts import flame as opflame -import openpype.hosts.flame.api as opfapi import openpype from pprint import pformat @@ -40,6 +42,15 @@ class FlamePrelaunch(PreLaunchHook): # get image io project_anatomy = get_anatomy_settings(project_name) + + # make sure anatomy settings are having flame key + if not project_anatomy["imageio"].get("flame"): + raise ApplicationLaunchFailed(( + "Anatomy project settings are missing `flame` key. " + "Please make sure you remove project overides on " + "Anatomy Image io") + ) + imageio_flame = project_anatomy["imageio"]["flame"] # get user name and host name @@ -89,8 +100,6 @@ class FlamePrelaunch(PreLaunchHook): app_arguments = self._get_launch_arguments(data_to_script) - # opfapi.setup(self.launch_context.env) - self.launch_context.launch_args.extend(app_arguments) def _add_pythonpath(self):