Hi, working on a python script that makes use of UI.Custom.GetObjects()
During the GetObjects() command, if the user hits scape button, I get GetResult.Cancel
If the user clicks mouse right button, I also get GetResult.Cancel
Could someone give me some guidance on how could I know which key the user used for cancelling the command?
I’m having a very weird problem with methods from NodeInCode Namespace. With any of them. They stop working for an Unknown reason, if and only if, a method from that namespace is called after the user cancels a command using ESC button. Everything works fine if command cancel is triggered by right mouse click, or hitting Enter… until the user uses ESC button.
From that point in advance NodeInCode methos stops working even if I use them in other python scripts, as long as i’m in the same Rhino session.
I’m aware that the case i’m describing is quite alambicated, and probably difficult to replicate in other circumstances. It’s part of a larger script, some MAYBE there is some important detail that i’m not explaining to depict the condition for the error to happen, but i’m quitec confident that the description isolates the problem. SO, I will not expect that mcneel will try to solve this “weird behaviour”.
It would be enought for me to know how I can be aware if a “command cancel” has been triggered by ESC click, so I can prevent the code to follow from the problematic logic branch.
Any advice will be welcomed. Apologies if the question is confusing, I did my best.