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

Method getInputLabel

Engine/NodeGroup.cpp:1163–1187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1161}
1162
1163std::string
1164NodeGroup::getInputLabel(int inputNb) const
1165{
1166 NodePtr input;
1167 {
1168 QMutexLocker k(&_imp->nodesLock);
1169 if ( ( inputNb >= (int)_imp->inputs.size() ) || (inputNb < 0) ) {
1170 return std::string();
1171 }
1172
1173 ///If the input name starts with "input" remove it, otherwise keep the full name
1174
1175 input = _imp->inputs[inputNb].lock();
1176 if (!input || !input->isActivated()) {
1177 return std::string();
1178 }
1179 }
1180 QString inputName = QString::fromUtf8( input->getLabel_mt_safe().c_str() );
1181
1182 if ( inputName.startsWith(QString::fromUtf8("input"), Qt::CaseInsensitive) ) {
1183 inputName.remove(0, 5);
1184 }
1185
1186 return inputName.toStdString();
1187}
1188
1189KnobButtonPtr
1190NodeGroup::getExportAsPyPlugButton() const

Callers

nothing calls this directly

Calls 6

getLabel_mt_safeMethod · 0.80
removeMethod · 0.80
toStdStringMethod · 0.80
sizeMethod · 0.45
lockMethod · 0.45
isActivatedMethod · 0.45

Tested by

no test coverage detected