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

Method addLook

src/OpenColorIO/Config.cpp:4493–4520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4491}
4492
4493void Config::addLook(const ConstLookRcPtr & look)
4494{
4495 const std::string name = look->getName();
4496 if(name.empty())
4497 throw Exception("Cannot addLook with an empty name.");
4498
4499 const std::string namelower = StringUtils::Lower(name);
4500
4501 // If the look exists, replace it
4502 for(unsigned int i=0; i<getImpl()->m_looksList.size(); ++i)
4503 {
4504 if(StringUtils::Lower(getImpl()->m_looksList[i]->getName()) == namelower)
4505 {
4506 getImpl()->m_looksList[i] = look->createEditableCopy();
4507
4508 AutoMutex lock(getImpl()->m_cacheidMutex);
4509 getImpl()->resetCacheIDs();
4510
4511 return;
4512 }
4513 }
4514
4515 // Otherwise, add it
4516 getImpl()->m_looksList.push_back(look->createEditableCopy());
4517
4518 AutoMutex lock(getImpl()->m_cacheidMutex);
4519 getImpl()->resetCacheIDs();
4520}
4521
4522void Config::clearLooks()
4523{

Callers 15

test_interfaceMethod · 0.95
test_interfaceMethod · 0.95
_add_itemMethod · 0.45
_remove_itemMethod · 0.45
_new_itemMethod · 0.45
_set_valueMethod · 0.45
loadFunction · 0.45
dumpMetadataMethod · 0.45
handlePreferInputMethod · 0.45
handlePreferBaseMethod · 0.45
handleInputOnlyMethod · 0.45
handleRemoveMethod · 0.45

Calls 8

LowerFunction · 0.85
resetCacheIDsMethod · 0.80
getImplFunction · 0.50
getNameMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45
createEditableCopyMethod · 0.45
push_backMethod · 0.45

Tested by 6

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