On Thu, Feb 15, 2018 at 11:36 PM Nicolas Chaverou <
nicolas.chave...@golaem.com> wrote:

> Oops sorry, the error I'm getting is:
>
> // Error: (kInvalidParameter): Invalid parameter
>
>
Seems like you are using it the way the API describes.
Is it possible to use cmds.referenceQuery(dagPath, filename=True)  ?


>
> ---
> [image: Nicolas Chaverou - Golaem Crowd Product Manager - Golaem SA]
>
> +33 (0)2 99 27 21 44 <+33%202%2099%2027%2021%2044>
> http://www.golaem.com
>
> On Thu, Feb 15, 2018 at 11:33 AM, Nicolas Chaverou <
> nicolas.chave...@golaem.com> wrote:
>
>> Hey there,
>>
>> Was trying to fetch information about the file a node has been referenced
>> from but I can't get OpenMaya.MFileIO.getReferenceFileByNode to work
>> properly.
>>
>> I'm running the following piece of code:
>>
>> import maya.OpenMaya
>>
>> selectionList = maya.OpenMaya.MSelectionList()
>> selectionList.add( 'types_ToReference:pSphere1' )
>> node = maya.OpenMaya.MObject()
>> selectionList.getDependNode( 0, node )
>>
>> file = maya.OpenMaya.MFileIO.getReferenceFileByNode( node )
>>
>>
>> # RuntimeError: (kInvalidParameter): Object does not exist //
>>
>> Anything I missed?
>> ---
>> [image: Nicolas Chaverou - Golaem Crowd Product Manager - Golaem SA]
>>
>> +33 (0)2 99 27 21 44 <+33%202%2099%2027%2021%2044>
>> http://www.golaem.com
>>
>
> --
> 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 python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAFS5DCa_xE%2BkX2QpdxwAE7VjT1eBJvZDC6YmjMruRwyjDy-LHQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAFS5DCa_xE%2BkX2QpdxwAE7VjT1eBJvZDC6YmjMruRwyjDy-LHQ%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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2LYuiKGj0mTNsBKKu-x4zp15hj-hQiR2bRxejFXbsXuA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to