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

Method clearNodesInternal

Engine/NodeGroup.cpp:407–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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