static State ResetNodeColor(State previousState, ResetNodeColorAction action) { foreach (INodeModel nodeModel in action.NodeModels) { ((NodeModel)nodeModel).HasUserColor = false; } // TODO: Should not be topology previousState.MarkForUpdate(UpdateFlags.GraphTopology); return(previousState); }
static State ResetNodeColor(State previousState, ResetNodeColorAction action) { Undo.RegisterCompleteObjectUndo((Object)previousState.AssetModel, "Change Color"); EditorUtility.SetDirty((Object)previousState.AssetModel); foreach (INodeModel nodeModel in action.NodeModels) { ((NodeModel)nodeModel).HasUserColor = false; } // TODO: Should not be topology previousState.MarkForUpdate(UpdateFlags.GraphTopology); return(previousState); }