diff --git a/Applications/Utils/MeshEdit/checkMesh.cpp b/Applications/Utils/MeshEdit/checkMesh.cpp index 0314bf8647b48c40a22f313563e123e2295605f0..d4b696e1b9e6a04e9e43919c47d97a3f7516b52f 100644 --- a/Applications/Utils/MeshEdit/checkMesh.cpp +++ b/Applications/Utils/MeshEdit/checkMesh.cpp @@ -42,6 +42,8 @@ int main(int argc, char *argv[]) cmd.add( mesh_arg ); TCLAP::SwitchArg valid_arg("v","validation","validate the mesh"); cmd.add( valid_arg ); + TCLAP::SwitchArg print_properties_arg("p","print_properties","print properties stored in the mesh"); + cmd.add( print_properties_arg ); cmd.parse( argc, argv ); @@ -87,6 +89,14 @@ int main(int argc, char *argv[]) const std::pair<unsigned, unsigned> minmax_values(MeshLib::MeshInformation::getValueBounds(*mesh)); INFO("Material IDs: [%d, %d]", minmax_values.first, minmax_values.second); + if (print_properties_arg.isSet()) { + MeshLib::Properties const& properties = mesh->getProperties(); + std::vector<std::string> const& names = properties.getPropertyVectorNames(); + INFO("There are %d properties in the mesh", names.size()); + for (std::size_t i = 0; i < names.size(); ++i) + INFO("\t%d: %s", i, names[i].c_str()); + } + if (valid_arg.isSet()) { // Validation MeshLib::MeshValidation validation(*const_cast<MeshLib::Mesh*>(mesh)); // MeshValidation outputs error messages