mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Merge pull request #5630 from tokejepsen/bugfix/maya_validate_colorsets
Maya: Support new publisher for colorsets validation.
This commit is contained in:
commit
5c9ce22807
1 changed files with 9 additions and 6 deletions
|
|
@ -3,9 +3,10 @@ from maya import cmds
|
|||
import pyblish.api
|
||||
import openpype.hosts.maya.api.action
|
||||
from openpype.pipeline.publish import (
|
||||
RepairAction,
|
||||
ValidateMeshOrder,
|
||||
OptionalPyblishPluginMixin
|
||||
OptionalPyblishPluginMixin,
|
||||
PublishValidationError,
|
||||
RepairAction
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -22,8 +23,9 @@ class ValidateColorSets(pyblish.api.Validator,
|
|||
hosts = ['maya']
|
||||
families = ['model']
|
||||
label = 'Mesh ColorSets'
|
||||
actions = [openpype.hosts.maya.api.action.SelectInvalidAction,
|
||||
RepairAction]
|
||||
actions = [
|
||||
openpype.hosts.maya.api.action.SelectInvalidAction, RepairAction
|
||||
]
|
||||
optional = True
|
||||
|
||||
@staticmethod
|
||||
|
|
@ -48,8 +50,9 @@ class ValidateColorSets(pyblish.api.Validator,
|
|||
invalid = self.get_invalid(instance)
|
||||
|
||||
if invalid:
|
||||
raise ValueError("Meshes found with "
|
||||
"Color Sets: {0}".format(invalid))
|
||||
raise PublishValidationError(
|
||||
message="Meshes found with Color Sets: {0}".format(invalid)
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def repair(cls, instance):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue