Maya command not return reference list from *.ma

Maya command not return reference list from *.ma

Anonymous
Not applicable
607 Views
2 Replies
Message 1 of 3

Maya command not return reference list from *.ma

Anonymous
Not applicable
In Maya I execute command to get the list for references included in the file: cmds.file(fileName, q=True, reference=True) It returns a list of the first level for references. And there is already a problem. If the file has an extension *.mb - then everything comes back. But if the file is saved as a *.ma - the command returns an empty list I tried to run the command on MEL - the same result. I suspect that it is necessary to specify what that additional flags, but nothing like this in the documentation can not be found. Tell me how to solve the problem?
0 Likes
608 Views
2 Replies
Replies (2)
Message 2 of 3

morten_bohne
Advocate
Advocate

not sure how to do it in maya.cmds, but in pymel you could do something like this:

 

import pymel.core as pm
print(pm.listReferences(recursive=True))

returns a list of tuples with refpath and refnode

example:

[FileReference(u'C:/maya/assets/rigs/props/prop.mb', refnode=u'propRN'), FileReference(u'C:/maya/assets/models/props/prop_mdl.mb', refnode=u'prop:prop_mdlRN')]

 

hope it helps

0 Likes
Message 3 of 3

Anonymous
Not applicable
I do not open the scene. I get the name of a file without opening. your command to get the list for references when it is loaded with scene. My task is to ensure that it is necessary to find out what references of included in the file to open the file. themselves for references is not on the local computer and you first need to copy from the server. so it is not possible to open the file to view the list for references, as for references not on your computer and the scene will not open ...
0 Likes