|
|
|
|
|
|
Insert(0, new GridBackground()); |
|
|
|
|
|
|
|
AddStyleSheetPath("Styles/MaterialGraph"); |
|
|
|
|
|
|
|
serializeCopyPasteData = SerializeCopyPasteDataImplementation; |
|
|
|
canPasteSerializedData = CanPasteSerializedDataImplementation; |
|
|
|
unserializeAndPaste = UnserializeAndPasteImplementation; |
|
|
|
deleteSelection = DeleteSelectionImplementation; |
|
|
|
} |
|
|
|
|
|
|
|
public bool CanAddToNodeMenu(Type type) |
|
|
|
|
|
|
PropagateSelection(); |
|
|
|
} |
|
|
|
|
|
|
|
protected override string SerializeCopyPasteData(IEnumerable<GraphElement> elements) |
|
|
|
string SerializeCopyPasteDataImplementation(IEnumerable<GraphElement> elements) |
|
|
|
protected override bool CanPasteSerializedData(string serializedData) |
|
|
|
bool CanPasteSerializedDataImplementation(string serializedData) |
|
|
|
protected override void UnserializeAndPasteOperation(string operationName, string serializedData) |
|
|
|
void UnserializeAndPasteImplementation(string operationName, string serializedData) |
|
|
|
{ |
|
|
|
var mgp = GetPresenter<MaterialGraphPresenter>(); |
|
|
|
mgp.graph.owner.RegisterCompleteObjectUndo(operationName); |
|
|
|
|
|
|
|
|
|
|
protected override void DeleteSelectionOperation(string operationName) |
|
|
|
void DeleteSelectionImplementation(string operationName, GraphView.AskUser askUser) |
|
|
|
{ |
|
|
|
var mgp = GetPresenter<MaterialGraphPresenter>(); |
|
|
|
mgp.graph.owner.RegisterCompleteObjectUndo(operationName); |
|
|
|