6 namespace SiliconStudio.Paradox.Assets.Materials.Processor.Visitors
18 throw new ArgumentNullException();
27 if (callback == null)
throw new ArgumentNullException(
"callback");
28 var nodes = material.Nodes.ToList();
29 foreach (var nodeIt
in nodes)
32 VisitNode(
new MaterialNodeEntry(nodeIt.Value, node => material.Nodes[key] = node), callback, context);
38 if (callback == null)
throw new ArgumentNullException(
"callback");
44 if (callback == null)
throw new ArgumentNullException(
"callback");
45 callback(context, nodeEntry);
46 if (nodeEntry.
Node != null)
50 VisitNode(entry, callback, context);
MaterialBaseVisitor(MaterialDescription mat)
Description of a material.
IEnumerable< MaterialNodeEntry > GetChildren(object context=null)
Gets the children.
An entry to a nested IMaterialNode
static void VisitNodes(this MaterialDescription material, Action< object, MaterialNodeEntry > callback, object context=null)
static void VisitNodes(this IMaterialNode node, Action< object, MaterialNodeEntry > callback, object context=null)
Base interface for all nodes in the material tree
IMaterialNode Node
Gets or sets the node.
static void VisitNode(this MaterialNodeEntry nodeEntry, Action< object, MaterialNodeEntry > callback, object context=null)