| 777 | } |
| 778 | |
| 779 | void |
| 780 | ParallelRenderArgsSetter::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 | |
| 818 | ParallelRenderArgsSetter::ParallelRenderArgsSetter(const boost::shared_ptr<std::map<NodePtr, boost::shared_ptr<ParallelRenderArgs> > >& args) |
| 819 | : argsMap(args) |
no test coverage detected