I'm currently working on a tool for which I need to use cmds.scriptCtx(), or some other equivalent function that I may be overlooking. I'm having trouble figuring out how to make it work for a multiple selection. My own code is irrelevant, as I haven't got anything to work yet. Obviously, you can increase the totalSelectionSets flag to a high number, BUT I'm looking for a way to select an unlimited number of objects in a scriptCtx like tool; it could be 2, or 2 million and 2. The user would decide. I know this isn't too difficult, I'm just missing a piece of the puzzle.
Another issue I'm running into is getting the ENTER key to close the tool. Is there a flag that forces the acceptance of the ENTER key to exit the tool that I'm missing?
There's not much documentation on scriptCtx, so I'm wondering if anyone has any examples of a working 'multi-selection' tool that simple retrieves a list of objects by a users selection. I'm also not talking about cmds.ls(sl=True), either, I'm aware of how to preform simple selections. I am trying to have the tool already active and allow users to select the objects they want to effect when prompted by the tool. Hence my use of cmds.scriptCtx().
Thanks in advance if anyone's got a straight answer to this. I certainly appreciate it.