Thanks guys for a quick reply.

@Arvid and Fredrik: Would it possible to share this dictionary?

On 11 August 2015 at 20:23, Robert White <[email protected]> wrote:

> So if you want the texture file nodes in the scene, you can get them from
> pymel with:
>
> import pymel.core as pm
> file_nodes = pm.ls(type=pm.nt.File)
> file_paths = [fyle.fileTextureName.get() for fyle in file_nodes]
>
> with cmds:
> import maya.cmds as cmds
> file_nodes = cmds.ls(type='file')
> file_paths = [cmds.getAttr(fyle + '.fileTextureName') for fyle in
> file_nodes]
>
> Unresolved reference paths can be gotten pretty easy in pymel :
> unresolved_paths = [ref.unresolvedPath() for ref in pm.listReferences()]
>
> with cmds:
> [cmds.referenceQuery(pth, unresolvedName=True, filename=True) for pth in
> cmds.file(q=True, reference=True)]
>
>
>
> On Tuesday, August 11, 2015 at 10:59:47 AM UTC-5, Marcus Ottosson wrote:
>>
>> I’m looking for a way to list all nodes that somehow reference an
>> external file; be it references, textures, or some obscure custom node with
>> an attribute for paths.
>>
>> I was looking at the cmds.filePathEditor
>> <http://help.autodesk.com/cloudhelp/2015/ENU/Maya-Tech-Docs/CommandsPython/filePathEditor.html>
>> which is close.
>>
>> >>> cmds.filePathEditor(query=True, listDirectories="")
>> [list of paths]
>>
>> But it doesn’t show me which nodes are responsible for these paths, and
>> doesn’t show me the full filenames.
>>
>> Any ideas?
>> ​
>> --
>> *Marcus Ottosson*
>> [email protected]
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/a0cfa12a-90cb-4890-8e3f-6b46cfc34ffd%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/a0cfa12a-90cb-4890-8e3f-6b46cfc34ffd%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Marcus Ottosson*
[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBgtVoNmxD1XOCNbFu3jrkShgYx5ro_ePL1-uKL7-C%2Bfw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to