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

Method checkEncoderCreated

Engine/WriteNode.cpp:559–581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected