Fix getting view and display in Maya 2020.

This commit is contained in:
Toke Stuart Jepsen 2023-04-06 10:57:38 +01:00
parent 89b87af509
commit 5cc7f2115b

View file

@ -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<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"])
data.update({
"display": match.group("display"),