From afb56dbd9a48456a5006ad13bb63b1de57d0fd36 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Thu, 28 Jan 2021 10:54:07 +0100 Subject: [PATCH] change host.maya api imports --- pype/hosts/maya/__init__.py | 0 pype/hosts/maya/api/action.py | 2 +- pype/hosts/maya/api/expected_files.py | 2 +- pype/hosts/maya/api/lib.py | 6 ++---- pype/hosts/maya/api/menu.py | 2 +- pype/hosts/maya/api/setdress.py | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) create mode 100644 pype/hosts/maya/__init__.py diff --git a/pype/hosts/maya/__init__.py b/pype/hosts/maya/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pype/hosts/maya/api/action.py b/pype/hosts/maya/api/action.py index bb6815ed7d..35a57a4445 100644 --- a/pype/hosts/maya/api/action.py +++ b/pype/hosts/maya/api/action.py @@ -4,7 +4,7 @@ from __future__ import absolute_import import pyblish.api -from ...action import get_errored_instances_from_context +from pype.api import get_errored_instances_from_context class GenerateUUIDsOnInvalidAction(pyblish.api.Action): diff --git a/pype/hosts/maya/api/expected_files.py b/pype/hosts/maya/api/expected_files.py index d39e5fa204..0a234baef7 100644 --- a/pype/hosts/maya/api/expected_files.py +++ b/pype/hosts/maya/api/expected_files.py @@ -44,7 +44,7 @@ from abc import ABCMeta, abstractmethod import six -import pype.hosts.maya.lib as lib +import pype.hosts.maya.api.lib as lib from maya import cmds import maya.app.renderSetup.model.renderSetup as renderSetup diff --git a/pype/hosts/maya/api/lib.py b/pype/hosts/maya/api/lib.py index 37e4ccf915..3a820af814 100644 --- a/pype/hosts/maya/api/lib.py +++ b/pype/hosts/maya/api/lib.py @@ -114,9 +114,7 @@ def matrix_equals(a, b, tolerance=1e-10): bool : True or False """ - if not all(abs(x - y) < tolerance for x, y in zip(a, b)): - return False - return True + return all(abs(x - y) < tolerance for x, y in zip(a, b)) def float_round(num, places=0, direction=ceil): @@ -1084,7 +1082,7 @@ def get_id_required_nodes(referenced_nodes=False, nodes=None): # Check if plugin nodes are available for Maya by checking if the plugin # is loaded - if cmds.pluginInfo("pgYetiMaya", query=True, loaded=True): + if cmds.pluginInfo("pgYetiMaya", query=True, loaded=True): types.append("pgYetiMaya") # We *always* ignore intermediate shapes, so we filter them out directly diff --git a/pype/hosts/maya/api/menu.py b/pype/hosts/maya/api/menu.py index fa7690bca7..9381043511 100644 --- a/pype/hosts/maya/api/menu.py +++ b/pype/hosts/maya/api/menu.py @@ -4,7 +4,7 @@ import logging from avalon.vendor.Qt import QtWidgets, QtGui from avalon.maya import pipeline -from ...lib import BuildWorkfile +from pype.api import BuildWorkfile import maya.cmds as cmds self = sys.modules[__name__] diff --git a/pype/hosts/maya/api/setdress.py b/pype/hosts/maya/api/setdress.py index 7c764a42df..2c4dd93b18 100644 --- a/pype/hosts/maya/api/setdress.py +++ b/pype/hosts/maya/api/setdress.py @@ -9,7 +9,7 @@ from maya import cmds from avalon import api, io from avalon.maya.lib import unique_namespace -from pype.hosts.maya.lib import matrix_equals +from pype.hosts.maya.api.lib import matrix_equals log = logging.getLogger("PackageLoader")