MCPcopy Create free account
hub / github.com/ImageEngine/cortex / __call__

Method __call__

python/IECore/BasicPreset.py:158–172  ·  view source on GitHub ↗
( self, parameterised, rootParameter, parameterList=[], parameterListExcludes=False )

Source from the content-addressed store, hash-verified

156 # must be in this list. Otherwise the preset will not consider the parent so will never
157 # reach the child.
158 def __call__( self, parameterised, rootParameter, parameterList=[], parameterListExcludes=False ) :
159
160 self._ensureData()
161
162 if not self.applicableTo( parameterised, rootParameter ) :
163 raise RuntimeError( "IECore.BasicPreset: Sorry, this preset is not applicable to that parameter." )
164
165 if parameterList and not parameterListExcludes :
166 # Not much point getting out of bed if the root isn't in there...
167 if rootParameter not in parameterList:
168 # Copy the list so we don't modify the one we were given.
169 parameterList = parameterList[:]
170 parameterList.append( rootParameter )
171
172 self._applyHierarchy( parameterised, rootParameter, self._data, parameterList, parameterListExcludes )
173
174 ## This method will save the specified parameters to disk in such a was
175 ## as can be loaded by the IECore.ClassLoader

Callers

nothing calls this directly

Calls 4

_ensureDataMethod · 0.95
applicableToMethod · 0.95
_applyHierarchyMethod · 0.95
appendMethod · 0.80

Tested by

no test coverage detected