Context

class PyOpenColorIO.Context
Context(*args, **kwargs)

Overloaded function.

  1. __init__(self: PyOpenColorIO.Context) -> None

  2. __init__(self: PyOpenColorIO.Context, workingDir: str = ‘’, searchPaths: List[str] = [], stringVars: Dict[str, str] = {}, environmentMode: PyOpenColorIO.EnvironmentMode = <EnvironmentMode.ENV_ENVIRONMENT_LOAD_PREDEFINED: 1>) -> None

addSearchPath(path: str) → None
clearSearchPaths() → None
clearStringVars() → None
getCacheID() → str
getEnvironmentMode()PyOpenColorIO.EnvironmentMode

cpp:function:

getSearchPath() → str
getSearchPaths()PyOpenColorIO.Context.SearchPathIterator
getStringVars()PyOpenColorIO.Context.StringVarIterator
getWorkingDir() → str
loadEnvironment() → None

Seed all string vars with the current environment.

resolveFileLocation(*args, **kwargs)

Overloaded function.

  1. resolveFileLocation(self: PyOpenColorIO.Context, filename: str) -> str

Build the resolved and expanded filepath using the search_path when needed, and check if the filepath exists. If it cannot be resolved or found, an exception will be thrown. The method argument is directly from the config file so it can be an absolute or relative file path or a file name.

Note

The filepath existence check could add a performance hit.

Note

The context variable resolution is performed using resolveStringVar().

  1. resolveFileLocation(self: PyOpenColorIO.Context, filename: str, usedContextVars: PyOpenColorIO.Context) -> str

Build the resolved and expanded filepath and return all the context variables used to resolve the filename (empty if no context variables were used).

resolveStringVar(*args, **kwargs)

Overloaded function.

  1. resolveStringVar(self: PyOpenColorIO.Context, string: str) -> str

cpp:function:: Resolve all the context variables from the string. It could be color space

  1. resolveStringVar(self: PyOpenColorIO.Context, string: str, usedContextVars: PyOpenColorIO.Context) -> str

cpp:function:: Resolve all the context variables from the string and return all the context

setEnvironmentMode(mode: PyOpenColorIO.EnvironmentMode) → None

cpp:function:

setSearchPath(path: str) → None
setWorkingDir(dirName: str) → None
class PyOpenColorIO.Context.StringVarNameIterator
self[arg0: int] → str
iter(self)PyOpenColorIO.Context.StringVarNameIterator
len(self) → int
next(self) → str
class PyOpenColorIO.Context.StringVarIterator
self[arg0: int] → tuple
iter(self)PyOpenColorIO.Context.StringVarIterator
len(self) → int
next(self) → tuple
class PyOpenColorIO.Context.SearchPathIterator
self[arg0: int] → str
iter(self)PyOpenColorIO.Context.SearchPathIterator
len(self) → int
next(self) → str