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

Method updateNodesRequest

Engine/ParallelRenderArgs.cpp:787–824  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

785}
786
787void
788ParallelRenderArgsSetter::updateNodesRequest(const FrameRequestMap& request)
789{
790 for (NodesList::iterator it = nodes.begin(); it != nodes.end(); ++it) {
791 {
792 FrameRequestMap::const_iterator foundRequest = request.find(*it);
793 if ( foundRequest != request.end() ) {
794 (*it)->getEffectInstance()->setNodeRequestThreadLocal(foundRequest->second);
795 }
796 }
797
798 NodesList rotoPaintNodes;
799 RotoContextPtr roto = (*it)->getRotoContext();
800 if (roto) {
801 roto->getRotoPaintTreeNodes(&rotoPaintNodes);
802 }
803
804 for (NodesList::iterator it2 = rotoPaintNodes.begin(); it2 != rotoPaintNodes.end(); ++it2) {
805 FrameRequestMap::const_iterator foundRequest = request.find(*it2);
806 if ( foundRequest != request.end() ) {
807 (*it2)->getEffectInstance()->setNodeRequestThreadLocal(foundRequest->second);
808 }
809 }
810
811 if ( (*it)->isMultiInstance() ) {
812 ///If the node has children, set the thread-local storage on them too, even if they do not render, it can be useful for expressions
813 ///on parameters.
814 NodesList children;
815 (*it)->getChildrenMultiInstance(&children);
816 for (NodesList::iterator it2 = children.begin(); it2 != children.end(); ++it2) {
817 FrameRequestMap::const_iterator foundRequest = request.find(*it2);
818 if ( foundRequest != request.end() ) {
819 (*it2)->getEffectInstance()->setNodeRequestThreadLocal(foundRequest->second);
820 }
821 }
822 }
823 }
824}
825
826ParallelRenderArgsSetter::ParallelRenderArgsSetter(const std::shared_ptr<std::map<NodePtr, ParallelRenderArgsPtr> >& args)
827 : argsMap(args)

Callers 3

renderFrameMethod · 0.80
renderViewer_internalMethod · 0.80
Node.cppFile · 0.80

Calls 9

getEffectInstanceMethod · 0.80
getRotoPaintTreeNodesMethod · 0.80
isMultiInstanceMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
findMethod · 0.45
getRotoContextMethod · 0.45

Tested by

no test coverage detected