MCPcopy Create free account
hub / github.com/PixarAnimationStudios/OpenUSD / QueryTimeSample

Method QueryTimeSample

pxr/usd/sdf/data.cpp:445–460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443}
444
445bool
446SdfData::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
462bool
463SdfData::QueryTimeSample(const SdfPath &path, double time,

Callers 7

_QueryTimeSampleFunction · 0.45
_QueryTimeSampleFunction · 0.45
test_TimeSamplesMethod · 0.45
test_BasicMethod · 0.45
mainFunction · 0.45

Calls 3

StoreValueMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by 6

_QueryTimeSampleFunction · 0.36
test_TimeSamplesMethod · 0.36
test_BasicMethod · 0.36
mainFunction · 0.36