MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / refreshInputRelatedDataInternal

Method refreshInputRelatedDataInternal

Engine/Node.cpp:6171–6218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6169} // Node::refreshAllInputRelatedData
6170
6171bool
6172Node::refreshInputRelatedDataInternal(bool domarking, std::set<Node*>& markedNodes)
6173{
6174 {
6175 QMutexLocker k(&_imp->pluginsPropMutex);
6176 if (!_imp->mustComputeInputRelatedData) {
6177 //We didn't change
6178 return false;
6179 }
6180 }
6181
6182 if (domarking) {
6183 std::set<Node*>::iterator found = markedNodes.find(this);
6184
6185 if ( found != markedNodes.end() ) {
6186 return false;
6187 }
6188 }
6189
6190 ///Check if inputs must be refreshed first
6191
6192 int maxInputs = getNInputs();
6193 std::vector<NodeWPtr> inputsCopy(maxInputs);
6194 for (int i = 0; i < maxInputs; ++i) {
6195 NodePtr input = getInput(i);
6196 inputsCopy[i] = input;
6197 if ( input && input->isInputRelatedDataDirty() ) {
6198 input->refreshInputRelatedDataInternal(true, markedNodes);
6199 }
6200 }
6201
6202 if (domarking) {
6203 markedNodes.insert(this);
6204 }
6205
6206 bool hasChanged = refreshAllInputRelatedData(false, inputsCopy);
6207
6208 if ( isRotoPaintingNode() ) {
6209 RotoContextPtr roto = getRotoContext();
6210 assert(roto);
6211 NodePtr bottomMerge = roto->getRotoPaintBottomMergeNode();
6212 if (bottomMerge) {
6213 bottomMerge->refreshInputRelatedDataRecursiveInternal(markedNodes);
6214 }
6215 }
6216
6217 return hasChanged;
6218}
6219
6220bool
6221Node::isInputRelatedDataDirty() const

Callers

nothing calls this directly

Calls 6

findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected