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

Maya: Improve validators for a mesh without geometry (no faces) #409

Merged
merged 3 commits into from
Apr 15, 2024

Conversation

BigRoy
Copy link
Collaborator

@BigRoy BigRoy commented Apr 11, 2024

Changelog Description

Improve validations for meshes without any faces/geometry.

Easiest reproducable is using this python script to create a mesh:

from maya import cmds
cmds.createNode("mesh")

Or to simplify it for publishing:

from maya import cmds
transform = cmds.createNode("transform", name="empty_GEO")
cmds.createNode("mesh", parent=transform, name="empty_GEOShape")

Now publish that mesh as a model with the Validate Mesh NGONs an Validate Mesh UV has map1 UV set validators enabled. Without this PR those validators will error - now they will ignore, or invalidate with PublishValidationError improving the report.

I've also taken the liberty to improve the validation message for the Validate Mesh has map1 UV Set validator

Additional info

We hit an issue where somehow in production where a mesh was broken and had no remaining geometry (likely due to an issue with maya's construction history somewhere). How to reproduce that actual real production scenario, I have no idea. But the code provided above creates a mesh with a 'similar' state.

Note that a mesh without faces/geometry is still invalid - but it's validated by a dedicated validator generating a better report.

Testing notes:

  1. Enable validators:
ayon+settings://maya/publish/ValidateMeshUVSetMap1
ayon+settings://maya/publish/ValidateMeshNgons
  1. Validate the 'broken mesh' from the reproducable
  2. A nice report should be visible instead of the "this is not your fault" error.

@ynbot ynbot added the type: bug Something isn't working label Apr 11, 2024
Copy link
Member

@tokejepsen tokejepsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In latest develop with those validator enabled I get this when publishing the empty mesh:

Capture

So I dont think the testing notes work.

@BigRoy
Copy link
Collaborator Author

BigRoy commented Apr 12, 2024

In latest develop with those validator enabled I get this when publishing the empty mesh:

Capture

So I dont think the testing notes work.

Are you sure the validators are enabled? Can you see them having run in Details tab?

This is what I get (latest develop + Maya 2024):
image
image

Then if I disable NGONs validation, but only enable the other Validate Mesh Has map1 uv set:
image

@BigRoy BigRoy requested a review from tokejepsen April 12, 2024 07:34
@BigRoy BigRoy assigned tokejepsen and unassigned BigRoy Apr 12, 2024
Copy link
Member

@LiborBatek LiborBatek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Screenshot 2024-04-12 094019

After hitting Repair the geometry is converted to empty transform which gives me different Validate error, which seems also correct to me

Screenshot 2024-04-12 094340

Copy link
Member

@moonyuet moonyuet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code looks good to me.

Copy link
Member

@tokejepsen tokejepsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested successfully in Maya 2023.

@tokejepsen tokejepsen merged commit b2671c6 into ynput:develop Apr 15, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
host: Maya size/XS type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants