Exemplo n.º 1
0
        public override void FromJson(string data)
        {
            PixelProcessorData d = JsonConvert.DeserializeObject <PixelProcessorData>(data);

            SetBaseNodeDate(d);

            function = new FunctionGraph("Pixel Processor Function");
            function.ExpectedOutput = NodeType.Float4 | NodeType.Float;
            function.AssignParentNode(this);
            function.FromJson(d.functionGraph);
            function.SetConnections();
        }
Exemplo n.º 2
0
        public override void FromJson(Dictionary <string, Node> nodes, string data)
        {
            PixelProcessorData d = JsonConvert.DeserializeObject <PixelProcessorData>(data);

            SetBaseNodeDate(d);

            if (function != null)
            {
                function.OnGraphUpdated -= Function_OnGraphUpdated;
            }

            function = new FunctionGraph("Pixel Processor Function");
            function.ExpectedOutput  = NodeType.Float4 | NodeType.Float;
            function.OnGraphUpdated += Function_OnGraphUpdated;
            function.FromJson(d.functionGraph);
            function.ParentNode = this;
            function.SetConnections();
        }