diff --git a/openpype/hosts/maya/plugins/publish/validate_mesh_ngons.py b/openpype/hosts/maya/plugins/publish/validate_mesh_ngons.py index 3a5e2c05ae..e8cc019b52 100644 --- a/openpype/hosts/maya/plugins/publish/validate_mesh_ngons.py +++ b/openpype/hosts/maya/plugins/publish/validate_mesh_ngons.py @@ -1,4 +1,4 @@ -from maya import cmds, mel +from maya import cmds import pyblish.api import openpype.api @@ -6,15 +6,15 @@ import openpype.hosts.maya.api.action from avalon import maya from openpype.hosts.maya.api import lib + def polyConstraint(objects, *args, **kwargs): - #Using mode 3 to apply constraint on selected objects instead of selected faces. kwargs.pop('mode', None) with lib.no_undo(flush=False): with maya.maintained_selection(): with lib.reset_polySelectConstraint(): cmds.select(objects, r=1, noExpand=True) - # Acting as 'polyCleanupArgList' procedure for n-sided polygons selection + # Acting as 'polyCleanupArgList' for n-sided polygon selection cmds.polySelectConstraint(*args, mode=3, **kwargs) result = cmds.ls(selection=True) cmds.select(clear=True) @@ -44,7 +44,6 @@ class ValidateMeshNgons(pyblish.api.Validator): meshes = cmds.ls(instance, type='mesh') return polyConstraint(meshes, type=8, size=3) - def process(self, instance): """Process all the nodes in the instance "objectSet"""