From bab5436de7e71b2257a27405d53f0a2c5a444d7f Mon Sep 17 00:00:00 2001 From: Marc Gilleron Date: Sun, 1 Aug 2021 15:40:41 +0100 Subject: [PATCH] Fix materials shown under wrong category --- terrain/voxel_terrain.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/terrain/voxel_terrain.cpp b/terrain/voxel_terrain.cpp index 0f68b5e2..ab7378a0 100644 --- a/terrain/voxel_terrain.cpp +++ b/terrain/voxel_terrain.cpp @@ -62,6 +62,8 @@ bool VoxelTerrain::_get(const StringName &p_name, Variant &r_ret) const { } void VoxelTerrain::_get_property_list(List *p_list) const { + // Need to add a group here because otherwise it appears under the last group declared in `_bind_methods` + p_list->push_back(PropertyInfo(Variant::NIL, "Materials", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_GROUP)); for (unsigned int i = 0; i < VoxelMesherBlocky::MAX_MATERIALS; ++i) { p_list->push_back(PropertyInfo( Variant::OBJECT, "material/" + itos(i), PROPERTY_HINT_RESOURCE_TYPE, "ShaderMaterial,SpatialMaterial"));