| 318 | } |
| 319 | |
| 320 | Exec_MetadataInvalidationResult |
| 321 | Exec_Program::InvalidateMetadataValues( |
| 322 | TfSpan<const std::pair<SdfPath, TfToken>> invalidFields) |
| 323 | { |
| 324 | TRACE_FUNCTION(); |
| 325 | |
| 326 | const size_t numInvalidFields = invalidFields.size(); |
| 327 | |
| 328 | VdfMaskedOutputVector leafInvalidationRequest; |
| 329 | leafInvalidationRequest.reserve(numInvalidFields); |
| 330 | TfBits compiledProperties(numInvalidFields); |
| 331 | _inputNodesRequiringInvalidation.reserve( |
| 332 | _inputNodesRequiringInvalidation.size() + numInvalidFields); |
| 333 | |
| 334 | for (size_t i = 0; i < numInvalidFields; ++i) { |
| 335 | const auto it = _metadataInputNodes.find(invalidFields[i]); |
| 336 | |
| 337 | // The corresponding metadata input may not have been compiled. |
| 338 | if (it == _metadataInputNodes.end()) { |
| 339 | continue; |
| 340 | } |
| 341 | |
| 342 | Exec_MetadataInputNode *const node = it->second; |
| 343 | |
| 344 | // Since this is an input node to the exec network, we need to make sure |
| 345 | // that executors are invalidated before the next round of evaluation. |
| 346 | _inputNodesRequiringInvalidation.push_back(node->GetId()); |
| 347 | |
| 348 | // Queue the input node's output(s) for leaf node invalidation. |
| 349 | leafInvalidationRequest.emplace_back( |
| 350 | node->GetOutput(), VdfMask::AllOnes(1)); |
| 351 | } |
| 352 | |
| 353 | // Find all the leaf nodes reachable from the input nodes. |
| 354 | // |
| 355 | // We won't ask the leaf node cache to incur the cost of performing |
| 356 | // incremental updates on the resulting cached traversal, because it is not |
| 357 | // guaranteed that we will repeatedly see the exact same authored value |
| 358 | // invalidation across rounds of structural change processing (in contrast |
| 359 | // to time invalidation). |
| 360 | const std::vector<const VdfNode *> &leafNodes = _leafNodeCache.FindNodes( |
| 361 | leafInvalidationRequest, /* updateIncrementally */ false); |
| 362 | |
| 363 | return { |
| 364 | std::move(leafInvalidationRequest), |
| 365 | leafNodes |
| 366 | }; |
| 367 | } |
| 368 | |
| 369 | Exec_TimeChangeInvalidationResult |
| 370 | Exec_Program::InvalidateTime(const EfTime &oldTime, const EfTime &newTime) |
no test coverage detected