for attr in attrs:
print(pm.polyExtrudeFacet(extrusion, q=1, **attrs))
Yes, that is quite the nonsensical command. :)
You use it like this:
attrs = {"query": True,
"offset": True,
"smoothingAngle": True,
"localTranslateZ": True,
"localScaleX": True}
pm.polyExtrudeFacet(**attrs)
Which is the same thing as doing this:
pm.polyExtruceFacet(query=True,
offset=True,
smoothingAngle=True,
localTranslateZ=True,
localScaleX=True)
Though I don’t know where you’re getting extrusion from.
On 18 October 2014 19:40, Justin Israel <[email protected]> wrote:
>
> On 19/10/2014 7:29 AM, "Sam555" <[email protected]> wrote:
> >
> > Hello guys,
> >
> > i'am still stuck with this one, i can't get a for loop working with the
> dict unpacking, i t is not iterating on the key:value pair....as i surely
> not using the good way to iterate with dict:
> >
> > attrs = {"offset": True,
> > "smoothingAngle": True,
> > "localTranslateZ": True,
> > "localScaleX": True}
> >
> >
> > for attr in attrs:
> > print(pm.polyExtrudeFacet(extrusion, q=1, **attrs))
> >
>
> It doesn't make any sense to do this. What you are doing is looping over
> each key in the dict, not using it, and calling the same command each time,
> with the ordinal key/value pairs from the attrs dict. Seems like you want
> to ditch the loop altogether and call this once.
>
> > it's giving me the same value each time.
> > What am i doing wrong ?
> >
> > Thank you 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/8a8b11a7-ab7d-4d1a-b626-785b8280dc68%40googlegroups.com
> .
> >
> > 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/CAPGFgA1Q3t7nfKR03oMVMSO8C%3DJu3SAoMzrfWoNvjujBguGADw%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1Q3t7nfKR03oMVMSO8C%3DJu3SAoMzrfWoNvjujBguGADw%40mail.gmail.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/CAFRtmOD8njkHgdvNyZD2safynD8evRi5Lcip4cA_Z%2BMb2W6DzA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.