XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : MStringArray to MItSelectionList help(API)

09-09-2010, 01: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


09-09-2010, 09: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.

09-10-2010, 03: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.

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

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


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