#NEWLINE# def appendDefinitions( menuDefinition , prefix = '' ) : #NEWLINE# #INDENT# menuDefinition . append ( ( prefix + '/Undo' ) , { #NEWLINE# #INDENT# 'command' : undo , #NEWLINE# 'shortCut' : 'Ctrl+Z' , #NEWLINE# 'active' : __undoAvailable , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Redo' ) , { #NEWLINE# #INDENT# 'command' : redo , #NEWLINE# 'shortCut' : 'Shift+Ctrl+Z' , #NEWLINE# 'active' : __redoAvailable , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/UndoDivider' ) , { #NEWLINE# #INDENT# 'divider' : True , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Cut' ) , { #NEWLINE# #INDENT# 'command' : cut , #NEWLINE# 'shortCut' : 'Ctrl+X' , #NEWLINE# 'active' : selectionAvailable , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Copy' ) , { #NEWLINE# #INDENT# 'command' : copy , #NEWLINE# 'shortCut' : 'Ctrl+C' , #NEWLINE# 'active' : selectionAvailable , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Paste' ) , { #NEWLINE# #INDENT# 'command' : paste , #NEWLINE# 'shortCut' : 'Ctrl+V' , #NEWLINE# 'active' : __pasteAvailable , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Delete' ) , { #NEWLINE# #INDENT# 'command' : delete , #NEWLINE# 'shortCut' : 'Backspace, Delete' , #NEWLINE# 'active' : selectionAvailable , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/CutCopyPasteDeleteDivider' ) , { #NEWLINE# #INDENT# 'divider' : True , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Find...' ) , { #NEWLINE# #INDENT# 'command' : find , #NEWLINE# 'shortCut' : 'Ctrl+F' , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/FindDivider' ) , { #NEWLINE# #INDENT# 'divider' : True , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Arrange' ) , { #NEWLINE# #INDENT# 'command' : arrange , #NEWLINE# 'shortCut' : 'Ctrl+L' , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/ArrangeDivider' ) , { #NEWLINE# #INDENT# 'divider' : True , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Select All' ) , { #NEWLINE# #INDENT# 'command' : selectAll , #NEWLINE# 'shortCut' : 'Ctrl+A' , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Select None' ) , { #NEWLINE# #INDENT# 'command' : selectNone , #NEWLINE# 'shortCut' : 'Shift+Ctrl+A' , #NEWLINE# 'active' : selectionAvailable , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Select Connected/Inputs' ) , { #NEWLINE# #INDENT# 'command' : selectInputs , #NEWLINE# 'active' : selectionAvailable , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Select Connected/Add Inputs' ) , { #NEWLINE# #INDENT# 'command' : selectAddInputs , #NEWLINE# 'active' : selectionAvailable , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Select Connected/InputsDivider' ) , { #NEWLINE# #INDENT# 'divider' : True , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Select Connected/Upstream' ) , { #NEWLINE# #INDENT# 'command' : selectUpstream , #NEWLINE# 'active' : selectionAvailable , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Select Connected/Add Upstream' ) , { #NEWLINE# #INDENT# 'command' : selectAddUpstream , #NEWLINE# 'active' : selectionAvailable , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Select Connected/UpstreamDivider' ) , { #NEWLINE# #INDENT# 'divider' : True , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Select Connected/Outputs' ) , { #NEWLINE# #INDENT# 'command' : selectOutputs , #NEWLINE# 'active' : selectionAvailable , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Select Connected/Add Outputs' ) , { #NEWLINE# #INDENT# 'command' : selectAddOutputs , #NEWLINE# 'active' : selectionAvailable , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Select Connected/OutputsDivider' ) , { #NEWLINE# #INDENT# 'divider' : True , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Select Connected/Downstream' ) , { #NEWLINE# #INDENT# 'command' : selectDownstream , #NEWLINE# 'active' : selectionAvailable , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Select Connected/Add Downstream' ) , { #NEWLINE# #INDENT# 'command' : selectAddDownstream , #NEWLINE# 'active' : selectionAvailable , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Select Connected/DownstreamDivider' ) , { #NEWLINE# #INDENT# 'divider' : True , #NEWLINE# #UNINDENT# } ) #NEWLINE# menuDefinition . append ( ( prefix + '/Select Connected/Add All' ) , { #NEWLINE# #INDENT# 'command' : selectConnected , #NEWLINE# 'active' : selectionAvailable , #NEWLINE# #UNINDENT# } )