| 8111 | } |
| 8112 | |
| 8113 | void |
| 8114 | Node::onInputChanged(int inputNb, |
| 8115 | bool isInputA) |
| 8116 | { |
| 8117 | if ( getApp()->getProject()->isProjectClosing() ) { |
| 8118 | return; |
| 8119 | } |
| 8120 | assert( QThread::currentThread() == qApp->thread() ); |
| 8121 | |
| 8122 | bool mustCallEndInputEdition = _imp->inputModifiedRecursion == 0; |
| 8123 | if (mustCallEndInputEdition) { |
| 8124 | beginInputEdition(); |
| 8125 | } |
| 8126 | |
| 8127 | refreshMaskEnabledNess(inputNb); |
| 8128 | refreshLayersChoiceSecretness(inputNb); |
| 8129 | |
| 8130 | InspectorNode* isInspector = dynamic_cast<InspectorNode*>(this); |
| 8131 | if (isInspector) { |
| 8132 | isInspector->refreshActiveInputs(inputNb, isInputA); |
| 8133 | } |
| 8134 | |
| 8135 | bool shouldDoInputChanged = ( !getApp()->getProject()->isProjectClosing() && !getApp()->isCreatingNodeTree() ) || |
| 8136 | _imp->effect->isRotoPaintNode(); |
| 8137 | |
| 8138 | if (shouldDoInputChanged) { |
| 8139 | ///When loading a group (or project) just wait until everything is setup to actually compute input |
| 8140 | ///related data such as clip preferences |
| 8141 | ///Exception for the Rotopaint node which needs to setup its own graph internally |
| 8142 | |
| 8143 | /** |
| 8144 | * The plug-in might call getImage, set a valid thread storage on the tree. |
| 8145 | **/ |
| 8146 | double time = getApp()->getTimeLine()->currentFrame(); |
| 8147 | AbortableRenderInfoPtr abortInfo = AbortableRenderInfo::create(false, 0); |
| 8148 | const bool isRenderUserInteraction = true; |
| 8149 | const bool isSequentialRender = false; |
| 8150 | AbortableThread* isAbortable = dynamic_cast<AbortableThread*>( QThread::currentThread() ); |
| 8151 | if (isAbortable) { |
| 8152 | isAbortable->setAbortInfo( isRenderUserInteraction, abortInfo, getEffectInstance() ); |
| 8153 | } |
| 8154 | ParallelRenderArgsSetter frameRenderArgs( time, |
| 8155 | ViewIdx(0), |
| 8156 | isRenderUserInteraction, |
| 8157 | isSequentialRender, |
| 8158 | abortInfo, |
| 8159 | shared_from_this(), |
| 8160 | 0, //texture index |
| 8161 | getApp()->getTimeLine().get(), |
| 8162 | NodePtr(), |
| 8163 | false, |
| 8164 | false, |
| 8165 | boost::shared_ptr<RenderStats>() ); |
| 8166 | |
| 8167 | |
| 8168 | ///Don't do clip preferences while loading a project, they will be refreshed globally once the project is loaded. |
| 8169 | _imp->effect->onInputChanged(inputNb); |
| 8170 | _imp->inputsModified.insert(inputNb); |
no test coverage detected