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

Class Preset

python/IECore/Preset.py:45–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43## Presets themselves are Parametersied objects, to allow them to have
44## their own parameters to control how they might be applied.
45class Preset( IECore.Parameterised ) :
46
47 def __init__( self, description="" ) :
48
49 IECore.Parameterised.__init__( self, description )
50
51 ## \return Presets may return a dictionary of arbitrary metadata
52 ## to describe their contents/function. The default implementation
53 ## simply sets "title" to the class name.
54 def metadata( self ) :
55
56 return { "title" : self.__class__ }
57
58 ## \return True if the Preset can be applied to the given rootParameter
59 ## on the given parameterised object, otherwise False
60 def applicableTo( self, parameterised, rootParameter ) :
61
62 raise NotImplementedError
63
64 ## Applies the preset to the specified parameterised and
65 ## root parameter.
66 def __call__( self, parameterised, rootParameter ) :
67
68 raise NotImplementedError
69
70IECore.registerRunTimeTyped( Preset )
71

Callers 7

MeshNormalsOpMethod · 0.85
ParticleReaderMethod · 0.85
WarpOpMethod · 0.85
MedianCutSamplerMethod · 0.85
LensDistortOpMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected