Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2379 from pypeclub/bugfix/hiero-colorspace-set
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubjezek001 authored Dec 7, 2021
2 parents 5808884 + 0270b13 commit a5bbe25
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions openpype/hosts/hiero/api/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import re
import sys
import platform
import ast
import shutil
import hiero
Expand Down Expand Up @@ -783,6 +784,13 @@ def _set_hrox_project_knobs(doc, **knobs):
# set attributes to Project Tag
proj_elem = doc.documentElement().firstChildElement("Project")
for k, v in knobs.items():
if "ocioconfigpath" in k:
paths_to_format = v[platform.system().lower()]
for _path in paths_to_format:
v = _path.format(**os.environ)
if not os.path.exists(v):
continue
log.debug("Project colorspace knob `{}` was set to `{}`".format(k, v))
if isinstance(v, dict):
continue
proj_elem.setAttribute(str(k), v)
Expand Down

0 comments on commit a5bbe25

Please sign in to comment.