Grasshopper

algorithmic modeling for Rhino

How does grasshopper handle classes in python or other scripting languages? Lets say I have sliders that control 10 different objects created by the same class. If I update one of the sliders, does it rebuild and rerun the entire script each time? Or is it more of a persistent state where I can detect the 1 change and just modify the one object by running a function in its class?

Obviously, if your objects are very computationally intense, it would be very beneficial to just be able to update single objects rather than rerunning the entire script each time.

Thanks!

Views: 352

Replies to This Discussion

As far as I know, all components (including scripts) recalculate completely upon any update of any input. 

I don't know how this works with python, but in a c# script you could conceivably use static objects outside of runscript and build some logic into runscript that tests for a changed value and only updates the objects when necessary. But I have never tried this and have no idea if it would work...

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service