PDA

View Full Version : MStringArray to MItSelectionList help(API)


steph24
09-09-2010, 02:43 PM
Hi !

I'm a very beginner in API realm, so i can not solve my problem:
I iterated throu my active selection(and it's child shape nodes) and put the reasult into an MStringArray(all the child shapes are there).
I want to pass this list to an MSelectionList to use the MItSelectionList for iteration.

how can i convert my MStringArray to MItSelectionList ?

Could anybody help in this topic?
thanks in advance

S.

kattkieru
09-09-2010, 10:40 PM
MSelectionList has a .add() function to add objects by their name. All you need to do is loop through the MStringArray and .add() each entry to the selection list.

But instead of iterating through the active selection and storing it in the MStringArray, then converting, I'd just store it in a second MSelectionList.

steph24
09-10-2010, 04:18 PM
Thanks for the answer, I used the MSelectionList method az You suggested and it works now.(and the API become clearer to me step by step :))
thnak You again.

steph24
09-10-2010, 10:43 PM
Hi !

Thanks for the answer,I used the second method You suggested and it works like charm.
Thanks again

S.

CGTalk Moderation
09-10-2010, 10:43 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.