> Oh, you're just talking about Maya references?

Sorry, getting tired :) re-read your initial question and I still don't
think you can do what you want to achieve without parsing all nodes and all
their attributes and then filter the value manually in order to determine
whether the value is a folder path or file path.

Since that could become a bit heavy I made a dictionary like I mentioned
before...

// Fredrik
tis 11 aug 2015 kl. 19:21 skrev Fredrik Averpil <[email protected]>:

> Oh, you're just talking about Maya references?
> I thought you wanted to find e.g. ies files or vrmesh files etc and other
> files which are "referenced" (without being a "Maya reference").
>
> tis 11 aug 2015 kl. 19:18 skrev Fredrik Averpil <[email protected]
> >:
>
>> I ended up making a dictionary of nodes and attributes and query these
>> "manually" since there is (to my understanding) no way to really just find
>> all filepaths existing in some shape or form in the scene.
>>
>> Just think about plugins. You can never know if the developer properly
>> registered the attribute so that filepaths will be found using the filepath
>> editor.
>>
>> I would love to be proved wrong here.
>>
>> Regards,
>> Fredrik
>> tis 11 aug 2015 kl. 19:11 skrev Arvid Schneider <[email protected]
>> >:
>>
>>> 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
>>> <https://groups.google.com/d/msgid/python_inside_maya/CADrk2uQHWZ-wseM4haxmC4x7Wa2EzrSFt2Hbik-KUXnHdQU4qA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
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/CAD%3DwhWPxLO_Eg6fFcvoP%3D1mii_XjsvM8MTGfZCd-ekwshWtGLw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to