Results 1 to 7 of 7

Thread: How to detect order of points selection?

  1. #1
    Child of time Nitisara's Avatar
    Join Date
    Mar 2004
    Location
    Ekaterinburg, Russia
    Posts
    597

    How to detect order of points selection?

    Hello!

    Interesting, is there any way to detect order of points selection in Modeler? For example, I want to know which point was selected first, which was selected second, and so on...
    Programming is a hard process of bugs creation, and then even harder their elimination.

  2. #2
    Valiant NewTeKnight Matt's Avatar
    Join Date
    Feb 2003
    Location
    San Antonio, Texas, USA
    Posts
    13,054
    As far as I'm aware the points[] array has them stored in the order they were selected.

    So ...

    // Total points selected (in order)
    selected_points = editbegin();

    points[1]; // First point, not '0' as you would think (unless I'm wrong, but my scripts seem to work with this being so)

    points[2]; // Second point etc.

    points[selected_points]; // Would be the last point
    Last edited by Matt; 02-13-2006 at 12:27 PM.
    UI / UX Designer @ NewTek
    __________________________________________________
    www.pixsim.co.uk : LightWave Video Tutorials & Tools


  3. #3
    Child of time Nitisara's Avatar
    Join Date
    Mar 2004
    Location
    Ekaterinburg, Russia
    Posts
    597
    Thank you Matt for reply!

    Although in LScript it works a bit different, but your example pushed me to test pointScan() function, which really returns points IDs, beginning from selected points, and in their selection order.

    Programming is a hard process of bugs creation, and then even harder their elimination.

  4. #4
    Valiant NewTeKnight Matt's Avatar
    Join Date
    Feb 2003
    Location
    San Antonio, Texas, USA
    Posts
    13,054
    Doh, I forgot you code in C!!!

    Glad it nudged you in the right direction though!
    UI / UX Designer @ NewTek
    __________________________________________________
    www.pixsim.co.uk : LightWave Video Tutorials & Tools


  5. #5
    Member PICTRIX's Avatar
    Join Date
    Jan 2005
    Location
    Nerima, Japan
    Posts
    299
    Hi ,

    PointScan() teaches the first the selected point the first.
    It teaches in selection the order.
    It might be the order of making when there is no selected point.

  6. #6
    Child of time Nitisara's Avatar
    Join Date
    Mar 2004
    Location
    Ekaterinburg, Russia
    Posts
    597
    Quote Originally Posted by PICTRIX
    Hi ,

    PointScan() teaches the first the selected point the first.
    It teaches in selection the order.
    It might be the order of making when there is no selected point.
    Hi PICTRIX san!
    Exactly! When something is selected, it goes selected first (in selection order).
    Programming is a hard process of bugs creation, and then even harder their elimination.

  7. #7
    Member PICTRIX's Avatar
    Join Date
    Jan 2005
    Location
    Nerima, Japan
    Posts
    299
    Yes.
    Only the number of selection points is scanned in the order.
    Afterwards, it is point information on the remainder.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •