Oh right. Now it makes sense why you wee doing that loop. Marcus seems to
have solved the riddle.
On 19/10/2014 9:34 AM, "Marcus Ottosson" <[email protected]> wrote:
> Aah, now I see what you’re trying to achieve. How about this.
>
> for attr in ["offset",
> "smoothingAngle",
> "localTranslateZ",
> "localScaleX"]:
> kwargs = {attr: True, "query": True}
> print pm.polyExtrudeFacet(extNodes[0], **kwargs)
>
> This will run a query for each string in the list.
>
>
> On 18 October 2014 20:02, Sam555 <[email protected]> wrote:
>
>> Yes i see my error calling over the ordinal key/value from the dict but
>> calling only "pm.polyExtrudeFacet(extrusion, q=1, **attrs" returns only
>> one value and not every attributes value i want to query.
>>
>> My steps :
>>
>> # get the mesh
>> sel=pm.selected()[0]
>>
>> # get the shape
>> shapeNode = sel.getShapes()[0]
>>
>> # get the extrudes nodes
>> extNodes = sorted([node for connection in shapeNode.connections(c=1) for
>> node
>> in connection if pm.nodeType(node)=='polyExtrudeFace'])
>>
>> # node attributes (shortened for demonstration)
>> attrs = {"offset": True,
>> "smoothingAngle": True,
>> "localTranslateZ": True,
>> "localScaleX": True}
>>
>> # list all the attributes value for say the first extrude node :
>> extAttrValues = pm.polyExtrudeFacet(extNodes [0], q=1, **attrs)
>> it only returns one value in the extAttrValues list.
>>
>> Thank for your help.
>>
>>
>> --
>> 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/df5d28fc-a4f2-495b-8faf-56b2862c31b1%40googlegroups.com
>> <https://groups.google.com/d/msgid/python_inside_maya/df5d28fc-a4f2-495b-8faf-56b2862c31b1%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/CAFRtmOD26LhS3dFEfinhr-eK-yJjRdP1c-N6jtCyDWASO1Y0yQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOD26LhS3dFEfinhr-eK-yJjRdP1c-N6jtCyDWASO1Y0yQ%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/CAPGFgA3_gv9K0c--RwfhBXCMmYjeB18mLtcfgiPf2g--nXJDtA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.