Explorar o código

Merge pull request #36961 from JFonS/fix_mesh_selection

Return correct mesh format for PrimitiveMesh
Rémi Verschelde %!s(int64=5) %!d(string=hai) anos
pai
achega
3c376a898a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      scene/resources/primitive_meshes.cpp

+ 1 - 1
scene/resources/primitive_meshes.cpp

@@ -150,7 +150,7 @@ Array PrimitiveMesh::surface_get_blend_shape_arrays(int p_surface) const {
 uint32_t PrimitiveMesh::surface_get_format(int p_idx) const {
 uint32_t PrimitiveMesh::surface_get_format(int p_idx) const {
 	ERR_FAIL_INDEX_V(p_idx, 1, 0);
 	ERR_FAIL_INDEX_V(p_idx, 1, 0);
 
 
-	return VS::ARRAY_COMPRESS_DEFAULT;
+	return VS::ARRAY_FORMAT_VERTEX | VS::ARRAY_FORMAT_NORMAL | VS::ARRAY_FORMAT_TANGENT | VS::ARRAY_FORMAT_TEX_UV | VS::ARRAY_FORMAT_INDEX | VS::ARRAY_COMPRESS_DEFAULT;
 }
 }
 
 
 Mesh::PrimitiveType PrimitiveMesh::surface_get_primitive_type(int p_idx) const {
 Mesh::PrimitiveType PrimitiveMesh::surface_get_primitive_type(int p_idx) const {