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

Method getProjectDefaultFormat

Engine/Project.cpp:1187–1201  ·  view source on GitHub ↗

don't return a reference to a mutex-protected object!

Source from the content-addressed store, hash-verified

1185
1186// don't return a reference to a mutex-protected object!
1187void
1188Project::getProjectDefaultFormat(Format *f) const
1189{
1190 assert(f);
1191 QMutexLocker l(&_imp->formatMutex);
1192 ChoiceOption formatSpec = _imp->formatKnob->getActiveEntry();
1193 // use the label here, because the id does not contain the format specifications.
1194 // see ProjectPrivate::generateStringFromFormat()
1195#pragma message WARN("TODO: can't we store the format somewhere instead of parsing the label???")
1196 if ( !formatSpec.label.empty() ) {
1197 ProjectPrivate::generateFormatFromString(QString::fromUtf8( formatSpec.label.c_str() ), f);
1198 } else {
1199 _imp->findFormat(_imp->formatKnob->getValue(), f);
1200 }
1201}
1202
1203bool
1204Project::getProjectFormatAtIndex(int index,

Callers 15

getNearestNonIdentityMethod · 0.80
getDefaultMetadataMethod · 0.80
getFormatMethod · 0.80
getInputRoDFunction · 0.80
trackMarkersMethod · 0.80
getInputRoDAtTimeMethod · 0.80
getProjectSizeMethod · 0.80
getProjectOffsetMethod · 0.80
getProjectExtentMethod · 0.80

Calls 5

generateFormatFromStringFunction · 0.85
getActiveEntryMethod · 0.80
emptyMethod · 0.80
findFormatMethod · 0.80
getValueMethod · 0.45

Tested by

no test coverage detected