| 405 | } |
| 406 | |
| 407 | void |
| 408 | NodeCollection::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 | |
| 451 | void |
| 452 | NodeCollection::clearNodesBlocking() |
nothing calls this directly
no test coverage detected