diff --git a/MeshLib/Mesh.cpp b/MeshLib/Mesh.cpp index 57a148fa85e95bdfcbfb55a52500742e36ee210b..df7855873676dd3bb958bf6f7a60a23e423aa180 100644 --- a/MeshLib/Mesh.cpp +++ b/MeshLib/Mesh.cpp @@ -342,8 +342,10 @@ void scaleMeshPropertyVector(MeshLib::Mesh & mesh, PropertyVector<int> const* materialIDs(Mesh const& mesh) { auto const& properties = mesh.getProperties(); - return properties.existsPropertyVector<int>("MaterialIDs") - ? properties.getPropertyVector<int>("MaterialIDs") + return properties.existsPropertyVector<int>("MaterialIDs", + MeshLib::MeshItemType::Cell, 1) + ? properties.getPropertyVector<int>( + "MaterialIDs", MeshLib::MeshItemType::Cell, 1) : nullptr; }