diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 52ebcaff64..6dc27b459d 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -5,6 +5,7 @@ import os import platform import uuid import math +import sys import json import logging @@ -130,7 +131,13 @@ def float_round(num, places=0, direction=ceil): def pairwise(iterable): """s -> (s0,s1), (s2,s3), (s4, s5), ...""" a = iter(iterable) - return itertools.izip(a, a) + + if sys.version_info[0] == 2: + izip = itertools.izip + else: + izip = zip + + return izip(a, a) def unique(name): diff --git a/openpype/hosts/maya/plugins/publish/extract_look.py b/openpype/hosts/maya/plugins/publish/extract_look.py index 953539f65c..3b3f17aa7f 100644 --- a/openpype/hosts/maya/plugins/publish/extract_look.py +++ b/openpype/hosts/maya/plugins/publish/extract_look.py @@ -4,6 +4,7 @@ import os import sys import json import tempfile +import platform import contextlib import subprocess from collections import OrderedDict @@ -58,6 +59,11 @@ def maketx(source, destination, *args): from openpype.lib import get_oiio_tools_path maketx_path = get_oiio_tools_path("maketx") + + if platform.system().lower() == "windows": + # Ensure .exe extension + maketx_path += ".exe" + if not os.path.exists(maketx_path): print( "OIIO tool not found in {}".format(maketx_path)) @@ -212,7 +218,7 @@ class ExtractLook(openpype.api.Extractor): self.log.info("Extract sets (%s) ..." % _scene_type) lookdata = instance.data["lookData"] relationships = lookdata["relationships"] - sets = relationships.keys() + sets = list(relationships.keys()) if not sets: self.log.info("No sets found") return