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

Class MenuItemDefinition

python/IECore/MenuItemDefinition.py:67–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65# can't both be set at the same time.
66# \ingroup python
67class MenuItemDefinition( object ) :
68
69 def __init__( self, dictionary = None, **kwArgs ) :
70
71 self.command = None
72 self.secondaryCommand = None
73 self.divider = False
74 self.active = True
75 self.description = ""
76 self.subMenu = None
77 self.checkBox = None
78 self.blindData = {}
79
80 if dictionary :
81 for k, v in dictionary.items() :
82 setattr( self, k, v )
83
84 for k, v in kwArgs.items() :
85 setattr( self, k, v )
86
87 def __repr__( self ) :
88 d = { k:v for k,v in self.__dict__.items() if not k.startswith('_') }
89 return "MenuItemDefinition( " + repr( d ) + " )"

Callers 4

prependMethod · 0.90
appendMethod · 0.90
insertBeforeMethod · 0.90
insertAfterMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected