| 785 | } |
| 786 | |
| 787 | void |
| 788 | ParallelRenderArgsSetter::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 | |
| 826 | ParallelRenderArgsSetter::ParallelRenderArgsSetter(const std::shared_ptr<std::map<NodePtr, ParallelRenderArgsPtr> >& args) |
| 827 | : argsMap(args) |
no test coverage detected