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

Method remove

python/IECore/MenuDefinition.py:102–114  ·  view source on GitHub ↗
( self, path, raiseIfMissing=True )

Source from the content-addressed store, hash-verified

100 ## Removes the named menu item. Raises a KeyError if
101 # no such item exists and raiseIfMissing is True.
102 def remove( self, path, raiseIfMissing=True ) :
103
104 index = None
105 for i in range( 0, len( self.__items ) ) :
106 if self.__items[i][0]==path :
107 index = i
108 break
109
110 if not index is None :
111 del self.__items[index]
112 else :
113 if raiseIfMissing :
114 raise KeyError( path )
115
116 ## Removes all items whose paths match the given
117 # regular expression.

Callers 9

prependMethod · 0.95
appendMethod · 0.95
insertBeforeMethod · 0.95
insertAfterMethod · 0.95
updateMethod · 0.95
testMethod · 0.95
rmFunction · 0.45
getDataDerivedTypesFunction · 0.45
__findAllClassesMethod · 0.45

Calls 1

lenFunction · 0.50

Tested by

no test coverage detected