diff --git a/pype/lib/__init__.py b/pype/lib/__init__.py index 06960f5ddb..18531ca05c 100644 --- a/pype/lib/__init__.py +++ b/pype/lib/__init__.py @@ -23,7 +23,6 @@ from .lib_old import ( get_hierarchy, add_tool_to_environment, modified_environ, - pairwise, is_latest, any_outdated, _rreplace, diff --git a/pype/lib/lib_old.py b/pype/lib/lib_old.py index dfb9aed6b9..7f5523b6b5 100644 --- a/pype/lib/lib_old.py +++ b/pype/lib/lib_old.py @@ -229,12 +229,6 @@ def modified_environ(*remove, **update): [env.pop(k) for k in remove_after] -def pairwise(iterable): - """s -> (s0,s1), (s2,s3), (s4, s5), ...""" - a = iter(iterable) - return itertools.izip(a, a) - - def is_latest(representation): """Return whether the representation is from latest version diff --git a/pype/plugins/maya/publish/collect_yeti_rig.py b/pype/plugins/maya/publish/collect_yeti_rig.py index 8a7971f3ae..73a84b0073 100644 --- a/pype/plugins/maya/publish/collect_yeti_rig.py +++ b/pype/plugins/maya/publish/collect_yeti_rig.py @@ -6,7 +6,6 @@ from maya import cmds import pyblish.api from pype.hosts.maya import lib -from pype.lib import pairwise SETTINGS = {"renderDensity", @@ -78,7 +77,7 @@ class CollectYetiRig(pyblish.api.InstancePlugin): connections = cmds.ls(connections, long=True) # Ensure long names inputs = [] - for dest, src in pairwise(connections): + for dest, src in lib.pairwise(connections): source_node, source_attr = src.split(".", 1) dest_node, dest_attr = dest.split(".", 1) @@ -119,7 +118,7 @@ class CollectYetiRig(pyblish.api.InstancePlugin): texture_filenames = [] if image_search_paths: - + # TODO: Somehow this uses OS environment path separator, `:` vs `;` # Later on check whether this is pipeline OS cross-compatible. image_search_paths = [p for p in @@ -127,7 +126,7 @@ class CollectYetiRig(pyblish.api.InstancePlugin): # find all ${TOKEN} tokens and replace them with $TOKEN env. variable image_search_paths = self._replace_tokens(image_search_paths) - + # List all related textures texture_filenames = cmds.pgYetiCommand(node, listTextures=True) self.log.info("Found %i texture(s)" % len(texture_filenames))