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

Method refreshInputRelatedDataInternal

Engine/Node.cpp:10444–10491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10442} // Node::refreshAllInputRelatedData
10443
10444bool
10445Node::refreshInputRelatedDataInternal(bool domarking, std::set<Node*>& markedNodes)
10446{
10447 {
10448 QMutexLocker k(&_imp->pluginsPropMutex);
10449 if (!_imp->mustComputeInputRelatedData) {
10450 //We didn't change
10451 return false;
10452 }
10453 }
10454
10455 if (domarking) {
10456 std::set<Node*>::iterator found = markedNodes.find(this);
10457
10458 if ( found != markedNodes.end() ) {
10459 return false;
10460 }
10461 }
10462
10463 ///Check if inputs must be refreshed first
10464
10465 int maxInputs = getMaxInputCount();
10466 std::vector<NodeWPtr > inputsCopy(maxInputs);
10467 for (int i = 0; i < maxInputs; ++i) {
10468 NodePtr input = getInput(i);
10469 inputsCopy[i] = input;
10470 if ( input && input->isInputRelatedDataDirty() ) {
10471 input->refreshInputRelatedDataInternal(true, markedNodes);
10472 }
10473 }
10474
10475 if (domarking) {
10476 markedNodes.insert(this);
10477 }
10478
10479 bool hasChanged = refreshAllInputRelatedData(false, inputsCopy);
10480
10481 if ( isRotoPaintingNode() ) {
10482 boost::shared_ptr<RotoContext> roto = getRotoContext();
10483 assert(roto);
10484 NodePtr bottomMerge = roto->getRotoPaintBottomMergeNode();
10485 if (bottomMerge) {
10486 bottomMerge->refreshInputRelatedDataRecursiveInternal(markedNodes);
10487 }
10488 }
10489
10490 return hasChanged;
10491}
10492
10493bool
10494Node::isInputRelatedDataDirty() const

Callers

nothing calls this directly

Calls 6

findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected