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

Function getDataSpaceName

src/OpenColorIO/ConfigUtils.cpp:231–248  ·  view source on GitHub ↗

Find the first scene-referred color space with isdata: true.

Source from the content-addressed store, hash-verified

229// Find the first scene-referred color space with isdata: true.
230//
231const char * getDataSpaceName(const ConstConfigRcPtr & cfg)
232{
233 int nbCs = cfg->getNumColorSpaces(SEARCH_REFERENCE_SPACE_SCENE, COLORSPACE_ALL);
234
235 for (int i = 0; i < nbCs; i++)
236 {
237 const char * csname = cfg->getColorSpaceNameByIndex(SEARCH_REFERENCE_SPACE_SCENE,
238 COLORSPACE_ALL,
239 i);
240 ConstColorSpaceRcPtr cs = cfg->getColorSpace(csname);
241
242 if (cs->isData())
243 {
244 return csname;
245 }
246 }
247 return "";
248}
249
250// Return false if the supplied Processor modifies any of the supplied float values
251// by more than the supplied absolute tolerance amount.

Callers 1

Calls 4

getNumColorSpacesMethod · 0.45
getColorSpaceMethod · 0.45
isDataMethod · 0.45

Tested by

no test coverage detected