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

Method getProjectDefaultFormat

Engine/Project.cpp:1087–1101  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1085
1086// don't return a reference to a mutex-protected object!
1087void
1088Project::getProjectDefaultFormat(Format *f) const
1089{
1090 assert(f);
1091 QMutexLocker l(&_imp->formatMutex);
1092 ChoiceOption formatSpec = _imp->formatKnob->getActiveEntry();
1093 // use the label here, because the id does not contain the format specifications.
1094 // see ProjectPrivate::generateStringFromFormat()
1095#pragma message WARN("TODO: can't we store the format somewhere instead of parsing the label???")
1096 if ( !formatSpec.label.empty() ) {
1097 ProjectPrivate::generateFormatFromString(QString::fromUtf8( formatSpec.label.c_str() ), f);
1098 } else {
1099 _imp->findFormat(_imp->formatKnob->getValue(), f);
1100 }
1101}
1102
1103bool
1104Project::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