If true then press button

Hi, just wondering how to set up a button like the way topic described?

“If true then press button”

I do not think that you can set up a button, but you can allocate the boolean commands, True or False. With the boolean outputs, you can control the value or outcome.

if a ==0:
   b = True
else:
   b = False
1 Like

Hi @ctu6

There is already a native grasshopper component called STREAM FILTER

Regards

1 Like

Hi @vijesh @bbalbastre

What I meant “Button” is something that can output T when pressing and return False when release.
Function like pressing a native GH button.

In other words, something “can tells the component to press the button”.

Are you referring to setting a toggle to “True / False” more like control the toggle from a boolean output? Take a look at metahopper.

1 Like
if a ==0:
   b = True
else:
   b = False

It is possible to add a timer to this script, so the True value of the output to be toggled only for one second and after that to revert to False state? Thank you.

This is one of the discussion which I had it here, you can refer to it.
https://discourse.mcneel.com/t/how-to-run-a-ghpython-infinite-while-loop-with-timer/167900

Unfortunately it is not what I am looking for. I just need a script that can switch to True only for a second every time it is receiving a NEW True value to his input. I want to use this as a trigger for a bake component, so when new geometry it is created to bake the result and to don’t remain the trigger locked to produce a continuous bake state.