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

Method _writePy

python/IECore/BasicPreset.py:247–265  ·  view source on GitHub ↗
( fileName, cob, className  )

Source from the content-addressed store, hash-verified

245
246 @staticmethod
247 def _writePy( fileName, cob, className ) :
248
249 with open( fileName, "w" ) as f :
250 f.write(
251
252"""import IECore
253import os.path
254
255class %s( IECore.BasicPreset ):
256
257 def __init__( self ):
258 dir = os.path.dirname( __file__ )
259 IECore.BasicPreset.__init__( self, dir+"/%s" )
260
261IECore.registerRunTimeTyped( %s )
262
263""" % ( className, cob, className )
264
265 )
266
267 @staticmethod
268 def _grabHierarchy( data, parameter, parameterList=() ) :

Callers 1

saveMethod · 0.80

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected