[Maya-Python] Re: [MPlug] error on get attribute

2018-06-23 Thread Cedric Bazillou
Depends on what your trying to achieve.
selection list first usage is for dag/dependency node and components.

Once you access them you can access their attributes easily 
So at first read what you point out doesn't look like an error.

Le vendredi 22 juin 2018 04:17:56 UTC-5, Rémi Deletrain a écrit :
>
> I everyone,
>
> I found an error on get attribute "rotatePivot" with api.
>
> It's possible to get this attribute with MFnDependencyNode like this
>
> m_sl = OpenMaya.MSelectionList()
> m_sl.add("null1")
>
> mo = OpenMaya.MObject()
> m_sl.getDependNode(0, mo)
>
> mfn = OpenMaya.MFnDependencyNode(mo)
> mp = mfn.findPlug("rotatePivot")
>
> But is not possible to get this attribute with MSelectionList
>
> m_sl = OpenMaya.MSelectionList()
> m_sl.add("null1.rotatePivot")
>
> mp = OpenMaya.MPlug()
> m_sl.getPlug(0, mp)
>
> But it's possible to get children like this
>
> m_sl = OpenMaya.MSelectionList()
> m_sl.add("null1.rotatePivotX")
>
> mp = OpenMaya.MPlug()
> m_sl.getPlug(0, mp)
>
> It's normal ?
>

-- 
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/2fcee142-c8c3-4870-894a-986eaff61c8d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] Is it possible to suppress message "File read in *** seconds" when I open a maya file?

2018-06-23 Thread yaoys
Hi all,
I'm wondering whether it is possible to suppress the  message "File read in 
*** seconds" when I open a maya file, because the message ruins my output 
log in the terminal window.

Cheers
Yao

-- 
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/ad0194a2-7f52-4405-a8e6-e5b967904dc7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.