Home Technical Talk

MaxScript-Maintaining Selection Order

polycounter lvl 9
Offline / Send Message
r_fletch_r polycounter lvl 9
Is there someway of maintaining the order of selection when working with epoly sub objects. By my understanding bitArrays cant do this becuase of how they are structured, only telling you whether a subObject is selected and not in what order.

Im not really relishing the idea of having to do this manually with callbacks

Replies

  • SyncViewS
    Offline / Send Message
    SyncViewS polycounter lvl 13
    Hi, as far as I know the only way to keep track of the sub-object selection order is to use callbacks, in particular node-event callbacks introduced in 3ds Max 2009. For backward compatibility I never used them, the limited workaround could be to run a component like the PainterInterface, the MouseTrack function, or maybe even a MouseTool, keeping track of each click, writing your own selection code, based on the result of the intersection ray cast from mouse position in screen space with geometry in 3d space and store picked elements as incremental difference. I still haven't found anything better than this, which is far from simplicity. As you said sub- object selections are stored in BitArray, mainly to be much faster to compute and require much less memory than a standard int array, but they lose any other kind of information.
  • r_fletch_r
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    SyncViewS wrote: »
    Hi, as far as I know the only way to keep track of the sub-object selection order is to use callbacks, in particular node-event callbacks introduced in 3ds Max 2009. For backward compatibility I never used them, the limited workaround could be to run a component like the PainterInterface, the MouseTrack function, or maybe even a MouseTool, keeping track of each click, writing your own selection code, based on the result of the intersection ray cast from mouse position in screen space with geometry in 3d space and store picked elements as incremental difference. I still haven't found anything better than this, which is far from simplicity. As you said sub- object selections are stored in BitArray, mainly to be much faster to compute and require much less memory than a standard int array, but they lose any other kind of information.

    Thanks for your reply, I was thinking it would be something like this. It looks like its callback time :/
Sign In or Register to comment.