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

Method clearNodesInternal

Engine/NodeGroup.cpp:409–451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

407}
408
409void
410NodeCollection::clearNodesInternal(bool blocking)
411{
412 NodesList nodesToDelete;
413 {
414 QMutexLocker l(&_imp->nodesMutex);
415 nodesToDelete = _imp->nodes;
416 }
417
418 ///Clear recursively containers inside this group
419 for (NodesList::iterator it = nodesToDelete.begin(); it != nodesToDelete.end(); ++it) {
420 // You should have called quitAnyProcessing before!
421 assert( !(*it)->isNodeRendering() );
422
423 NodeGroup* isGrp = (*it)->isEffectGroup();
424 if (isGrp) {
425 isGrp->clearNodesInternal(blocking);
426 }
427 PrecompNode* isPrecomp = dynamic_cast<PrecompNode*>( (*it)->getEffectInstance().get() );
428 if (isPrecomp) {
429 isPrecomp->getPrecompApp()->getProject()->clearNodesInternal(blocking);
430 }
431 }
432
433 ///Kill effects
434
435 for (NodesList::iterator it = nodesToDelete.begin(); it != nodesToDelete.end(); ++it) {
436 (*it)->destroyNode(blocking, false);
437 }
438
439
440 if (_imp->graph) {
441 _imp->graph->onNodesCleared();
442 }
443
444
445 {
446 QMutexLocker l(&_imp->nodesMutex);
447 _imp->nodes.clear();
448 }
449
450 nodesToDelete.clear();
451}
452
453void
454NodeCollection::clearNodesBlocking()

Callers

nothing calls this directly

Calls 10

isNodeRenderingMethod · 0.80
getEffectInstanceMethod · 0.80
getProjectMethod · 0.80
getPrecompAppMethod · 0.80
destroyNodeMethod · 0.80
onNodesClearedMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
getMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected