MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / setEffect

Method setEffect

Engine/Node.cpp:2632–2657  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2630}
2631
2632void
2633Node::setEffect(const EffectInstancePtr& effect)
2634{
2635 ////Only called by the main-thread
2636 assert( QThread::currentThread() == qApp->thread() );
2637 _imp->effect = effect;
2638 _imp->effect->initializeData();
2639
2640
2641#ifdef NATRON_ENABLE_IO_META_NODES
2642 NodePtr thisShared = shared_from_this();
2643 NodePtr ioContainer = _imp->ioContainer.lock();
2644 if (ioContainer) {
2645 ReadNode* isReader = dynamic_cast<ReadNode*>( ioContainer->getEffectInstance().get() );
2646 if (isReader) {
2647 isReader->setEmbeddedReader(thisShared);
2648 } else {
2649 WriteNode* isWriter = dynamic_cast<WriteNode*>( ioContainer->getEffectInstance().get() );
2650 assert(isWriter);
2651 if (isWriter) {
2652 isWriter->setEmbeddedWriter(thisShared);
2653 }
2654 }
2655 }
2656#endif
2657}
2658
2659EffectInstancePtr
2660Node::getEffectInstance() const

Callers 1

createOfxEffectMethod · 0.80

Calls 6

initializeDataMethod · 0.80
getEffectInstanceMethod · 0.80
setEmbeddedReaderMethod · 0.80
setEmbeddedWriterMethod · 0.80
lockMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected