| 443 | } |
| 444 | |
| 445 | bool |
| 446 | SdfData::QueryTimeSample(const SdfPath &path, double time, |
| 447 | VtValue *value) const |
| 448 | { |
| 449 | const VtValue *fval = _GetFieldValue(path, SdfDataTokens->TimeSamples); |
| 450 | if (fval && fval->IsHolding<SdfTimeSampleMap>()) { |
| 451 | auto const &tsmap = fval->UncheckedGet<SdfTimeSampleMap>(); |
| 452 | auto iter = tsmap.find(time); |
| 453 | if (iter != tsmap.end()) { |
| 454 | if (value) |
| 455 | *value = iter->second; |
| 456 | return true; |
| 457 | } |
| 458 | } |
| 459 | return false; |
| 460 | } |
| 461 | |
| 462 | bool |
| 463 | SdfData::QueryTimeSample(const SdfPath &path, double time, |