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

Function CollectContextVariables

src/OpenColorIO/Look.cpp:198–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196
197
198bool CollectContextVariables(const Config & config,
199 const Context & context,
200 TransformDirection direction,
201 const Look & look,
202 ContextRcPtr & usedContext)
203{
204 bool foundContextVars = false;
205
206 switch (direction)
207 {
208 case TRANSFORM_DIR_FORWARD:
209 {
210 ConstTransformRcPtr tr = look.getTransform();
211 if (tr)
212 {
213 if (CollectContextVariables(config, context, tr, usedContext))
214 {
215 foundContextVars = true;
216 }
217 }
218 else
219 {
220 tr = look.getInverseTransform();
221 if (tr && CollectContextVariables(config, context, tr, usedContext))
222 {
223 foundContextVars = true;
224 }
225 }
226 break;
227 }
228 case TRANSFORM_DIR_INVERSE:
229 {
230 ConstTransformRcPtr tr = look.getInverseTransform();
231 if (tr)
232 {
233 if (CollectContextVariables(config, context, tr, usedContext))
234 {
235 foundContextVars = true;
236 }
237 }
238 else
239 {
240 tr = look.getTransform();
241 if (tr && CollectContextVariables(config, context, tr, usedContext))
242 {
243 foundContextVars = true;
244 }
245 }
246 break;
247 }
248 }
249
250 const char * ps = look.getProcessSpace();
251 if (ps)
252 {
253 ConstColorSpaceRcPtr cs = config.getColorSpace(ps);
254 if (cs)
255 {

Callers 5

getProcessorMethod · 0.70
OCIO_ADD_TESTFunction · 0.50
OCIO_ADD_TESTFunction · 0.50
OCIO_ADD_TESTFunction · 0.50
OCIO_ADD_TESTFunction · 0.50

Calls 4

getTransformMethod · 0.45
getInverseTransformMethod · 0.45
getProcessSpaceMethod · 0.45
getColorSpaceMethod · 0.45

Tested by 4

OCIO_ADD_TESTFunction · 0.40
OCIO_ADD_TESTFunction · 0.40
OCIO_ADD_TESTFunction · 0.40
OCIO_ADD_TESTFunction · 0.40