I did a similiar thing..but it wasnt a one function solution. Its tool which catches all paths ( files ) and copies them to a given directory and remaps all the paths to the new set directory. To get it to work though, I created a dictionary with nodeType and path attribute eg. file:filepath etc. And then I did for p in pmc.ls(type = nodeType) and then append all the nodes and paths to a dict. But once you get it setup its really easy to add new nodes to it. Alembic fbx aiimage they all have their own attributes. Hope it did help
On 11 August 2015 at 17:02, Marcus Ottosson <[email protected]> wrote: > Also, importantly, I’d like their unresolved entry, no the resolve one. > The command above only returns resolved paths. > > # Right$ROOT/parent/file.mb > # Wrong > /server/projects/myproject/parent/file.mb > > > > On 11 August 2015 at 16:59, Marcus Ottosson <[email protected]> > 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] >> > > > > -- > *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/CAFRtmOA8yE2SWch_%3D-_jAG-uEUY6r52CA3tYg%3D00hDnb8REjEg%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOA8yE2SWch_%3D-_jAG-uEUY6r52CA3tYg%3D00hDnb8REjEg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Arvid Schneider Look Develpopment | Lighting TD | Show TD www.arvidschneider.com Mobil DE: (+49) 170 321 0074 Mobile UK: (+44) 744 824 6973 Mail: [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/CADrk2uQHWZ-wseM4haxmC4x7Wa2EzrSFt2Hbik-KUXnHdQU4qA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
