correcting the last line: mc.reorderDeformers (skin, bshape, geo)

# Error: Invalid argument 1, 'ha'. Expected arguments of type
( string, string )
# Traceback (most recent call last):
#   File "<maya console>", line 18, in <module>
# TypeError: Invalid argument 1, 'ha'. Expected arguments of type
( string, string ) #

On 16 ago, 12:47, Vitor Lôbo Ramos <[email protected]> wrote:
> Alan, i liked your solution.
> But how do i resolve this issue for example?
>
> import pymel.core as pm
> import maya.cmds as mc
>
> sel = pm.ls(sl=1)
> geo = sel[0]
> hist = pm.listHistory(geo, pdo=1,il=2)
> skinClusters = [h for h in hist if pm.nodeType(h) == "skinCluster"]
> blendShapeNodes = [h for h in hist if pm.nodeType(h) == "blendShape"]
>
> skin = skinClusters[0]
> bshape = blendShapeNodes[0]
>
> mc.reorderDeformers( skin, bshape, obj)
>
> # Error: Invalid argument 1, 'ha'. Expected arguments of type
> ( string, string )
> # Traceback (most recent call last):
> #   File "<maya console>", line 18, in <module>
> # TypeError: Invalid argument 1, 'ha'. Expected arguments of type
> ( string, string ) #
>
> On 12 ago, 18:49, Alan Fregtman <[email protected]> wrote:
>
>
>
> > Or:
>
> > import pymel.core as pm
>
> > sel = pm.ls(sl=1)
> > geo = sel[0]
> > hist = pm.listHistory(geo, pdo=1,il=2)
> > skinClusters = [h for h in hist if pm.nodeType(h) == "skinCluster"]
> > blendShapeNodes = [h for h in hist if pm.nodeType(h) == "blendshape"]
>
> > On Thu, Aug 12, 2010 at 4:58 PM, Chad Vernon <[email protected]> wrote:
> > > I'm not sure I understand.  Can you do some like this:
>
> > > sel = mc.ls(sl=True)
> > > history = mc.listHistory(sel[0[)
> > > for node in history:
> > >     print node
> > >     nodeType = mc.nodeType(node)
> > >     if nodeType == 'skinCluster':
> > >         skinCluster = node
> > >     elif nodeType == 'blendshape':
> > >         blendshape = node
>
> > > 2010/8/12 Vitor Lôbo Ramos <[email protected]>
>
> > >> But I need to know it in specific.So I can apply a variable upon the
> > >> information obtained.
>
> > >> exemple:
>
> > >> sel = mc.ls(sl=True)
> > >> print sel
>
> > >> mc.rename(sel,'test_one')
>
> > >> Now I want to apply commands to other objects identified .... I think
> > >> listHistory () does not allow me that.
>
> > >> On 12 ago, 17:11, Chad Vernon <[email protected]> wrote:
> > >> > I think you are looking for the mc.listHistory() command.
>
> > >> > Chad
>
> > >> > 2010/8/12 Vitor Lôbo Ramos <[email protected]>
>
> > >> > > Good afternoon
>
> > >> > > How to solve this issue?
>
> > >> > > Suppose I have created one with a polyCube blendShapes and skin in a
> > >> > > joint.
>
> > >> > > Now I want the script editor tell me who is the polyCube, but also 
> > >> > > the
> > >> > > blendShape and skincluster.
>
> > >> > > Who is the polyCube?
>
> > >> > > import maya.cmds as mc
>
> > >> > > sel = mc.ls(sl=True)
> > >> > > print sel
>
> > >> > > print sel
> > >> > > [u'boxone']
>
> > >> > > How to make python, script editor tell me who is the skincluster and
> > >> > > blendShape (already created)?
>
> > >> > > --
> > >> > >http://groups.google.com/group/python_inside_maya
>
> > >> --
> > >>http://groups.google.com/group/python_inside_maya
>
> > > --
> > >http://groups.google.com/group/python_inside_maya

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

Reply via email to