[C++ Maya API] Getting all nodes from the imported scene?

cplusplus
cpp

#1

Hey guys, I am converting a python tool to the API and I’m looking for a way to return the imported files that were imported into a scene. Python 'cmds.file(file, i = True) returns a list of nodes, but looking through the API there is no such function.

The tool opens a original file (Gets the mesh from the file ‘Mesh1’) then imports a scene (and I take the mesh from that scene ‘Mesh2’), because I have no reference to the 2 mesh nodes (I can’t get by name since all them will be different) I can’t select the imported mesh node unless I can access the imported node array and return it from that array.

Looking for a way to get these mesh nodes, I can achieve this by namespace but, when I go to save the scene will the namespace still be appended to the exported scene?


#2

I overlooked the ref params in the MFile class, this can be closed now.