diff --git a/pype/lib/__init__.py b/pype/lib/__init__.py index a303bf038d..06960f5ddb 100644 --- a/pype/lib/__init__.py +++ b/pype/lib/__init__.py @@ -24,7 +24,6 @@ from .lib_old import ( add_tool_to_environment, modified_environ, pairwise, - grouper, is_latest, any_outdated, _rreplace, diff --git a/pype/lib/lib_old.py b/pype/lib/lib_old.py index b384c3a06a..dfb9aed6b9 100644 --- a/pype/lib/lib_old.py +++ b/pype/lib/lib_old.py @@ -235,18 +235,6 @@ def pairwise(iterable): return itertools.izip(a, a) -def grouper(iterable, n, fillvalue=None): - """Collect data into fixed-length chunks or blocks - - Examples: - grouper('ABCDEFG', 3, 'x') --> ABC DEF Gxx - - """ - - args = [iter(iterable)] * n - return itertools.izip_longest(fillvalue=fillvalue, *args) - - def is_latest(representation): """Return whether the representation is from latest version diff --git a/pype/plugins/maya/publish/extract_camera_mayaScene.py b/pype/plugins/maya/publish/extract_camera_mayaScene.py index 1a0f4694d1..65c5ef5840 100644 --- a/pype/plugins/maya/publish/extract_camera_mayaScene.py +++ b/pype/plugins/maya/publish/extract_camera_mayaScene.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- """Extract camera as Maya Scene.""" import os +import itertools from maya import cmds import avalon.maya import pype.api -from pype.lib import grouper from pype.hosts.maya import lib @@ -36,6 +36,17 @@ def massage_ma_file(path): f.close() +def grouper(iterable, n, fillvalue=None): + """Collect data into fixed-length chunks or blocks. + + Examples: + grouper('ABCDEFG', 3, 'x') --> ABC DEF Gxx + + """ + args = [iter(iterable)] * n + return itertools.izip_longest(fillvalue=fillvalue, *args) + + def unlock(plug): """Unlocks attribute and disconnects inputs for a plug.