| 5135 | } |
| 5136 | |
| 5137 | void |
| 5138 | EffectInstance::abortAnyEvaluation(bool keepOldestRender) |
| 5139 | { |
| 5140 | /* |
| 5141 | Get recursively downstream all Output nodes and abort any render on them |
| 5142 | If an output node such as a viewer was doing playback, enable it to restart |
| 5143 | automatically playback when the abort finished |
| 5144 | */ |
| 5145 | NodePtr node = getNode(); |
| 5146 | |
| 5147 | assert(node); |
| 5148 | std::list<OutputEffectInstance*> outputNodes; |
| 5149 | NodeGroup* isGroup = dynamic_cast<NodeGroup*>(this); |
| 5150 | if (isGroup) { |
| 5151 | NodesList inputOutputs; |
| 5152 | isGroup->getInputsOutputs(&inputOutputs, false); |
| 5153 | for (NodesList::iterator it = inputOutputs.begin(); it != inputOutputs.end(); ++it) { |
| 5154 | (*it)->hasOutputNodesConnected(&outputNodes); |
| 5155 | } |
| 5156 | } else { |
| 5157 | RotoDrawableItemPtr attachedStroke = getNode()->getAttachedRotoItem(); |
| 5158 | if (attachedStroke) { |
| 5159 | ///For nodes internal to the rotopaint tree, check outputs of the rotopaint node instead |
| 5160 | RotoContextPtr context = attachedStroke->getContext(); |
| 5161 | assert(context); |
| 5162 | if (context) { |
| 5163 | NodePtr rotonode = context->getNode(); |
| 5164 | if (rotonode) { |
| 5165 | rotonode->hasOutputNodesConnected(&outputNodes); |
| 5166 | } |
| 5167 | } |
| 5168 | } else { |
| 5169 | node->hasOutputNodesConnected(&outputNodes); |
| 5170 | } |
| 5171 | } |
| 5172 | for (std::list<OutputEffectInstance*>::const_iterator it = outputNodes.begin(); it != outputNodes.end(); ++it) { |
| 5173 | //Abort and allow playback to restart but do not block, when this function returns any ongoing render may very |
| 5174 | //well not be finished |
| 5175 | if (keepOldestRender) { |
| 5176 | (*it)->getRenderEngine()->abortRenderingAutoRestart(); |
| 5177 | } else { |
| 5178 | (*it)->getRenderEngine()->abortRenderingNoRestart(keepOldestRender); |
| 5179 | } |
| 5180 | } |
| 5181 | } |
| 5182 | |
| 5183 | double |
| 5184 | EffectInstance::getCurrentTime() const |
nothing calls this directly
no test coverage detected