( self )
| 37 | class LsHeaderOp( IECore.Op ) : |
| 38 | |
| 39 | def __init__( self ) : |
| 40 | |
| 41 | IECore.Op.__init__( self, "Lists the contents of Cortex file headers.", |
| 42 | IECore.Parameter( |
| 43 | name = "result", |
| 44 | description = "A list of meta-data contained in the file header.", |
| 45 | defaultValue = IECore.StringVectorData() |
| 46 | ) |
| 47 | ) |
| 48 | |
| 49 | self.parameters().addParameters( |
| 50 | |
| 51 | [ |
| 52 | IECore.FileNameParameter( |
| 53 | name = "file", |
| 54 | description = "The file to list the header from.", |
| 55 | defaultValue = "", |
| 56 | check = IECore.FileNameParameter.CheckType.MustExist, |
| 57 | extensions = " ".join( IECore.Reader.supportedExtensions() ), |
| 58 | allowEmptyString = False, |
| 59 | ), |
| 60 | |
| 61 | IECore.StringParameter( |
| 62 | name = "resultType", |
| 63 | description = "The format of the result", |
| 64 | defaultValue = "string", |
| 65 | presets = ( |
| 66 | ( "string", "string" ), |
| 67 | ( "stringVector", "stringVector" ), |
| 68 | ), |
| 69 | presetsOnly = True, |
| 70 | ) |
| 71 | ] |
| 72 | ) |
| 73 | |
| 74 | self.userData()["UI"] = IECore.CompoundObject( |
| 75 | { |
| 76 | "showResult": IECore.BoolData( True ), |
| 77 | "closeAfterExecution": IECore.BoolData( True ), |
| 78 | } |
| 79 | ) |
| 80 | |
| 81 | def doOperation( self, operands ) : |
| 82 |
nothing calls this directly
no test coverage detected