Community
Arnold General Rendering Forum
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Using AiASSLoad function cannot read all node in ass file

2 ANTWORTEN 2
Antworten
Nachricht 1 von 3
1804415315
366 Aufrufe, 2 Antworten

Using AiASSLoad function cannot read all node in ass file

I try to use the AiASSLoad function to read to local ass file,first i create a independent atuniverse to load ass file because using default atuniverse will dirty Arnold rendering,but i found whatever i iterate the node point using the AiUniverseGetNodeIterator() fnuction,i always only get the root and option node,the rest node like polymesh and light are disappeard.So i try to use the default universe to load the ass file,and it show the rest of the node.If i want to use another universe to only load the ass file and destroy it when i finish read it,what operate should i prepare or is that my step right?

Tags (3)
Beschriftungen (3)
2 ANTWORTEN 2
Nachricht 2 von 3
Stephen.Blair
als Antwort auf: 1804415315

Please post some code (Python?) to show what you are doing.

What do you want to do with these nodes? Are you running this code in an application like Maya?



// Stephen Blair
// Arnold Renderer Support
Nachricht 3 von 3
1804415315
als Antwort auf: 1804415315

Sorry It`s my fault.

AtUniverse* localUniverse = AiUniverse();
if(AiASSLoad(localUniverse,filePathToAssFile, AI_NODE_SHAPE) != -1)
{
  AtNodeIterator * iter = AiUniverseGetNodeIterator(localUniverse,AI_NODE_SHAPE);
  while(!AiNodeIteratorFinished(iter))
  {
    AtNode * node = AiNodeIteratorGetNext(iter);
    if(!node)
      continue;

    const char* nodeName = AiNodeGetName(node);
    if (!strcmp(nodeName, "root"))
        continue;

    // If this is a polymesh
    // Currently assuming matrix are all identity and all transformation are recorded in vertex position
    uint32_t numElem = AiArrayGetNumElements(AiNodeGetArray(node, AtString("vlist")));
    std::vector<AtVector> points;
    if(numElem)
    {

I forgot to add localUniverse point parameter to the AiUniverseGetNodeIterator function,so i always get the default Universe node info

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report