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

Method updateNodesRequest

Engine/ParallelRenderArgs.cpp:779–816  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

777}
778
779void
780ParallelRenderArgsSetter::updateNodesRequest(const FrameRequestMap& request)
781{
782 for (NodesList::iterator it = nodes.begin(); it != nodes.end(); ++it) {
783 {
784 FrameRequestMap::const_iterator foundRequest = request.find(*it);
785 if ( foundRequest != request.end() ) {
786 (*it)->getEffectInstance()->setNodeRequestThreadLocal(foundRequest->second);
787 }
788 }
789
790 NodesList rotoPaintNodes;
791 boost::shared_ptr<RotoContext> roto = (*it)->getRotoContext();
792 if (roto) {
793 roto->getRotoPaintTreeNodes(&rotoPaintNodes);
794 }
795
796 for (NodesList::iterator it2 = rotoPaintNodes.begin(); it2 != rotoPaintNodes.end(); ++it2) {
797 FrameRequestMap::const_iterator foundRequest = request.find(*it2);
798 if ( foundRequest != request.end() ) {
799 (*it2)->getEffectInstance()->setNodeRequestThreadLocal(foundRequest->second);
800 }
801 }
802
803 if ( (*it)->isMultiInstance() ) {
804 ///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
805 ///on parameters.
806 NodesList children;
807 (*it)->getChildrenMultiInstance(&children);
808 for (NodesList::iterator it2 = children.begin(); it2 != children.end(); ++it2) {
809 FrameRequestMap::const_iterator foundRequest = request.find(*it2);
810 if ( foundRequest != request.end() ) {
811 (*it2)->getEffectInstance()->setNodeRequestThreadLocal(foundRequest->second);
812 }
813 }
814 }
815 }
816}
817
818ParallelRenderArgsSetter::ParallelRenderArgsSetter(const boost::shared_ptr<std::map<NodePtr, boost::shared_ptr<ParallelRenderArgs> > >& args)
819 : argsMap(args)

Callers 3

renderFrameMethod · 0.80
renderViewer_internalMethod · 0.80
getRotoContextMethod · 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