void UsdGeomPrimvar::BlockIndices() const { // Check if the typeName is array valued here and issue a warning // if it's not. SdfValueTypeName typeName = GetTypeName(); if (!typeName.IsArray()) { TF_CODING_ERROR("Setting indices on non-array valued primvar of type " "'%s'.", typeName.GetAsToken().GetText()); return; } _GetIndicesAttr(/*create*/ true).Block(); }
bool UsdGeomPrimvar::SetIndices(const VtIntArray &indices, UsdTimeCode time) const { // Check if the typeName is array valued here and issue a warning // if it's not. SdfValueTypeName typeName = GetTypeName(); if (!typeName.IsArray()) { TF_CODING_ERROR("Setting indices on non-array valued primvar of type " "'%s'.", typeName.GetAsToken().GetText()); return false; } return _GetIndicesAttr(/*create*/ true).Set(indices, time); }