cmds.file(query=True, list=True, unresolvedName=True) I think that’s it!
On 12 August 2015 at 09:07, Roy Nieterau <[email protected]> wrote: > For completeness sake. This is how to list unresolved filenames with the > file command: > > files = cmds.file(query=True, list=True, unresolvedName=True) > > > On Wednesday, August 12, 2015 at 9:12:17 AM UTC+2, Marcus Ottosson wrote: >> >> Thanks everyone for your replies! >> >> It certainly looks more challenging than I would have thought, the >> cmds.file(query=True, >> list=True) is close, and the listFiles of filePathEditor almost got it, >> and though it looks to work with file nodes, it doesn’t seem to work >> with reference nodes, and I wonder what else it won’t work with. Alembic >> files probably, as you say, Roy. >> >> What’s more, it doesn’t look like reference nodes contain their >> unresolved filename, maybe this is resolved by the editor itself? >> >> # Always returns a resolved path? >> cmds.getAttr("ben02_RN.fileNames[0]") >> >> The goal of this little experiment is to be able to look at a scene and >> determine whether there are any *absolute paths* in it. As in, paths >> starting with either a drive letter and a colon (Windows), or a forward >> slash (Unix). >> >> I’d like to look at a scene with these paths: >> >> $ROOT/myfile.mb >> $OTHERROOT/myotherfile.mb >> /server/mythirdfile.mb >> >> And go “aha, that’s 1 absolute path, and it belongs to node.myAttr”. >> >> > -- > 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/232e4654-4676-4c5e-9ca6-35feb1d63bd3%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/232e4654-4676-4c5e-9ca6-35feb1d63bd3%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/CAFRtmODh4ncQypKavwusZXWWfY%3DUjBKyS8v5zNA9OgcA8PgpAw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
