I have a script that builds and then selects a few objects.
Then the user has to be able to deselect some of the already selected objects.
Currently I use a workaround.
But I’d like to learn how to do that in a more straightforward way if possible.
That is: How can I make the user able to deselect already selected objects ?
( I tried running Rhino.Input.Custom.GetObject on the selected objects, pushing Ctrl to deselect, but it did not work )
maybe u could try using internal rhino command through rs.Command(), for example,
rs.Command("_SelBrush") could solve your problem, or check out rhinoscript FirstObject(), NextObject() commands
I’ve meant this which seems to work when used in conjuction with Rhino.Input.Custom.GetPoint to check if the CTRL key was pressed while a point was picked, but you are picking objects…
Here is another way to do this - with RhinoScript.
It uses an external HTML file that allows to run a script within a script to pre-select objects while at Rhino.GetObjects prompt.
The sample HTML file should be saved in C:\ root folder for testing but with a bit more code it could be created on the fly by the script calling it. With this method, the deselection happens same way as in Rhino (with CTRL), also allowing for multiple object deselect.