MCPcopy Create free account
hub / github.com/MrKepzie/Natron / createDefaultWriteNode

Method createDefaultWriteNode

Engine/WriteNode.cpp:525–552  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

523} // WriteNodePrivate::destroyWriteNode
524
525void
526WriteNodePrivate::createDefaultWriteNode()
527{
528 boost::shared_ptr<NodeGroup> isNodeGroup = boost::dynamic_pointer_cast<NodeGroup>( _publicInterface->shared_from_this() );
529 CreateNodeArgs args( WRITE_NODE_DEFAULT_WRITER, isNodeGroup );
530 args.setProperty(kCreateNodeArgsPropNoNodeGUI, true);
531 args.setProperty(kCreateNodeArgsPropOutOfProject, true);
532 args.setProperty(kCreateNodeArgsPropSilent, true);
533 args.setProperty(kCreateNodeArgsPropMetaNodeContainer, _publicInterface->getNode());
534 args.setProperty<std::string>(kCreateNodeArgsPropNodeInitialName, "defaultWriteNodeWriter");
535 args.setProperty<bool>(kCreateNodeArgsPropAllowNonUserCreatablePlugins, true);
536 //args.paramValues.push_back(createDefaultValueForParam<std::string>(kOfxImageEffectFileParamName, filePattern));
537 embeddedPlugin = _publicInterface->getApp()->createNode(args);
538
539 if ( !embeddedPlugin.lock() ) {
540 QString error = tr("The IO.ofx.bundle OpenFX plug-in is required to use this node, make sure it is installed.");
541 throw std::runtime_error( error.toStdString() );
542 }
543
544
545 //We need to explcitly refresh the Python knobs since we attached the embedded node knobs into this node.
546 _publicInterface->getNode()->declarePythonFields();
547
548 //Destroy it to keep the default parameters
549 destroyWriteNode();
550 placeWriteNodeKnobsInPage();
551 separatorKnob.lock()->setSecret(true);
552}
553
554bool
555WriteNodePrivate::checkEncoderCreated(double time,

Callers

nothing calls this directly

Calls 8

setPropertyMethod · 0.80
toStdStringMethod · 0.80
getNodeMethod · 0.45
createNodeMethod · 0.45
getAppMethod · 0.45
lockMethod · 0.45
declarePythonFieldsMethod · 0.45
setSecretMethod · 0.45

Tested by

no test coverage detected