09 Sep 2013, 7:14
Hi!
You need to explicitly define the actual number of resources/nodes you want to attach, before the node gets initialized:
and
The documentation for the index parameter in SetResourceId()/SetNode() etc. already hints in that direction, however we will update the documentation for both Graph::IGenericResourceTarget and Graph::IGenericNodeTarget to more clearly state this behavior.
You need to explicitly define the actual number of resources/nodes you want to attach, before the node gets initialized:
...
if (parameters != 0 && geometry != 0)
{
AddChild(parameters);
parameters->AddChild(geometry->GetNodeInterface());
geometry->GetAtlasResourceTarget()->SetNumberOfResources(1);
geometry->GetAtlasResourceTarget()->SetResourceId("particles:atlas_particles", 0);
return true;
}
...
and
...
Graph::INode* node = GetCurrentNamespace()->FindNode(nodeIdToFind);
mNodeTarget.SetNumberOfNodes(1);
mNodeTarget.SetNode(node, 0);
if (!mNodeTarget.Init(tracker))
{
return false;
}
...
The documentation for the index parameter in SetResourceId()/SetNode() etc. already hints in that direction, however we will update the documentation for both Graph::IGenericResourceTarget and Graph::IGenericNodeTarget to more clearly state this behavior.