| 407 | } |
| 408 | |
| 409 | void |
| 410 | NodeCollection::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 | |
| 453 | void |
| 454 | NodeCollection::clearNodesBlocking() |
nothing calls this directly
no test coverage detected