View Full Version : plugin-question: how to query selected edge-components

06 June 2007, 10:46 AM
hello! i want to modify the selected edge(s) when the command is running but how can i querry the selected components of a poly object?

MSelectionList mySelList;
MDagPath myDagPath;
MItSelectionList iterateOverSelection(mySelList, MFn::kEdgeComponent);

for( ;!iterateOverSelection.isDone(); {
iterateOverSelection.getDagPath(myDagPath); //i only get the path of the object, but not to the component :(
//here i want to run through my selected edges, but how???

or is there a general brainbug??
please help me! :)

06 June 2007, 12:07 PM
Use iterateOverSelection.getDagPath(myDagPath, myEdgeComponentObject)where the second parameter is a MObject that will return access to the components. Then u can use MItMehsEdges. Look into the convertEdgesToFacesCmd.cpp devkit example on how to do it exactly.

06 June 2007, 12:12 PM
cool! thx a lot! that will help me.

CGTalk Moderation
06 June 2007, 12:12 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.