def process(self, instance): """Process all the nodes in the instance 'objectSet'""" meshes = instance.data['shapes'] # Get all edges edges = ['{0}.e[*]'.format(node) for node in meshes] # Filter by constraint on edge length invalid = mesh_utils.polyConstraint(edges, disable=True, # Disable previous settings, use only current t=0x8000, # type: 0x8000(edge) length=1, lengthbound=(0, self.__tolerance)) if invalid: raise RuntimeError("Meshes found with zero edge length: {0}".format(invalid))
def process(self, instance): """Process all meshes""" meshes = cmds.ls(instance, type='mesh', dag=True, long=True) # Get all faces faces = ['{0}.f[*]'.format(node) for node in meshes] # Filter by constraint on face area invalid = mesh_utils.polyConstraint(faces, disable=True, # Disable previous settings, use only current t=0x0008, # type: 0x0008(face) geometricarea=1, geometricareabound=(0, self.__tolerance)) if invalid: raise RuntimeError("Meshes found with zero face areas: {0}".format(invalid))
def process(self, instance): """Process all the nodes in the instance 'objectSet'""" meshes = cmds.ls(instance, type='mesh', dag=True, long=True) # Get all edges edges = ['{0}.e[*]'.format(node) for node in meshes] # Filter by constraint on edge length invalid = mesh_utils.polyConstraint( edges, disable=True, # Disable previous settings, use only current t=0x8000, # type: 0x8000(edge) length=1, lengthbound=(0, self.__tolerance)) if invalid: raise RuntimeError( "Meshes found with zero edge length: {0}".format(invalid))