About
A core node is a basic node of Cinema 4D's node material system. It represents a basic functionality that can be used in a node material.
The relevant interfaces needed to implement custom core nodes are found in the corenodes.framework.
Implementation
A simple custom core node is implemented as follows:
class MaximumComponentCoreNode
{
public:
{
public:
{
ports.result.Update(resultColor);
}
};
{
return group.AddChild<Impl>();
}
};
Description
The description of the core node must be created with the Resource Editor.The new data type must have the ID of the core node.
The data type properties are:
- Classification: "node"
- Description Processor: "CoreNodeDescriptionProcessor"
- Processor Parameters: The core node ID.
- Menu Category: Select a category for the node.
The core node needs a new attribute:
- Command: "include"
- Identifier: "net.maxon.node.base"
- Include: "net.maxon.node.base"
The name of the node is set with net.maxon.node.base.
Port descriptions are created with new attributes:
- Command: "attribute"
- Identifier: the port ID
- Datatype: The port data type
- Classification: "input" or "output"
- Gui Type Id: The proper UI for that data type
- Group Id: The proper group, either "net.maxon.node.base.group.inputs" or "net.maxon.node.base.group.outputs"
- String: The name displayed in the UI.
Description Handling
The description of the core node must be loaded and handled properly:
{
{
err.CritStop();
return err;
};
}
static void HandleFreeModule()
{
g_coreNodeDescriptions.
Reset();
}
This is an extended version of the typical procedure to load MAXON API ALIASES descriptions. See Loading Data Descriptions.
Further Reading