I’m writing a set of tools in ghpython components (will be distributed as UserObjects). I’d like to imitate the behaviour of standard GH components that turn orange (“Component did not run…”) if not all of the necessary inputs have been plugged in (or Nones have been passed to inputs).
Currently I considered two options:
- error-catch everything (then the component stays grey, but this conceals a problem - the user might not notice that the output is Null)
- do nothing and let the component fail and turn red (this is also silly because it will be red as default when placed on the canvas).
Is there a way of controlling when to “run” the component in ghpython (either procedural or SDK mode) ?
Or is there another workaround to turn components orange?
Many thanks for any hints