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

Method addActiveView

src/OpenColorIO/Config.cpp:4258–4279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4256}
4257
4258void Config::addActiveView(const char * view)
4259{
4260 if( !view || !view[0] )
4261 {
4262 throw Exception("Active view could not be added to config, view name was empty.");
4263 }
4264
4265 auto it = std::find(getImpl()->m_activeViews.begin(),
4266 getImpl()->m_activeViews.end(), view);
4267
4268 if( it != getImpl()->m_activeViews.end() )
4269 {
4270 // View is already present.
4271 return;
4272 }
4273
4274 getImpl()->m_activeViews.push_back(view);
4275
4276 getImpl()->m_displayCache.clear();
4277 AutoMutex lock(getImpl()->m_cacheidMutex);
4278 getImpl()->resetCacheIDs();
4279}
4280
4281void Config::removeActiveView(const char * view)
4282{

Callers 2

OCIO_ADD_TESTFunction · 0.80

Calls 6

resetCacheIDsMethod · 0.80
getImplFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45
clearMethod · 0.45

Tested by 2

OCIO_ADD_TESTFunction · 0.64