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

Method checkDecoderCreated

Engine/ReadNode.cpp:602–624  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

600}
601
602bool
603ReadNodePrivate::checkDecoderCreated(double time,
604 ViewIdx view)
605{
606 KnobFilePtr fileKnob = inputFileKnob.lock();
607
608 assert(fileKnob);
609 std::string pattern = fileKnob->getFileName(std::floor(time + 0.5), view);
610 if ( pattern.empty() ) {
611 _publicInterface->setPersistentMessage( eMessageTypeError, tr("Filename empty").toStdString() );
612
613 return false;
614 }
615
616 if (!_publicInterface->getEmbeddedReader()) {
617 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() ) );
618 _publicInterface->setPersistentMessage( eMessageTypeError, s.toStdString() );
619
620 return false;
621 }
622
623 return true;
624}
625
626static std::string
627getFileNameFromSerialization(const std::list<KnobSerializationPtr>& serializations)

Callers 2

getRegionOfDefinitionMethod · 0.80
renderMethod · 0.80

Calls 7

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

Tested by

no test coverage detected