mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #2379 from pypeclub/bugfix/hiero-colorspace-set
This commit is contained in:
commit
a5bbe256f5
1 changed files with 8 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ Host specific functions where host api is connected
|
|||
import os
|
||||
import re
|
||||
import sys
|
||||
import platform
|
||||
import ast
|
||||
import shutil
|
||||
import hiero
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue