PDA

View Full Version : Last polygon created index number



Kevin Kipper
02-15-2008, 02:02 PM
How can I determine the last polygon index number created after I've run a command sequence like the extrude command?

For example, if I extrude a 4 point polygon the new geometry creates 5 new polygons. I need to be able to select the last polygon created in order to manipulate it further.

Thanks!

Kevin

evenflcw
02-16-2008, 03:11 PM
How many polygons you got? PolyNDX coincides with order of creation so the last polygons index is the same as the (global) polycount. Ie, if you had 4 polygons, then beveled 5 out of those, index 5 through 9 are those last 5.

If you want the ID then just grab it of the last element in the polygons[] array generated from editbegin();

Kevin Kipper
02-21-2008, 11:29 AM
Thanks! That got it!