aboutsummaryrefslogtreecommitdiff
path: root/scene/resources/mesh_data_tool.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2017-06-07 18:18:55 -0300
committerJuan Linietsky2017-06-07 18:20:04 -0300
commit5bf810b5db953d3f58acdd2d05d5410897f41d63 (patch)
tree15497d5b43527c997abb5c50bcba2675704431dc /scene/resources/mesh_data_tool.cpp
parent5f5d629c8ad654fddbf17850c6fad2999d10daf7 (diff)
downloadgodot-5bf810b5db953d3f58acdd2d05d5410897f41d63.tar.gz
godot-5bf810b5db953d3f58acdd2d05d5410897f41d63.tar.zst
godot-5bf810b5db953d3f58acdd2d05d5410897f41d63.zip
Diffstat (limited to 'scene/resources/mesh_data_tool.cpp')
-rw-r--r--scene/resources/mesh_data_tool.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/resources/mesh_data_tool.cpp b/scene/resources/mesh_data_tool.cpp
index b6b47bf44..dc3713fb5 100644
--- a/scene/resources/mesh_data_tool.cpp
+++ b/scene/resources/mesh_data_tool.cpp
@@ -38,7 +38,7 @@ void MeshDataTool::clear() {
format = 0;
}
-Error MeshDataTool::create_from_surface(const Ref<Mesh> &p_mesh, int p_surface) {
+Error MeshDataTool::create_from_surface(const Ref<ArrayMesh> &p_mesh, int p_surface) {
ERR_FAIL_COND_V(p_mesh.is_null(), ERR_INVALID_PARAMETER);
@@ -179,7 +179,7 @@ Error MeshDataTool::create_from_surface(const Ref<Mesh> &p_mesh, int p_surface)
return OK;
}
-Error MeshDataTool::commit_to_surface(const Ref<Mesh> &p_mesh) {
+Error MeshDataTool::commit_to_surface(const Ref<ArrayMesh> &p_mesh) {
ERR_FAIL_COND_V(p_mesh.is_null(), ERR_INVALID_PARAMETER);
Array arr;
@@ -309,7 +309,7 @@ Error MeshDataTool::commit_to_surface(const Ref<Mesh> &p_mesh) {
if (w.size())
arr[Mesh::ARRAY_WEIGHTS] = w;
- Ref<Mesh> ncmesh = p_mesh;
+ Ref<ArrayMesh> ncmesh = p_mesh;
int sc = ncmesh->get_surface_count();
ncmesh->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLES, arr);
ncmesh->surface_set_material(sc, material);