| 3160 | } // setNameItemHtml |
| 3161 | |
| 3162 | void |
| 3163 | NodeGui::onOutputLayerChanged() |
| 3164 | { |
| 3165 | NodePtr internalNode = getNode(); |
| 3166 | if (!internalNode) { |
| 3167 | return; |
| 3168 | } |
| 3169 | |
| 3170 | QString extraLayerStr; |
| 3171 | KnobBoolPtr processAllKnob = internalNode->getProcessAllLayersKnob(); |
| 3172 | bool processAll = false; |
| 3173 | if (processAllKnob && processAllKnob->hasModifications()) { |
| 3174 | processAll = processAllKnob->getValue(); |
| 3175 | if (processAll) { |
| 3176 | //extraLayerStr.append( QString::fromUtf8("<br />") ); |
| 3177 | extraLayerStr += tr("(All)"); |
| 3178 | } |
| 3179 | } |
| 3180 | KnobChoicePtr layerKnob = internalNode->getChannelSelectorKnob(-1); |
| 3181 | ImagePlaneDesc outputLayer; |
| 3182 | { |
| 3183 | bool isAll; |
| 3184 | std::list<ImagePlaneDesc> availableLayers; |
| 3185 | internalNode->getEffectInstance()->getAvailableLayers(internalNode->getApp()->getTimeLine()->currentFrame(), ViewIdx(0), -1, &availableLayers); |
| 3186 | |
| 3187 | |
| 3188 | internalNode->getSelectedLayer(-1, availableLayers, 0, &isAll, &outputLayer); |
| 3189 | } |
| 3190 | if (!processAll && outputLayer.getNumComponents() > 0) { |
| 3191 | if (!outputLayer.isColorPlane()) { |
| 3192 | if (!extraLayerStr.isEmpty()) { |
| 3193 | extraLayerStr.append( QString::fromUtf8("<br />") ); |
| 3194 | } |
| 3195 | extraLayerStr.push_back( QLatin1Char('(') ); |
| 3196 | extraLayerStr.append( QString::fromUtf8( outputLayer.getPlaneLabel().c_str() ) ); |
| 3197 | extraLayerStr.push_back( QLatin1Char(')') ); |
| 3198 | } |
| 3199 | } |
| 3200 | if (extraLayerStr == _channelsExtraLabel) { |
| 3201 | return; |
| 3202 | } |
| 3203 | _channelsExtraLabel = extraLayerStr; |
| 3204 | setNameItemHtml(QString::fromUtf8( internalNode->getLabel().c_str() ), _nodeLabel); |
| 3205 | } |
| 3206 | |
| 3207 | void |
| 3208 | NodeGui::refreshNodeText(const QString & label) |
nothing calls this directly
no test coverage detected