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

Method getNodesWithinBackdrop

Gui/NodeGraph45.cpp:106–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106NodesGuiList
107NodeGraph::getNodesWithinBackdrop(const NodeGuiPtr& bd) const
108{
109 BackdropGui* isBd = dynamic_cast<BackdropGui*>( bd.get() );
110
111 if (!isBd) {
112 return NodesGuiList();
113 }
114
115 QRectF bbox = bd->mapToScene( bd->boundingRect() ).boundingRect();
116 NodesGuiList ret;
117 QMutexLocker l(&_imp->_nodesMutex);
118
119 for (NodesGuiList::const_iterator it = _imp->_nodes.begin(); it != _imp->_nodes.end(); ++it) {
120 QRectF nodeBbox = (*it)->mapToScene( (*it)->boundingRect() ).boundingRect();
121 if ( bbox.contains(nodeBbox) ) {
122 ret.push_back(*it);
123 }
124 }
125
126 return ret;
127}
128
129void
130NodeGraph::refreshNodesKnobsAtTime(bool onlyTimeEvaluationKnobs,

Callers 2

getNodeSetMethod · 0.80
copyNodesInternalMethod · 0.80

Calls 6

getMethod · 0.45
boundingRectMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
containsMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected