On the same line, I found another problem with UV component.
Basically I figured that there is no pymel polygon UV nodeType.
This example crash at the polyUVs command:  Create a poly shape,
select a few UVs and run the getPolygonUVs() function... it will fail.

the other 3 polygon components work fine


def getComponent(componentId=0):
        componentSel = pm.filterExpand(ex=True, sm=componentId)
        componentList = []
        if componentSel is not None:
                for i in componentSel:
                        componentList.append(pm.PyNode(i))
        return componentList

def getPolygonVertices():
        return getComponent(31)
def getPolygonEdges():
        return getComponent(32)
def getPolygonFaces():
        return getComponent(34)
def getPolygonUVs():
        return getComponent(35)



On Apr 3, 4:04 pm, Paul Molodowitch <[email protected]> wrote:
> I confirmed this bug, and entered it into the tracker... thanks for
> reporting it.
>
> - Paul
>
> On Fri, Apr 3, 2009 at 12:21 PM, Sylvain Berger
>
>
>
> <[email protected]> wrote:
> > no the maya.cmds command works:
> > print cmds.ls(sl=1)
> > [u'polySurface1.map[10]']
> > the pymel command still returns this:
> > print pm.selected()
> > # Error: Maya Node does not exist: u'None'
> > # Traceback (most recent call last):
> > #   File "<maya console>", line 1, in <module>
> > #   File
> > "\\Isilon\alpha\data\shared_maya_folder\shared_scripts\AVpythonScriptsDEV\p 
> > ymel\core\general.py",
> > line 988, in selected
> > #     return ls( **kwargs )
> > #   File
> > "\\Isilon\alpha\data\shared_maya_folder\shared_scripts\AVpythonScriptsDEV\p 
> > ymel\core\general.py",
> > line 664, in ls
> > #     return map(PyNode, util.listForNone(cmds.ls(*args, **kwargs)))
> > #   File
> > "\\Isilon\alpha\data\shared_maya_folder\shared_scripts\AVpythonScriptsDEV\p 
> > ymel\core\general.py",
> > line 1212, in __new__
> > #     pymelType, obj = nodetypes._getPymelType( argObj )
> > #   File
> > "\\Isilon\alpha\data\shared_maya_folder\shared_scripts\AVpythonScriptsDEV\p 
> > ymel\core\nodetypes.py",
> > line 4296, in _getPymelType
> > #     pymelType = getPymelTypeFromObject( obj )
> > #   File
> > "\\Isilon\alpha\data\shared_maya_folder\shared_scripts\AVpythonScriptsDEV\p 
> > ymel\core\nodetypes.py",
> > line 4239, in getPymelTypeFromObject
> > #     raise MayaNodeError
> > # MayaNodeError: Maya Node does not exist: u'None' #
>
> > On Fri, Apr 3, 2009 at 2:37 PM, chadrik <[email protected]> wrote:
>
> >> pymel has an issue tracker:  http://code.google.com/p/pymel/issues/list
> >>  but posting here first is always a good idea.
> >> do you get the same crash when doing this:
> >> import maya.cmds as cmds
> >> cmds.ls(sl=1)
> >> i'm guessing not, but just making sure.
> >> -chad
>
> > --
> > They say, "Evil prevails when good men fail to act." What they ought to say
> > is, "Evil prevails."
> > Nicolas Cage as Yuri Orlov in Lord of War.
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---

Reply via email to