Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max: Validate Mesh Has UVs #121

Merged
merged 14 commits into from
Mar 1, 2024
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,11 @@ class ValidateMeshHasUVs(pyblish.api.InstancePlugin,

@classmethod
def get_invalid(cls, instance):
invalid_mesh_type = [member for member in instance.data["members"]
if rt.isProperty(member, "mesh")]
if 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")

return invalid_uv
meshes = [member for member in instance.data["members"]
if rt.isProperty(member, "mesh")]
invalid = [member for member in meshes
if not member.mesh.numTVerts > 0]
moonyuet marked this conversation as resolved.
Show resolved Hide resolved
return invalid

def process(self, instance):
invalid = self.get_invalid(instance)
Expand Down