summaryrefslogtreecommitdiffstats
path: root/scene/resources/surface_tool.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-07-23 16:04:32 -0300
committerGitHub <noreply@github.com>2018-07-23 16:04:32 -0300
commitdc976cac57bc04de6cdace8d582a48f07afa0a7b (patch)
treeedcabc27a46b50ce492f02fc99ee96b37d32f667 /scene/resources/surface_tool.cpp
parentec85fd554b0ae9861fddabbda1667a93bdd52450 (diff)
parent17ebbfb56de980c5529c8a02a12141dd7bb766c8 (diff)
downloadredot-engine-dc976cac57bc04de6cdace8d582a48f07afa0a7b.tar.gz
Merge pull request #12678 from AndreaCatania/soft
Soft body
Diffstat (limited to 'scene/resources/surface_tool.cpp')
-rw-r--r--scene/resources/surface_tool.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp
index 5a42873d79..3df9ab26a4 100644
--- a/scene/resources/surface_tool.cpp
+++ b/scene/resources/surface_tool.cpp
@@ -421,6 +421,7 @@ Ref<ArrayMesh> SurfaceTool::commit(const Ref<ArrayMesh> &p_existing, uint32_t p_
Array a = commit_to_arrays();
mesh->add_surface_from_arrays(primitive, a, Array(), p_flags);
+
if (material.is_valid())
mesh->surface_set_material(surface, material);