Manipulating with one object from the active SelectionList


#1

Hi everyone,

I have a question, if I can manipulate with only one object from the active selection list? For example, to get it from the selection list and add to a new selection list.

I have a method which “takes in” a dag path (mdagPath) and a selection list (slist). And here I try this but it doesn’t work:

MSelectionList newList;

	MItDependencyNodes it(MFn::kMesh);
	while(!it.isDone()){
		newList.add( it.item() );
	
		it.next();
	}

	
	MGlobal::setActiveSelectionList(newList);

I am trying to do this because I want something to be done with the objects in the scene one by one when several of them are selected. So I decided to try to divide the selection list in two different ones.

Sorry for my English.
I am grateful for any help.