-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Mesh instance UV2 unwrapping improvements #83498
Conversation
06f18e8
to
17a37f9
Compare
Updated, removed redundant explicit casting. |
Enforce foreign resource modification rules. Add more helpful error handling for ArrayMesh unwrapping.
17a37f9
to
e865bad
Compare
Fixed |
Thanks! |
err_dialog->set_text(TTR("Mesh cannot unwrap UVs because it belongs to another resource which was imported from another file type. Make it unique first.")); | ||
|
||
uint64_t format = array_mesh->surface_get_format(i); | ||
if (format & Mesh::ArrayFormat::ARRAY_FORMAT_NORMAL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this not backwards? It checks that it has normals and throws an error if it does, it should be:
if (!(format & Mesh::ArrayFormat::ARRAY_FORMAT_NORMAL)) {
Right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For future readers, continue to #84374.
The new option to set the unwrap mesh UV2 option in PrimitiveMeshes from the MeshInstance3DEditorPlugin now respects the global rules which disallows modifications to foreign resources and pre-emptively shows more informative error messages for common ArrayMesh unwrapping fail cases rather than conveying a generic popup error message and providing the actual information as a notification.