Oops sorry, the error I'm getting is:

// Error: (kInvalidParameter): Invalid parameter


---
[image: Nicolas Chaverou - Golaem Crowd Product Manager - Golaem SA]

+33 (0)2 99 27 21 44
http://www.golaem.com

On Thu, Feb 15, 2018 at 11:33 AM, Nicolas Chaverou <
[email protected]> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAFS5DCa_xE%2BkX2QpdxwAE7VjT1eBJvZDC6YmjMruRwyjDy-LHQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to