hound fix

This commit is contained in:
BenoitConnan 2021-11-02 16:26:12 +01:00
parent a8eec8ae4f
commit ec26be57e8

View file

@ -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"""