All components display as "Old"

I just installed Rhino WIP and Ladybug Tools 1.6.0. However all component icons have an “old” patch on them as though they are outdated. What gives?

This may be more of a question for someone on the McNeel team like @piac or Esthan, who have been revising the python environment used in Rhino 8. I know that there’s been a big refactor of Python integration with Rhino 8 in order to support cPython and not just IronPython. I imagine that the “Old” label is coming from the fact that all of the existing LBT 1.6 components are made with the Rhino 6/7 IronPython component. I would guess that the “Old” components still work but someone from McNeel might be able to confirm. (CC: @wim )

Let me also clarify that we have not tested Ladybug Tools in Rhino 8 WIP yet so you do so at your own risk until we release a stable version that is officially compatible

1 Like

Thanks for the input, Chris. I guess it’s because Rhino WIP doesn’t like using GHPython 2.7 components. I managed to at least remove the “old” label by going into the Grasshopper preferences and unchecking the box in Display > Interface > Overlay Graphics > Display Obsolote.

1 Like

Hi -

That’s correct. The “old” label doesn’t do anything else than letting the user know there’s a new component available.

No, those GHPython 2.7 should work just fine in Rhino 8.

A few releases ago, you could still choose between different editors:
image

In the current WIP, the legacy C#, GhPython, and VB script components have been hidden:
image

… but you can still create new instances of those legacy components by using the # prefix:
image

-wim

3 Likes

Thanks, @wim . This is really good to know and I’m sure this will prove helpful as we migrate the components from GHPython/IronPython to the new cPython component.

Do you have any recommendations if we want to be able to do releases of Ladybug Tools that are compatible with both Rhino 7 and Rhino 8? Should we just keep using the legacy GHPython component until the majority of the community switches over to Rhino 8? Or would you recommend just doing separate releases for Rhino 7 vs. Rhino 8 and we’ll find some way to export both a GHPython and cPython components from the same source?

Practically all of the source code inside the current LBT components was written to be compatible with both Python 2.7 and Python 3.7-3.10. So exporting both components from the same source isn’t terribly challenging for us. But it’s still more work than just using legacy GHPython for the time being.

1 Like

Thanks @wim, the #ghp trick is neat.

@chris, anectodally, from working with LBT 1.6.0 for the past few weeks in Rhino 8 WIP, I haven’t had any issues, so sticking with the GHPython approach for now seems reasonable.

1 Like

@chris OK, just FYI, now I did in fact start running into issues with running Radiance from within Rhino 8 WIP Grasshopper…

Hi @chojje ,
Do you want to open a new topic for the Radiance issues you’re experiencing? We’d also need the exact error message in order to be of any help.

Hi @chris, I’d be happy to do that if you are actively troubleshooting issues with Rhino 8 WIP portability. For my purposes sticking with Rhino 7 is fine, I was just interested to push Rhino 8 testing until it broke, and now it finally did :slight_smile: Let me know if you’d be interested in the error reports at this stage.

Hi @chojje ,

We are definitely interested in knowing all issues with Ladybug Tools in Rhino 8. We may not be able to fix all of them immediately but they will all get fixed eventually. Knowing what’s not working will help us fix things sooner and, if the issue is with Radiance interactions, this issue may not be specific to Rhino 8 and we may want to get it fixed now.

Hi Chris -

Ehsan is back from vacation now and has some ideas on dealing with that OLD label. I’ve added a YouTrack item so that this doesn’t get lost → RH-76151 Grasshopper: Allow removal of OLD label on legacy Python script components
-wim

Thanks for the update, @wim . I’m looking forward to hearing Ehsan’s thoughts.

I added a new method to the base component that can toggle the Old/Legacy flag on or off

.ToggleObsolete()

Python Example:

import ghpythonlib as ghlib

c = ghlib.component._get_active_component()
c.ToggleObsolete(False)

CSharp Example:

((dynamic)Component).ToggleObsolete(false);

ToggleObsolete.gh (3.0 KB)

1 Like

Thank you @eirannejad
This works beautifully.

1 Like

For some reason I only get huge number of warnings whenever I import ghpythonlib.

It started to do this sometime last year in Rhino 7. Before that no problems. Because of this I had to modify all Python components and to not use ghpythonlib at all. Is there a solution for this?

That one might be a better question to ask on the McNeel forum, @LAH .

Not that we don’t have a few people from McNeel checking this forum but you’ll probably get a response faster over there. The one thing I can say that might help is that I know that we have at least 2 components that import modules of ghpythonlib. Here is one example:

And I can tell you that these components are working fine for me in Rhino 8.

1 Like