18 std::vector<attribute::MeshAttributeHandle> handles;
35 if (handles.empty()) {
38 if (handles.size() > 1) {
40 "Attribute name ambiguity: {} attributes have the name {}",
46 return handles.front();
51 if (attribute.is_string()) {
53 }
else if (attribute.is_object()) {
71 std::vector<attribute::MeshAttributeHandle> handles;
73 if (attribute_names.is_array()) {
74 for (
const auto& name : attribute_names) {
attribute::MeshAttributeHandle get_attribute_handle(const std::string &name, const PrimitiveType ptype) const
bool has_attribute(const std::string &name, const PrimitiveType ptype) const
PrimitiveType top_simplex_type() const
attribute::MeshAttributeHandle get_attribute(const Mesh &m, const std::string &name)
Get an attribute handle only by name.
std::vector< attribute::MeshAttributeHandle > get_attributes(const Mesh &m, const nlohmann::json &attribute_names)
std::vector< PrimitiveType > primitive_below(PrimitiveType pt, bool lower_to_upper)
void log_and_throw_error(const std::string &msg)