Looks like the problem is that polyListComponentConversion returns a
list, whereas the object flag of listSets will only accept a single
string (even though that single string can actually specify a range of
faces, such as 'pCube1.f[3:5]' or 'pCube1.f[*]').  Try this:

tfc = polyListComponentConversion("pCube1|pCubeShape1", tf=1)
SGs = []
for faces in tfc:
        SGs.extend(listSets(object=tfc, type=1))
print SGs


On Fri, Mar 27, 2009 at 2:35 AM, King <[email protected]> wrote:
>
> I am getting an error when retrieving shading Groups:
>
> tfc = polyListComponentConversion("pCube1|pCubeShape1", tf=1)
> SGs = listSets(object=tfc, type=1)
>
> error:
> # Error: Maya Attribute does not exist: [u'pCube1.f[*]']
> # Traceback (most recent call last):
> #   File "<maya console>", line 1, in <module>
> #   File "D:\maya2008\Python\lib\site-packages\pymel\core\general.py",
> line 1164, in __new__
> #     raise MayaAttributeError( argObj )
> # MayaAttributeError: Maya Attribute does not exist: [u'pCube1.f[*]']
> #
>
> Any help?
>
> Prashant
> >
>

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---

Reply via email to