flame: making sure anatomy imageio flame key is present

https://github.com/pypeclub/OpenPype/pull/2745#discussion_r808915085
This commit is contained in:
Jakub Jezek 2022-02-17 16:31:26 +01:00
parent d007c057d2
commit 213741d652
No known key found for this signature in database
GPG key ID: D8548FBF690B100A

View file

@ -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):