/// <summary> /// Gets all the parameters in the given Graph. /// </summary> public GraphParamCollection(Graph g) : this() { Graph gCopy = g.Clone(); gCopy.PreProcess(); foreach (Node n in gCopy.Nodes) { if (n is ParamNode_Float) FloatParams.Add(((ParamNode_Float)n).Param); else if (n is ParamNode_Texture2D) Tex2DParams.Add(((ParamNode_Texture2D)n).Param); } }
/// <summary> /// Gets all the parameters in the given Graph. /// </summary> public GraphParamCollection(Graph g) { Graph gCopy = g.Clone(); gCopy.PreProcess(); FloatParams = new List <FloatParamInfo>(); Tex2DParams = new List <Texture2DParamInfo>(); foreach (Node n in gCopy.Nodes) { if (n is ParamNode_Float) { FloatParams.Add(((ParamNode_Float)n).Param); } else if (n is ParamNode_Texture2D) { Tex2DParams.Add(((ParamNode_Texture2D)n).Param); } } }