Failed to init atlas resource target
#1
Apost 
Hi!

The code below generates the following console output while failing:

Graph::SingleResourceTarget::Init(): Need exactly 1 object
Graph::PlaneSequenceGeometry::InitSelf(): Failed to init atlas resource target


Graph::INode* parameters = root->CreateNode("FixedParameters");
Graph::IPlaneSequenceGeometry* geometry = 
    dynamic_cast<Graph::IPlaneSequenceGeometry*>(root->CreateNode("PlaneSequenceGeometry"));
            
if (parameters != 0 && geometry != 0)
{
    AddChild(parameters);
    parameters->AddChild(geometry->GetNodeInterface());
                
    geometry->GetAtlasResourceTarget()->SetResourceId("particles:atlas_particles", 0);

    return true;
}
else
{
    Debug::Trace("InitSelf(): Failed to create subnodes.");
    return false;
}


However, achieving the same with XML does work.

Any ideas?

I found a similar issue with the SingleNodeTargets:

Graph::INode* node = GetCurrentNamespace()->FindNode(nodeIdToFind);
mNodeTarget.SetNode(node, 0);
if (!mNodeTarget.Init(tracker))
{
    return false;
}


Debugging the Init() method of SingleNodeTarget told me that mNumberOfNodes was still set to zero.

if ((mMinNumberOfNodes != 0) && (mNumberOfNodes == 0))
{
    Debug::Error("Graph::SingleNodeTarget::Init(): Need exactly 1 node");
    return false;
}
Reply


Messages In This Thread
Failed to init atlas resource target - by Stefan - 06 Sep 2013, 11:42

Forum Jump:


Copyright © 2011-2018 Spraylight GmbH.