-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Fix GLTFDocument so it can export CSG Meshes correctly. #92368
Conversation
a7093b7
to
214e74b
Compare
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.
Seems good - i like the simplification of using MeshInstance3D::get_active_material()
since that is what it is for.
@@ -5348,7 +5353,7 @@ void GLTFDocument::_convert_csg_shape_to_gltf(CSGShape3D *p_current, GLTFNodeInd | |||
GLTFMeshIndex mesh_i = p_state->meshes.size(); | |||
p_state->meshes.push_back(gltf_mesh); | |||
p_gltf_node->mesh = mesh_i; | |||
p_gltf_node->transform = csg->get_meshes()[0]; | |||
p_gltf_node->transform = csg->get_transform(); |
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.
Weird: i wonder why get_meshes()[0]
is hardcoded to always return Transform3D::IDENTITY
Thanks! |
When exporting a CSGMesh the gltf fails to export in a few situations: