Skip to content

Commit

Permalink
Restore attribute check
Browse files Browse the repository at this point in the history
  • Loading branch information
j9liu committed Dec 20, 2024
1 parent 3d26412 commit f1a98dc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Source/CesiumRuntime/Private/CesiumFeatureIdAttribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ FCesiumFeatureIdAttribute::FCesiumFeatureIdAttribute(
_featureIdAccessor(),
_attributeIndex(FeatureIDAttribute),
_propertyTableName(PropertyTableName) {
const std::string attributeName =
"_FEATURE_ID_" + std::to_string(FeatureIDAttribute);

auto featureID = Primitive.attributes.find(attributeName);
if (featureID == Primitive.attributes.end()) {
return;
}

this->_featureIdAccessor = CesiumGltf::getFeatureIdAccessorView(
Model,
Primitive,
Expand Down

0 comments on commit f1a98dc

Please sign in to comment.