( self, operands )
| 91 | ) |
| 92 | |
| 93 | def doOperation( self, operands ) : |
| 94 | |
| 95 | t = operands["type"].value |
| 96 | if t=="op" : |
| 97 | loader = IECore.ClassLoader.defaultOpLoader() |
| 98 | else : |
| 99 | if operands["searchPath"].value and operands["searchPathEnvVar"].value : |
| 100 | raise RuntimeError( "Cannot specify both searchPath and searchPathEnvVar." ) |
| 101 | if not operands["searchPath"].value and not operands["searchPathEnvVar"].value : |
| 102 | raise RuntimeError( "Must specify either searchPath or searchPathEnvVar." ) |
| 103 | |
| 104 | if operands["searchPath"].value : |
| 105 | sp = IECore.SearchPath( operands["searchPath"].value ) |
| 106 | else : |
| 107 | sp = IECore.SearchPath( os.path.expandvars( os.environ[operands["searchPathEnvVar"].value] ) ) |
| 108 | |
| 109 | loader = IECore.ClassLoader( sp ) |
| 110 | |
| 111 | classes = loader.classNames( operands["match"].value ) |
| 112 | |
| 113 | if operands["resultType"].value == "string" : |
| 114 | return IECore.StringData( "\n".join( classes ) ) |
| 115 | else : |
| 116 | return IECore.StringVectorData( classes ) |
| 117 | |
| 118 | IECore.registerRunTimeTyped( ClassLsOp ) |
nothing calls this directly
no test coverage detected