Grasshopper

algorithmic modeling for Rhino

Synchronize the input parameters of a custom component?

With a component with multiple input parameters, the script runs whenever any of the input parameters changes. Is there a way to build some sort of delay into the component so that it "waits" for all the input parameter changes before running? For example, if I attach a slider to a custom component, then also attach that slider to some sort of geometry which is passed to the component, the component gets triggered twice in rapid succession if the slider is changed. I figure only 250ms or so would do the job?

Views: 599

Replies to This Discussion

You can probably do this by using a Boolean gate component to stream data. I.e if all true then stream to gate 1 connected to ur input parameters of a down stream component otherwise send to gate 0.

Hi Jeff,

 

that shouldn't happen. When a slider changes it wipes everything that depends on it, and only then recomputes a single time.

 

The slider tends to give off two events when you use the double-click-text-mode, but that's a bug that I'll fix in the next release.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Hi David,

 

the slider component still seems to fire an update event twice (independent of whether I slide, double-click or use the "edit" window).

Is there a way round this? I guess I could write a custom component which recomputes only when the input value (coming from a slider) changes, but is this something that could be "fixed" within the slider component? This was tested on GH 0.9.0061.

 

Thanks,

 

Daniel

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service