PDA

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


Borgus
06-06-2007, 11: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;
MGlobal::getActiveSelectionList(mySelList);
MDagPath myDagPath;
MItSelectionList iterateOverSelection(mySelList, MFn::kEdgeComponent);

for( ;!iterateOverSelection.isDone(); iterateOverSelection.next()) {
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! :)

kjaft
06-06-2007, 01: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.

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

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