mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 08:54:53 +01:00
Python 3 compatibility + correctly find maketx.exe on Windows
This commit is contained in:
parent
d090655764
commit
7cc0910549
2 changed files with 15 additions and 2 deletions
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue