mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge pull request #4795 from tokejepsen/bugfix/maya_get_color_management_preferences
This commit is contained in:
commit
c76d7430ba
1 changed files with 10 additions and 0 deletions
|
|
@ -3655,7 +3655,17 @@ def get_color_management_preferences():
|
||||||
# Split view and display from view_transform. view_transform comes in
|
# Split view and display from view_transform. view_transform comes in
|
||||||
# format of "{view} ({display})".
|
# format of "{view} ({display})".
|
||||||
regex = re.compile(r"^(?P<view>.+) \((?P<display>.+)\)$")
|
regex = re.compile(r"^(?P<view>.+) \((?P<display>.+)\)$")
|
||||||
|
if int(cmds.about(version=True)) <= 2020:
|
||||||
|
# view_transform comes in format of "{view} {display}" in 2020.
|
||||||
|
regex = re.compile(r"^(?P<view>.+) (?P<display>.+)$")
|
||||||
|
|
||||||
match = regex.match(data["view_transform"])
|
match = regex.match(data["view_transform"])
|
||||||
|
if not match:
|
||||||
|
raise ValueError(
|
||||||
|
"Unable to parse view and display from Maya view transform: '{}' "
|
||||||
|
"using regex '{}'".format(data["view_transform"], regex.pattern)
|
||||||
|
)
|
||||||
|
|
||||||
data.update({
|
data.update({
|
||||||
"display": match.group("display"),
|
"display": match.group("display"),
|
||||||
"view": match.group("view")
|
"view": match.group("view")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue