mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Avoids OCIO env preparation without task entity
Skips OCIO environment preparation when the task entity is not available in the hook data. This prevents potential errors or unexpected behavior when the hook is executed in contexts where task information is missing.
This commit is contained in:
parent
0bcc26dff4
commit
192358dddb
1 changed files with 9 additions and 0 deletions
|
|
@ -29,6 +29,15 @@ class OCIOEnvHook(PreLaunchHook):
|
|||
def execute(self):
|
||||
"""Hook entry method."""
|
||||
|
||||
task_entity = self.data.get("task_entity")
|
||||
|
||||
if not task_entity:
|
||||
self.log.info(
|
||||
"Skipping OCIO Environment preparation."
|
||||
"Task Entity is not available."
|
||||
)
|
||||
return
|
||||
|
||||
folder_entity = self.data["folder_entity"]
|
||||
|
||||
template_data = get_template_data(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue