From 280a2f68795114ea08b04f993774cadb78542f73 Mon Sep 17 00:00:00 2001 From: karimmozlia Date: Fri, 5 Nov 2021 15:59:43 +0200 Subject: [PATCH 1/2] don't convert colors if it already converted instance capture preset in second time is getting the already converted color value from first time .. so i just make ignore conversion then --- openpype/hosts/maya/api/lib.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 88c0525f3b..66c215a467 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -2183,10 +2183,11 @@ def load_capture_preset(data=None): for key in preset['Display Options']: if key.startswith('background'): disp_options[key] = preset['Display Options'][key] - disp_options[key][0] = (float(disp_options[key][0])/255) - disp_options[key][1] = (float(disp_options[key][1])/255) - disp_options[key][2] = (float(disp_options[key][2])/255) - disp_options[key].pop() + if len(disp_options[key]) == 4 : + disp_options[key][0] = (float(disp_options[key][0])/255) + disp_options[key][1] = (float(disp_options[key][1])/255) + disp_options[key][2] = (float(disp_options[key][2])/255) + disp_options[key].pop() else: disp_options['displayGradient'] = True From 8d67aa179b50f96cdab1b486bdc1c2465b1ff61d Mon Sep 17 00:00:00 2001 From: karimmozlia Date: Fri, 5 Nov 2021 18:04:16 +0200 Subject: [PATCH 2/2] hound --- openpype/hosts/maya/api/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 66c215a467..4074aa7fa8 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -2183,7 +2183,7 @@ def load_capture_preset(data=None): for key in preset['Display Options']: if key.startswith('background'): disp_options[key] = preset['Display Options'][key] - if len(disp_options[key]) == 4 : + if len(disp_options[key]) == 4: disp_options[key][0] = (float(disp_options[key][0])/255) disp_options[key][1] = (float(disp_options[key][1])/255) disp_options[key][2] = (float(disp_options[key][2])/255)