Grasshopper

algorithmic modeling for Rhino

I am writing a custom upgrader for some obsolete components in my assembly. I am calling GH_UpgradeUtil.SwapComponents, and then adding a few additional parameters. What I notice is that after upgrading, the component cannot be clicked/dragged from the param side that has been updated - only from right in the middle. Its wire color also remains green even on deselect. I've tried calling ExpireLayout and ghdoc.DestroyAttributeCache, to no avail.

I also noticed that the problem is not just my own - it is present when upgrading the CleanTree_OBSOLETE component to the current clean tree. 

Views: 237

Replies to This Discussion

Yup, I can see the problem with the Clean tree upgrader. Investigating.

So it's probably a bug, but it can at least be solved by calling GH_Component.Params.OnParametersChanged() when you're done with the swapping/adding of parameters.

I'm not entirely sure when I can call this myself, because I have to do so after any client code has modified the parameters, but I'll try and find a good place.

I found a good place to fix the parameters, but since there will no longer be releases for Rhino5 you may as well put that OnParametersChanged() call in your upgrader.

Thanks David, that worked great.

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