| 3286 | } |
| 3287 | |
| 3288 | std::string |
| 3289 | Node::makeInfoForInput(int inputNumber) const |
| 3290 | { |
| 3291 | if ( (inputNumber < -1) || ( inputNumber >= getMaxInputCount() ) ) { |
| 3292 | return ""; |
| 3293 | } |
| 3294 | EffectInstPtr input; |
| 3295 | if (inputNumber != -1) { |
| 3296 | input = _imp->effect->getInput(inputNumber); |
| 3297 | /*if (input) { |
| 3298 | input = input->getNearestNonIdentity( getApp()->getTimeLine()->currentFrame() ); |
| 3299 | }*/ |
| 3300 | } else { |
| 3301 | input = _imp->effect; |
| 3302 | } |
| 3303 | |
| 3304 | if (!input) { |
| 3305 | return ""; |
| 3306 | } |
| 3307 | |
| 3308 | |
| 3309 | double time = getApp()->getTimeLine()->currentFrame(); |
| 3310 | std::stringstream ss; |
| 3311 | { // input name |
| 3312 | QString inputName; |
| 3313 | if (inputNumber != -1) { |
| 3314 | inputName = QString::fromUtf8( getInputLabel(inputNumber).c_str() ); |
| 3315 | } else { |
| 3316 | inputName = tr("Output"); |
| 3317 | } |
| 3318 | ss << "<b><font color=\"orange\">" << tr("%1:").arg(inputName).toStdString() << "</font></b><br />"; |
| 3319 | } |
| 3320 | { // image format |
| 3321 | ss << "<b>" << tr("Image planes:").toStdString() << "</b> <font color=#c8c8c8>"; |
| 3322 | std::list<ImagePlaneDesc> availableLayers; |
| 3323 | input->getAvailableLayers(time, ViewIdx(0), inputNumber, &availableLayers); |
| 3324 | std::list<ImagePlaneDesc>::iterator next = availableLayers.begin(); |
| 3325 | if ( next != availableLayers.end() ) { |
| 3326 | ++next; |
| 3327 | } |
| 3328 | for (std::list<ImagePlaneDesc>::iterator it = availableLayers.begin(); it != availableLayers.end(); ++it) { |
| 3329 | |
| 3330 | ss << " " << it->getPlaneLabel() << '.' << it->getChannelsLabel(); |
| 3331 | if ( next != availableLayers.end() ) { |
| 3332 | ss << ", "; |
| 3333 | ++next; |
| 3334 | } |
| 3335 | } |
| 3336 | ss << "</font><br />"; |
| 3337 | } |
| 3338 | { |
| 3339 | ImageBitDepthEnum depth = _imp->effect->getBitDepth(inputNumber); |
| 3340 | QString depthStr = tr("unknown"); |
| 3341 | switch (depth) { |
| 3342 | case eImageBitDepthByte: |
| 3343 | depthStr = tr("8u"); |
| 3344 | break; |
| 3345 | case eImageBitDepthShort: |
nothing calls this directly
no test coverage detected