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

Method DidInvalidateComputedValues

pxr/exec/exec/requestImpl.cpp:91–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91void
92Exec_RequestImpl::DidInvalidateComputedValues(
93 const Exec_AttributeValueInvalidationResult &invalidationResult)
94{
95 if (!_valueCallback || _leafOutputs.empty()) {
96 TF_DEBUG(EXEC_REQUEST_INVALIDATION).Msg(
97 "[%s] %s\n", TF_FUNC_NAME().c_str(),
98 !_valueCallback
99 ? "No value invalidation callback"
100 : "Request has not been prepared");
101 return;
102 }
103
104 TRACE_FUNCTION();
105
106 // This is considered new invalidation only if the invalidation interval
107 // isn't already fully contained in the last invalidation interval.
108 const EfTimeInterval &invalidInterval = invalidationResult.invalidInterval;
109 const bool isNewlyInvalidInterval = invalidInterval.IsFullInterval()
110 ? !_lastInvalidatedInterval.IsFullInterval()
111 : !_lastInvalidatedInterval.Contains(invalidInterval);
112 if (isNewlyInvalidInterval) {
113 _lastInvalidatedInterval |= invalidInterval;
114 }
115
116 // Build a set of invalid indices from the provided invalid leaf nodes.
117 ExecRequestIndexSet invalidIndices;
118 _InvalidateLeafOutputs(
119 isNewlyInvalidInterval,
120 invalidationResult.invalidLeafNodes,
121 &invalidIndices);
122
123 // TODO: Handle invalid properties which are not computed through exec.
124 // In doing so we must dispatch to the derived class in order to let the
125 // specific scene description library determine properties, which do not
126 // require execution.
127
128 // Only invoke the invalidation callback if there are any invalid indices
129 // from this request.
130 if (!invalidIndices.empty()) {
131 if (ARCH_UNLIKELY(TfDebug::IsEnabled(EXEC_REQUEST_INVALIDATION))) {
132 _OutputInvalidationResultDebugMsg(
133 TF_FUNC_NAME(), invalidIndices, invalidInterval);
134 }
135 TRACE_FUNCTION_SCOPE("value invalidation callback");
136 _valueCallback(invalidIndices, invalidInterval);
137 }
138}
139
140void
141Exec_RequestImpl::DidInvalidateComputedValues(

Calls 7

IsEnabledFunction · 0.85
GetFullIntervalFunction · 0.50
emptyMethod · 0.45
MsgMethod · 0.45
c_strMethod · 0.45
ContainsMethod · 0.45

Tested by

no test coverage detected