From 5cc7f2115b76b614178464f14053015dc84ca447 Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Thu, 6 Apr 2023 10:57:38 +0100 Subject: [PATCH] Fix getting view and display in Maya 2020. --- openpype/hosts/maya/api/lib.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 22803a2e3a..27b2c7e572 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -3655,6 +3655,10 @@ def get_color_management_preferences(): # Split view and display from view_transform. view_transform comes in # format of "{view} ({display})". regex = re.compile(r"^(?P.+) \((?P.+)\)$") + if int(cmds.about(version=True)) <= 2020: + # view_transform comes in format of "{view} {display}" in 2020. + regex = re.compile(r"^(?P.+) (?P.+)$") + match = regex.match(data["view_transform"]) data.update({ "display": match.group("display"),