コード例 #1
0
        public void OnUnLinked(Assets.GDI.Code.Graph.Graph graph, AbstractSocket s01, AbstractSocket s02)
        {
            Log.Info("OnUnLinked: Socket " + s02 + " and Socket " + s02);
            var input = s01.IsInput() ? s01 : s02;

            graph.UpdateDependingNodes(input.Parent);
        }
コード例 #2
0
 public StringNode(int id, Assets.GDI.Code.Graph.Graph parent) : base(id, parent)
 {
     _textFieldRect = new Rect(3, 0, 100, 20);
     Sockets.Add(new OutputSocket(this, typeof(IStringConnection)));
     Height = 45;
     Width  = 50;
 }
コード例 #3
0
        public LimitNode(int id, Assets.GDI.Code.Graph.Graph parent) : base(id, parent)
        {
            _inputSocket01 = new InputSocket(this, typeof(INumberConnection));
            Sockets.Add(_inputSocket01);
            _inputSocketMin = new InputSocket(this, typeof(INumberConnection));
            _inputSocketMin.SetDirectInputNumber(1, false);
            Sockets.Add(_inputSocketMin);
            _inputSocketMax = new InputSocket(this, typeof(INumberConnection));
            _inputSocketMax.SetDirectInputNumber(-1, false);
            Sockets.Add(_inputSocketMax);
            Sockets.Add(new OutputSocket(this, typeof(INumberConnection)));

            _tmpRect = new Rect();
            Height   = 80;
            Width    = 50;
        }
コード例 #4
0
        public CreateColorMapFromPixelNode(int id, Assets.GDI.Code.Graph.Graph parent) : base(id, parent)
        {
            _outputSocketColorMap = new OutputSocket(this, typeof(IColorMapConnection));
            _inputSocketColor     = new InputSocket(this, typeof(IColorConnection));
            _inputSocketWidth     = new InputSocket(this, typeof(INumberConnection));
            _inputSocketHeight    = new InputSocket(this, typeof(INumberConnection));
            _inputSocketWidth.SetDirectInputNumber(10, false);
            _inputSocketHeight.SetDirectInputNumber(10, false);

            Sockets.Add(_outputSocketColorMap);
            Sockets.Add(_inputSocketColor);
            Sockets.Add(_inputSocketWidth);
            Sockets.Add(_inputSocketHeight);
            Width  = 120;
            Height = 80;
        }
コード例 #5
0
        public MixNode(int id, Assets.GDI.Code.Graph.Graph parent) : base(id, parent)
        {
            labelInput01 = new Rect(3, 0, 100, 20);
            labelInput02 = new Rect(3, 20, 100, 20);
            labelFactor  = new Rect(3, 40, 100, 20);

            _inputSocket01 = new InputSocket(this, typeof(INumberConnection));
            _inputSocket02 = new InputSocket(this, typeof(INumberConnection));
            _factorSocket  = new InputSocket(this, typeof(INumberConnection));
            Sockets.Add(new OutputSocket(this, typeof(INumberConnection)));
            Sockets.Add(_inputSocket01);
            Sockets.Add(_inputSocket02);
            Sockets.Add(_factorSocket);
            Height = 80;
            Width  = 80;
        }
コード例 #6
0
 public void OnNodeRenamed(Assets.GDI.Code.Graph.Graph graph, Node node, string oldName, string newName)
 {
     Log.Info("OnRename: " + node.Id + " from " + oldName + " to " + newName);
 }
コード例 #7
0
 public void OnFocusNode(Assets.GDI.Code.Graph.Graph graph, Node node)
 {
     Log.Info("OnFocus: " + node.Id);
 }
コード例 #8
0
 public void OnNodeChanged(Assets.GDI.Code.Graph.Graph graph, Node node)
 {
     Log.Info("OnNodeChanged: Node " + node.GetType() + " with id " + node.Id);
     graph.UpdateDependingNodes(node);
 }
コード例 #9
0
 public void OnNodeRemoved(Assets.GDI.Code.Graph.Graph graph, Node node)
 {
     Log.Info("OnNodeRemoved: Node " + node.GetType() + " with id " + node.Id);
 }
コード例 #10
0
 public void OnUnLink(Assets.GDI.Code.Graph.Graph graph, AbstractSocket s01, AbstractSocket s02)
 {
     // Log.Info("OnUnLink: Node " + s01.Edge.Output.Parent.Id + " from Node " + s02.Edge.Input.Parent.Id);
 }
コード例 #11
0
 // ======= Events =======
 public void OnLink(Assets.GDI.Code.Graph.Graph graph, Edge edge)
 {
     Log.Info("OnLink: Node " + edge.Output.Parent.Id + " with Node " + edge.Input.Parent.Id);
     graph.UpdateDependingNodes(edge.Output.Parent);
 }
コード例 #12
0
 public void OnClose(Assets.GDI.Code.Graph.Graph graph)
 {
     Log.Info("OnClose " + graph);
 }
コード例 #13
0
 public void OnFocus(Assets.GDI.Code.Graph.Graph graph)
 {
     Log.Info("OnFocus " + graph);
 }
コード例 #14
0
 public void OnCreate(Assets.GDI.Code.Graph.Graph graph)
 {
     graph.UpdateNodes();
 }