Class GraphNodeFactory
Namespace: ValveResourceFormat.Animation
Assembly: ValveResourceFormat.dll
Maps compiled graph node classes to the runtime nodes that evaluate them.
public static class GraphNodeFactoryInheritance
object ← GraphNodeFactory
Remarks
The nodes of this library and of the renderer are registered by a source generator when their assembly loads. Other code adds its own nodes through GraphNodeFactory.Register<TNode>(Func<KVObject, TNode>), or replaces built-in ones through GraphNodeFactory.Register(string, GraphNodeCreator).
Methods
Create(KVObject)
Creates the node for one m_nodes entry of a graph definition.
public static GraphNode Create(KVObject definition)Parameters
definition KVObject
Returns
Exceptions
No node is registered for the definition's class.
IsSupported(string)
Gets whether a node is registered for a compiled class.
public static bool IsSupported(string className)Parameters
className string
Returns
bool
Register<TNode>(Func<KVObject, TNode>)
Registers a node under the compiled class named after it, so that ClipNode is created for CNmClipNode::CDefinition, replacing any earlier registration.
public static void Register<TNode>(Func<KVObject, TNode> creator) where TNode : GraphNodeParameters
creator Func<KVObject, TNode>
Creates the node from its definition.
Type Parameters
TNode
The node type, named as its compiled class is without the CNm prefix.
Register(string, GraphNodeCreator)
Registers the node created for a compiled class, replacing any earlier registration.
public static void Register(string className, GraphNodeCreator creator)Parameters
className string
The _class of the compiled definition, such as CNmClipNode::CDefinition.
creator GraphNodeCreator
Creates the node from its definition.

