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

Method __init__

python/IECore/LsHeaderOp.py:39–79  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

37class 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

Callers

nothing calls this directly

Calls 8

addParametersMethod · 0.80
FileNameParameterMethod · 0.80
joinMethod · 0.80
CompoundObjectMethod · 0.80
ParameterMethod · 0.45
parametersMethod · 0.45
supportedExtensionsMethod · 0.45
userDataMethod · 0.45

Tested by

no test coverage detected