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

Method inputIndex

Engine/NodeInputs.cpp:1282–1307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1280}
1281
1282int
1283Node::inputIndex(const NodePtr& n) const
1284{
1285 if (!n) {
1286 return -1;
1287 }
1288
1289 ///Only called by the main-thread
1290 assert( QThread::currentThread() == qApp->thread() );
1291 assert(_imp->inputsInitialized);
1292
1293 NodePtr parent = _imp->multiInstanceParent.lock();
1294 if (parent) {
1295 return parent->inputIndex(n);
1296 }
1297
1298 ///No need to lock this is only called by the main-thread
1299 for (std::size_t i = 0; i < _imp->inputs.size(); ++i) {
1300 if (_imp->inputs[i].lock() == n) {
1301 return i;
1302 }
1303 }
1304
1305
1306 return -1;
1307}
1308
1309const std::vector<std::string> &
1310Node::getInputLabels() const

Callers 5

disconnectNodesMethod · 0.80
extractTreesFromNodesMethod · 0.80
extractTreesFromNodesFunction · 0.80
mousePressEventMethod · 0.80

Calls 2

lockMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected