My plug-in is written in Python and built with RhinoCode, which generates C# command wrappers.
Setting a command’s type to Normal still generates a wrapper with CommandStyle(Style.ScriptRunner). Consequently, commands can nest: I start command A, type command B, and exiting B returns to A. I want ordinary behavior like Line/Move, where the second command cannot start.
The available settings seem to give me either transparent or ScriptRunner behavior, rather than ordinary commands.
Our workaround is a build postprocessing step using Mono.Cecil to remove the ScriptRunner flag from selected wrappers before packaging. This works in our tests; those commands use RhinoCommon directly and don’t call RunScript.
Is this workaround safe, or does RhinoCode require ScriptRunner for an internal reason? Is there a supported way to disable it, or am I playing with fire?