About
A node space represents a container for a node system for a specific purpose. For example, a NodeMaterial can contain multiple node systems; one for each node-based render engine.
For custom node spaces, see NodeSpaceInterface Implementation.
Access
Node spaces are stored in the maxon::nodes::MaterialNodeSpaces registry. The active node space ID is obtained with GetActiveNodeSpaceId(). The default node space is:
- maxon::nodes::MaterialNodeSpaces::Standard: The standard node space.
const maxon::Id standardNodeSpace = maxon::nodes::MaterialNodeSpaces::Standard.GetId();
if (standardNodeSpace == activeNodeSpace)
{
}
A node space stores various settings. The most important are:
- maxon::nodes::NODESPACE::SPACENAME: The name of the node space.
- maxon::nodes::NODESPACE::RENDERERS: The IDs of the associated render engines (VideoPostData plugin IDs).
For more settings, see MAXON_ATTRIBUTE from the maxon::nodes::NODESPACE.
- Note
- The Cinema 4D standard renderer has the ID 0.
maxon::DataDictionary spaceData = nodeSpace.GetData();
for (const auto& data : spaceData)
{
}
for (const auto& it : maxon::nodes::MaterialNodeSpaces::GetEntries())
{
const maxon::nodes::NodeSpaceRef nodeSpace = it;
const maxon::DataDictionary spaceData = nodeSpace.GetData();
const maxon::Id spaceID = spaceData.GetOrDefault(maxon::nodes::NODESPACE::SPACEID);
{
}
}