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

Method prepend

python/IECore/MenuDefinition.py:57–64  ·  view source on GitHub ↗
( self, path, item )

Source from the content-addressed store, hash-verified

55 # appear before all other items in its respective
56 # submenu.
57 def prepend( self, path, item ) :
58
59 if isinstance( item, dict ) :
60 item = MenuItemDefinition( item )
61
62 self.remove( path, False )
63
64 self.__items.insert( 0, ( path, item ) )
65
66 ## Appends a menu item at the end. The item will
67 # appear after all other items in its respective

Callers 1

StreamFileMethod · 0.80

Calls 3

removeMethod · 0.95
MenuItemDefinitionClass · 0.90
insertMethod · 0.80

Tested by

no test coverage detected