Wiretap (Read Only)
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Getting parent node

5 REPLIES 5
Reply
Message 1 of 6
derrick
459 Views, 5 Replies

Getting parent node

Is it possible to get a WireTapNodeHandle for the parent node of a given clip node?
5 REPLIES 5
Message 2 of 6
labuted
in reply to: derrick

Sorry, it's not available. Given that you need the parent to get the child node in the first place, it should be easy to hold onto it at that time. Perhaps the WireTapNodeHandle object can "remember" it for you as a convenience.

Cheers,

Dan
Message 3 of 6
derrick
in reply to: derrick

Actually, I'm not getting the node as a child of another node. I'm getting it directly via the nodeId.
Message 4 of 6
labuted
in reply to: derrick

Technically, the original node must have been obtained from a parent at some point, but I can easily dream up a scenario where you would be handed a node ID without knowing where it came from. For example, you might want to know the project setings of a given clip node you were asked to encode.

Unfortunately, the answer is stil the same for now. The only possible workaround (a really bad one) is to traverse the entire node hierarchy until you find your node ID.

Perhaps you can elaborate a bit on the details of the problem you're trying to solve so that I can provide more constructive answers... 🙂

Thanks,

Dan
Message 5 of 6
derrick
in reply to: derrick

Yeah, that's basically it. I'm handed a node ID from another application.

I changed the requirements, though 😉 The other app now has to also give me the node IDs of all the ancestors up to the root node.
Message 6 of 6
labuted
in reply to: derrick

We had a similar issue when we wrote the WT Web browser. The nav bar at the top shows all parent nodes for quick navigation. Regenerating each page would require extra hits on the WT server if we had not passed around all the ancestors. Check out the generated HTML source and you'll see what we did.

It's a bit of a pain to code, but it helps reduce the load on the server. This was the spirit of the decision not to provide parent node access in the API. Not sure we gain all that much though.

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

Post to forums  

Autodesk Design & Make Report