Getting object in scene by unique name

Hello,

I have a rather newbie question that I have been unable to find the answer to in the Panda manual/Googling. I want to access an object position (x,y,z) by ‘getting’ this rendered object from the scene using its unique name that it was given when it was added. I understand that not all objects are required to have unique names, however, in my program they will, so I am able to use the method described. From what I understand this is possible, however, I haven’t been able to find a good example/explaination demonstrating how this can be done.

Thanks in advance!

Use this:

myNode = render.find("**/myNodeName")

Or if you have multiple nodes with that name:

for myNode in render.findAllMatches("**/myNodeName"):