diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-06-03 13:59:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-03 13:59:43 +0200 |
commit | 0dac4d6db6553a90ed5e9daf06fe3a1cd3e3fb5f (patch) | |
tree | 2356764b04c5e929b512b2f1973b4f3db1eb25e2 /scene/resources/primitive_meshes.cpp | |
parent | b3162a2a28e039c32d138fdf7ae464cf6b19cd18 (diff) | |
parent | 6df53e0401fd7c2f8e81cd7d8189584706d3d7d8 (diff) | |
download | redot-engine-0dac4d6db6553a90ed5e9daf06fe3a1cd3e3fb5f.tar.gz |
Merge pull request #25522 from aqnuep/MeshLibrary_improvements
MeshLibrary export improvements
Diffstat (limited to 'scene/resources/primitive_meshes.cpp')
-rw-r--r-- | scene/resources/primitive_meshes.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp index db58fe7823..04d13c8869 100644 --- a/scene/resources/primitive_meshes.cpp +++ b/scene/resources/primitive_meshes.cpp @@ -157,6 +157,12 @@ Mesh::PrimitiveType PrimitiveMesh::surface_get_primitive_type(int p_idx) const { return primitive_type; } +void PrimitiveMesh::surface_set_material(int p_idx, const Ref<Material> &p_material) { + ERR_FAIL_INDEX(p_idx, 1); + + set_material(p_material); +} + Ref<Material> PrimitiveMesh::surface_get_material(int p_idx) const { ERR_FAIL_INDEX_V(p_idx, 1, NULL); |