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

Method checkDecoderCreated

Engine/ReadNode.cpp:592–614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

590}
591
592bool
593ReadNodePrivate::checkDecoderCreated(double time,
594 ViewIdx view)
595{
596 boost::shared_ptr<KnobFile> fileKnob = inputFileKnob.lock();
597
598 assert(fileKnob);
599 std::string pattern = fileKnob->getFileName(std::floor(time + 0.5), view);
600 if ( pattern.empty() ) {
601 _publicInterface->setPersistentMessage( eMessageTypeError, tr("Filename empty").toStdString() );
602
603 return false;
604 }
605
606 if (!_publicInterface->getEmbeddedReader()) {
607 QString s = tr("Decoder was not created for %1, check that the file exists and its format is supported.").arg( QString::fromUtf8( pattern.c_str() ) );
608 _publicInterface->setPersistentMessage( eMessageTypeError, s.toStdString() );
609
610 return false;
611 }
612
613 return true;
614}
615
616static std::string
617getFileNameFromSerialization(const std::list<boost::shared_ptr<KnobSerialization> >& serializations)

Callers 2

getRegionOfDefinitionMethod · 0.80
renderMethod · 0.80

Calls 7

floorFunction · 0.85
getFileNameMethod · 0.80
emptyMethod · 0.80
toStdStringMethod · 0.80
getEmbeddedReaderMethod · 0.80
lockMethod · 0.45
setPersistentMessageMethod · 0.45

Tested by

no test coverage detected