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

Method checkEncoderCreated

Engine/WriteNode.cpp:554–576  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

552}
553
554bool
555WriteNodePrivate::checkEncoderCreated(double time,
556 ViewIdx view)
557{
558 boost::shared_ptr<KnobOutputFile> fileKnob = outputFileKnob.lock();
559
560 assert(fileKnob);
561 std::string pattern = fileKnob->generateFileNameAtTime( std::floor(time + 0.5), ViewSpec( view.value() ) ).toStdString();
562 if ( pattern.empty() ) {
563 _publicInterface->setPersistentMessage( eMessageTypeError, tr("Filename is empty.").toStdString() );
564
565 return false;
566 }
567 if ( !embeddedPlugin.lock() ) {
568 QString s = tr("Encoder was not created for %1. Check that the file exists and its format is supported.")
569 .arg( QString::fromUtf8( pattern.c_str() ) );
570 _publicInterface->setPersistentMessage( eMessageTypeError, s.toStdString() );
571
572 return false;
573 }
574
575 return true;
576}
577
578static std::string
579getFileNameFromSerialization(const std::list<boost::shared_ptr<KnobSerialization> >& serializations)

Callers

nothing calls this directly

Calls 8

floorFunction · 0.85
ViewSpecFunction · 0.85
toStdStringMethod · 0.80
emptyMethod · 0.80
lockMethod · 0.45
valueMethod · 0.45
setPersistentMessageMethod · 0.45

Tested by

no test coverage detected