| 43 | ## Presets themselves are Parametersied objects, to allow them to have |
| 44 | ## their own parameters to control how they might be applied. |
| 45 | class 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 | |
| 70 | IECore.registerRunTimeTyped( Preset ) |
| 71 |
no outgoing calls
no test coverage detected