Well, let's call it half-a-bug... basically, only a few component types (meshVerts/Edges/Polys) have really been implemented - however, a command like ls really shouldn't fail simply because you have some stuff selected. Reagardless, we're working on it.
As for your request - yes, I agree, that would be handy! Unfortunately, I wouldn't expect to see it in pymel anytime soon, because maya simply doesn't store the selection order of components anywhere (or at least, not anywhere they let us access!). In order to implement that, you'd have to track it yourself, by essentially keeping your own selection list, and updating it with a callback whenever the selection was changed. And adding onto the capabilities of maya isn't really the design goal of pymel - it's more aimed at rearranging and organizing what's already there in a way that's more sane and easily usable. - Paul On Tue, Apr 7, 2009 at 11:03 AM, Simon <[email protected]> wrote: > > hi suyati, > > it happened to me as well about 1 week ago , i mailed it as BUG to chadrik . > > but in the meanwhile i do not think it is a bug , i guess it is just not > implented yet , it also happens on nurbsSurfaces > > if you want to get CVs in your selection-List , you might want to use > the regular ls(sl=True) from the maya.cmds . > > ------- > qchadrik: > you know what would be great ? > > if you could "somehow" make it , that it is possible in pymel , to get > the list ( flatten ) of the vertecies / controlPoints / edges / faces > .... in "selectionOrder" ??? you think that might be possible ??? that > was something , that never worked in MEL , only with some kind of a > UNDO_workaround , which i personally never liked to use ... but having > the "LIST" in selection-order , sometimes is really important in scripts . > > well, that is just a BIG WISH !!! > > cheers > simon > > > > suyati schrieb: >> hi there >> >> i've got some problems getting the selected cv's of a curve or a nurbs >> with ls(sl=1) in pymel 0.9. >> >> i get this error: >> # Error: 'NurbsCurveCV' object has no attribute '__apicls__' >> # Traceback (most recent call last): >> # File "<maya console>", line 1, in <module> >> # File "/dev/..../pymel/core/general.py", line 665, in ls >> # return map(PyNode, util.listForNone(cmds.ls(*args, **kwargs))) >> # File "/dev/..../pymel/core/nodetypes.py", line 185, in __init__ >> # self.__apiobjects__['MFn'] = self.__apicls__(*newargs ) >> # File "/dev/..../core/factories.py", line 3160, in __getattribute__ >> # return bases[0].__getattribute__(self, name) >> # AttributeError: 'NurbsCurveCV' object has no attribute '__apicls__' >> # >> >> it works fine with vertices. >> >> it also works correct with the standart maya.cmds >> >> hope somebody can help me out, don't know if i am missing something >> here. >> >> su >> >> >> > >> >> > > > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/python_inside_maya -~----------~----~----~----~------~----~------~--~---
