| 11654 | } |
| 11655 | |
| 11656 | void |
| 11657 | InspectorNode::setActiveInputAndRefresh(int inputNb, |
| 11658 | bool isASide) |
| 11659 | { |
| 11660 | assert( QThread::currentThread() == qApp->thread() ); |
| 11661 | |
| 11662 | int maxInputs = getMaxInputCount(); |
| 11663 | if ( ( inputNb > (maxInputs - 1) ) || (inputNb < 0) || ( !getInput(inputNb) ) ) { |
| 11664 | return; |
| 11665 | } |
| 11666 | |
| 11667 | bool creatingNodeTree = getApp()->isCreatingNodeTree(); |
| 11668 | if (!creatingNodeTree) { |
| 11669 | ///Recompute the hash |
| 11670 | computeHash(); |
| 11671 | } |
| 11672 | |
| 11673 | Q_EMIT inputChanged(inputNb); |
| 11674 | onInputChanged(inputNb, isASide); |
| 11675 | |
| 11676 | runInputChangedCallback(inputNb); |
| 11677 | |
| 11678 | |
| 11679 | if ( isOutputNode() ) { |
| 11680 | OutputEffectInstance* oei = dynamic_cast<OutputEffectInstance*>( getEffectInstance().get() ); |
| 11681 | assert(oei); |
| 11682 | if (oei) { |
| 11683 | oei->renderCurrentFrame(true); |
| 11684 | } |
| 11685 | } |
| 11686 | } |
| 11687 | |
| 11688 | void |
| 11689 | InspectorNode::refreshActiveInputs(int inputNbChanged, |
no test coverage detected