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

Method getInputLabel

Engine/NodeGroup.cpp:1153–1177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1151}
1152
1153std::string
1154NodeGroup::getInputLabel(int inputNb) const
1155{
1156 NodePtr input;
1157 {
1158 QMutexLocker k(&_imp->nodesLock);
1159 if ( ( inputNb >= (int)_imp->inputs.size() ) || (inputNb < 0) ) {
1160 return std::string();
1161 }
1162
1163 ///If the input name starts with "input" remove it, otherwise keep the full name
1164
1165 input = _imp->inputs[inputNb].lock();
1166 if (!input) {
1167 return std::string();
1168 }
1169 }
1170 QString inputName = QString::fromUtf8( input->getLabel_mt_safe().c_str() );
1171
1172 if ( inputName.startsWith(QString::fromUtf8("input"), Qt::CaseInsensitive) ) {
1173 inputName.remove(0, 5);
1174 }
1175
1176 return inputName.toStdString();
1177}
1178
1179boost::shared_ptr<KnobButton>
1180NodeGroup::getExportAsPyPlugButton() const

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected