Thumbs up!

On Thu, Apr 9, 2009 at 2:21 PM, chadrik <[email protected]> wrote:

> I committed a fix for this.  we'll roll it out with 0.9.1 which should
> include other component fixes as well.
> -chad
>
>
> On Apr 9, 2009, at 10:51 AM, Sylvain Berger wrote:
>
> Thanks for tips and info.  I kept investigating the issue and found out
> that the easier way was to convert the component list into raw string in a
> python list:
> import pymel as pm
> cube, hist = pm.polyCube()
> vtxList = [cube.vtx[0:1], cube.vtx[3:4]]
> pm.select(clear=True)
> # flatten the list and convert to raw string
> vtxListFlatStr = []
> for i in vtxList:
> vtxListFlatStr.extend([str(x) for x in i])
>
> print 'flatStr:', vtxListFlatStr
> pm.select(vtxListFlatStr)
>
> # I can always reconvert the raw string list in pymel nodes easily
> pynodeList = [pm.PyNode(i) for i in vtxListFlatStr]
>
>
> On Thu, Apr 9, 2009 at 12:31 PM, chadrik <[email protected]> wrote:
>
>>
>> Sylvian,
>>
>> this example *should* work, and it shouldn't be too hard to make it
>> work on our end, but in the meantime you can make this simple
>> adjustment:
>>
>> import pymel as pm
>> cube, hist = pm.polyCube()
>> vtxList = [cube.vtx[0:1], cube.vtx[3:4]]
>> print vtxList
>>
>> # the next line fails
>> pm.select(*vtxList, r=True)  # <-----expand the vtxList argument with
>> an asterisk
>>
>>
>> to put it more simply, this does not work (yet):
>>
>> pm.select( [cube.vtx[0:1], cube.vtx[3:4]], r=True)
>>
>>
>> but this does:
>>
>> pm.select( cube.vtx[0:1], cube.vtx[3:4], r=True)
>>
>>
>> i should have a fix for this in a few minutes.
>>
>> -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.
>
>
>
>
>
> >
>


-- 
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