MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / setFormat

Method setFormat

src/OpenColorIO/Baker.cpp:118–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118void Baker::setFormat(const char * formatName)
119{
120 FileFormat * fmt = FormatRegistry::GetInstance().getFileFormatByName(formatName);
121 if (fmt)
122 {
123 FormatInfoVec formatInfoVec;
124 fmt->getFormatInfo(formatInfoVec);
125 for (unsigned int i = 0; i < formatInfoVec.size(); ++i)
126 {
127 if (formatInfoVec[i].capabilities & FORMAT_CAPABILITY_BAKE)
128 {
129 getImpl()->m_formatName = formatName ? formatName : "";
130 return;
131 }
132 }
133 }
134
135 std::ostringstream os;
136 os << "File format " << formatName;
137 os << " does not support baking.";
138 throw Exception(os.str().c_str());
139}
140
141const char * Baker::getFormat() const
142{

Callers 13

test_copyMethod · 0.95
test_interfaceMethod · 0.95
test_interfaceMethod · 0.95
mainFunction · 0.45
OCIO_ADD_TESTFunction · 0.45
OCIO_ADD_TESTFunction · 0.45
OCIO_ADD_TESTFunction · 0.45
OCIO_ADD_TESTFunction · 0.45
OCIO_ADD_TESTFunction · 0.45
OCIO_ADD_TESTFunction · 0.45
OCIO_ADD_TESTFunction · 0.45
OCIO_ADD_TESTFunction · 0.45

Calls 4

getFileFormatByNameMethod · 0.80
getImplFunction · 0.50
getFormatInfoMethod · 0.45
sizeMethod · 0.45

Tested by 12

test_copyMethod · 0.76
test_interfaceMethod · 0.76
test_interfaceMethod · 0.76
OCIO_ADD_TESTFunction · 0.36
OCIO_ADD_TESTFunction · 0.36
OCIO_ADD_TESTFunction · 0.36
OCIO_ADD_TESTFunction · 0.36
OCIO_ADD_TESTFunction · 0.36
OCIO_ADD_TESTFunction · 0.36
OCIO_ADD_TESTFunction · 0.36
OCIO_ADD_TESTFunction · 0.36
OCIO_ADD_TESTFunction · 0.36