|
|
|
|
|
|
evt.menu.AppendAction("Convert To Sub-graph", ConvertToSubgraph, ConvertToSubgraphStatus); |
|
|
|
evt.menu.AppendAction("Convert To Inline Node", ConvertToInlineNode, ConvertToInlineNodeStatus); |
|
|
|
evt.menu.AppendAction("Convert To Property", ConvertToProperty, ConvertToPropertyStatus); |
|
|
|
evt.menu.AppendSeparator(); |
|
|
|
evt.menu.AppendAction("Open Documentation", SeeDocumentation, SeeDocumentationStatus); |
|
|
|
if (selection.OfType<MaterialNodeView>().Count() == 1) |
|
|
|
{ |
|
|
|
evt.menu.AppendSeparator(); |
|
|
|
evt.menu.AppendAction("Open Documentation", SeeDocumentation, SeeDocumentationStatus); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (evt.target is BlackboardField) |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
ContextualMenu.MenuAction.StatusFlags SeeDocumentationStatus(EventBase eventBase) |
|
|
|
{ |
|
|
|
if (selection.OfType<MaterialNodeView>().Count() > 1) |
|
|
|
return ContextualMenu.MenuAction.StatusFlags.Hidden; |
|
|
|
if (selection.OfType<MaterialNodeView>().First().node.documentationURL == null) |
|
|
|
return ContextualMenu.MenuAction.StatusFlags.Disabled; |
|
|
|
return ContextualMenu.MenuAction.StatusFlags.Normal; |
|
|
|