diff --git a/src/ascii-parser.cc b/src/ascii-parser.cc index c0050434..1188495a 100644 --- a/src/ascii-parser.cc +++ b/src/ascii-parser.cc @@ -4022,6 +4022,9 @@ bool AsciiParser::ParsePrimProps(std::map *props, } props->at(attr_name).attribute().set_connection(abs_path); + + // Set PropType to Attrib(since previously created Property may have EmptyAttrib). + props->at(attr_name).set_property_type(Property::Type::Attrib); } else { Attribute attr; @@ -4095,6 +4098,7 @@ bool AsciiParser::ParsePrimProps(std::map *props, Attribute *pattr{nullptr}; bool attr_exists = props->count(attr_name) && props->at(attr_name).is_attribute(); if (attr_exists) { + DCOUT("Attr exists"); // Add timeSamples to existing Attribute pattr = &(props->at(attr_name).attribute()); @@ -4105,6 +4109,9 @@ bool AsciiParser::ParsePrimProps(std::map *props, pattr->get_var().set_timesamples(ts); + // Set PropType to Attrib(since previously created Property may have EmptyAttrib). + props->at(attr_name).set_property_type(Property::Type::Attrib); + } else { // new Attribute pattr = &attr; @@ -4497,6 +4504,9 @@ bool AsciiParser::ParsePrimProps(std::map *props, if (pattr->variability() != variability) { PUSH_ERROR_AND_RETURN(fmt::format("Variability mismatch. Attribute `{}` already has variability `{}`, but 'default' value has variability `{}`.", attr_name, to_string(pattr->variability()), to_string(variability))); } + + // Set PropType to Attrib(since previously created Property may have EmptyAttrib). + props->at(attr_name).set_property_type(Property::Type::Attrib); } else { pattr->variability() = variability; Property p(*pattr, custom_qual);