Community
VRED Forum
Welcome to Autodesk’s VRED Forums. Share your knowledge, ask questions, and explore popular VRED topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

reliable identification of node

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
j.kaestle
659 Views, 4 Replies

reliable identification of node

Hi,

I am looking for a reliable  way to identify a node in the scenegraph. I found that the node pointer is changing every time when I select it e.g. with node = findNode(Name). I also found that the node ID is changing when I open the Scene in a new session. To use the Name is also not reliable, because the data is imported from CAD and there can be several instances of the same part with identical names. The only possibility I found is to rename all nodes, so that every node Name is unique.

Are there any other ideas?

 

Thanks

4 REPLIES 4
Message 2 of 5

There is no way to do it. Also, the nodes can change, for example when doing undo/redo, restructuring in the scenegraph when using clones and so on.

Your best option is to use a fully qualified name starting from the root. This will fail if you have nodes named the same on the same hierarchy level but I found that to be rarely the case (except for surfaces in a shell, which  should not have a name at all).

 

Kind regards

Michael



Michael Nikelsky
Sr. Principal Engineer
Message 3 of 5
Bob.Bon2000
in reply to: j.kaestle

You can probably hock up ur own component to node and then make ID in it. Not sure tho I only theorized about it tho... 

Message 4 of 5
j.kaestle
in reply to: Bob.Bon2000

Thanks for the replies. I implemented a renaming of the nodes. I append a Counter to the original Name. This seems to be the best solution.

 

Regards

Jochen

Message 5 of 5
Florian_Hilmer
in reply to: j.kaestle

Hi,

 

in theory for each node your CAD-name (Part-ID + revision-inormation + whatever else your CAD-system uses) + the world-transformation of the node-instance should be enough to uniquely identify each node.

If it isn't you have the same node in the exact same position multiple times in your scene, which points to a problem in your source data.

Or, if this is done on purpose in your CAD, you would need to add something like variant-information from your CAD-system to each node-identifier to make them unique again.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report