mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
some tweaks on codes
This commit is contained in:
parent
16b28fe3bd
commit
d98c055a04
1 changed files with 16 additions and 4 deletions
|
|
@ -33,9 +33,21 @@ class ValidateMeshHasUVs(pyblish.api.InstancePlugin,
|
|||
|
||||
@classmethod
|
||||
def get_invalid(cls, instance):
|
||||
invalid = [member for member in instance.data["members"]
|
||||
if not member.mesh.numTVerts > 0]
|
||||
return invalid
|
||||
invalid_mesh_type = [member for member in instance.data["members"]
|
||||
if not rt.isProperty(member, "mesh")]
|
||||
if invalid_mesh_type:
|
||||
cls.log.error("Non-mesh type objects detected:\n".join(
|
||||
"-{}".format(invalid.name) for invalid
|
||||
in invalid_mesh_type))
|
||||
return invalid_mesh_type
|
||||
|
||||
invalid_uv = [member for member in instance.data["members"]
|
||||
if not member.mesh.numTVerts > 0]
|
||||
if invalid_uv:
|
||||
cls.log.error("Meshes detected with invalid UVs:\n".join(
|
||||
"-{}".format(invalid.name) for invalid
|
||||
in invalid_uv))
|
||||
return invalid_uv
|
||||
|
||||
def process(self, instance):
|
||||
invalid = self.get_invalid(instance)
|
||||
|
|
@ -47,7 +59,7 @@ class ValidateMeshHasUVs(pyblish.api.InstancePlugin,
|
|||
report = (
|
||||
"Model meshes are required to have UVs.\n\n"
|
||||
"Meshes detected with invalid or missing UVs:\n"
|
||||
f"{bullet_point_invalid_statement}\n\n"
|
||||
f"{bullet_point_invalid_statement}\n"
|
||||
)
|
||||
raise PublishValidationError(
|
||||
report,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue