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 <chadver...@gmail.com> 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 <vitaummprima...@gmail.com>
>>
>> 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 <chadver...@gmail.com> wrote:
>> > I think you are looking for the mc.listHistory() command.
>> >
>> > Chad
>> >
>> > 2010/8/12 Vitor Lôbo Ramos <vitaummprima...@gmail.com>
>> >
>> >
>> >
>> > > 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