PDA

View Full Version : [PYTHON] the unicode thing


Luckycat
12-03-2010, 04:23 PM
Hi,

Pretty noob question here ...
I searched the forum about the u type appearing in string arrays after a resulting command such as ls ... but I didn't find an answer ...
As the resulting array can not be used in another maya command, for example :
curObj = cmds.ls(selection)
sets('mySet',edit=True,forceElement=curObj)
#but accessing the array by elementis working
sets('mySet',edit=True,forceElement=curObj[0])

How do you use the resulting array?
In my example, do I have to loop and fill my set with the elements of the array or is there any simple method?
Thx
Sam

mduvekot
12-03-2010, 06:09 PM
Here's an example http://www.thnkr.com/wiki/index.php?title=Editing_set_membership_in_Python


You problem is that you're trying to use a list as the name of the set; forceElement operates on the set name and not the list.

CGTalk Moderation
12-03-2010, 06:09 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.