mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
move pairwise to plugin
This commit is contained in:
parent
8d74d69a01
commit
ba66d038aa
3 changed files with 3 additions and 11 deletions
|
|
@ -23,7 +23,6 @@ from .lib_old import (
|
|||
get_hierarchy,
|
||||
add_tool_to_environment,
|
||||
modified_environ,
|
||||
pairwise,
|
||||
is_latest,
|
||||
any_outdated,
|
||||
_rreplace,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue