Skip to content
Snippets Groups Projects
Commit 319f5f33 authored by Tom Fischer's avatar Tom Fischer Committed by Dmitri Naumov
Browse files

[MeL] Use new {exists,get}PropertyVector.

This versions check if the PropertyVector is
assigned to the requested mesh item type and has
the required number of components.
parent fa26adf1
No related branches found
No related tags found
No related merge requests found
...@@ -342,8 +342,10 @@ void scaleMeshPropertyVector(MeshLib::Mesh & mesh, ...@@ -342,8 +342,10 @@ void scaleMeshPropertyVector(MeshLib::Mesh & mesh,
PropertyVector<int> const* materialIDs(Mesh const& mesh) PropertyVector<int> const* materialIDs(Mesh const& mesh)
{ {
auto const& properties = mesh.getProperties(); auto const& properties = mesh.getProperties();
return properties.existsPropertyVector<int>("MaterialIDs") return properties.existsPropertyVector<int>("MaterialIDs",
? properties.getPropertyVector<int>("MaterialIDs") MeshLib::MeshItemType::Cell, 1)
? properties.getPropertyVector<int>(
"MaterialIDs", MeshLib::MeshItemType::Cell, 1)
: nullptr; : nullptr;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment