Explorar o código

Set the surface name when GLTF file is imported.

Andrea Catania %!s(int64=4) %!d(string=hai) anos
pai
achega
c174a598b1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      modules/gltf/gltf_document.cpp

+ 1 - 1
modules/gltf/gltf_document.cpp

@@ -2796,7 +2796,7 @@ Error GLTFDocument::_parse_meshes(Ref<GLTFState> state) {
 				mat = mat3d;
 			}
 
-			import_mesh->add_surface(primitive, array, morphs, Dictionary(), mat);
+			import_mesh->add_surface(primitive, array, morphs, Dictionary(), mat, mat->get_name());
 		}
 
 		Vector<float> blend_weights;