Optional Inputs for Hops Components

Thanks Andy!

@Frusciante @Laoky @William_Curwen @James_D @Kyle_Vansice Hey guys. I just wanted to let you know that I just published a new build (0.16.11) that has two new fixes/enhancements:

  1. (Compute-294) Added a new feature to Hops/Rhino.Compute which will create optional inputs if the AtLeast value of that context get component is set to 0.
  2. (Compute-295) Fixed a pretty important bug pertaining with how default values are handled for inputs. Previously, only a select few parameter types were supported and only if the data contained a single value and was set persistently. Now, almost all parameter types are supported (except for Model Objects which is coming), and you can supply any data structure that you want (ie. item, list, or data tree). This should make many definitions much more usable.

Please download the latest version (0.16.11) via the package manager and let me know if this solves your problems or if you run into any issues. Cheers.

5 Likes

This is HUGE thank you. This was what was preventing me from using hops. Now I’ll give it a proper go again. Thank you @AndyPayne

1 Like

Let me know if you run into any issues. We’re still working on supporting Model Objects which will likely involve a slightly different way of serialization than what the raw geometry types use… but I think we’re pretty close on that as well.

This is the main thing I’m really waiting for. Ive leaned heavily into the Model Objects workflow with great success so far so I’m definitely excited for HOPs support there.

Also local compute Mac OS hops support is my last wishlist item :upside_down_face: for the sake of cross compatibility

Nice! Thankss Andy, really appreciate it!

Hi Andy,

I just tested out the new HOPs, but the optional parameters don’t seem to work. I don’t know if I missed something on how to operate, but I’m pretty sure I did everything, here is a video of me testing it.

I already uninstalled and installed HOPs, so I don’t know if it has anything to do with my understanding of how it works.

Also, the latest version that the package manager allowed me to download (v0.16.2) is not the one that you mentioned (0.16.11), which in fact doesn’t show in the package manager. Maybe it has something to do with that?

Here are the grasshopper files if you want to test them out:
RunHopsDemoFile_v0.01.gh (7.0 KB)
HopsDemoFile_v0.01.gh (4.4 KB)

It is working as expected. Meaning, the GetPoint input is being treated as “Optional”… otherwise, you’d be getting a warning that said “GetPoint input failed to collect data”. Instead, you’re getting a warning that says "Input parameter P failed to collect data: component “Curve Closest Point”. You’re getting this error because you’ve connected a Curve Closest Point component to the Get Point context get component. The P-input on the Curve Closest Point component is not an “Optional” input… so it’s throwing a warning saying that this input failed to collect data. This message is then bubbled up through the system and displayed on the Hops component to tell you that something is wrong in the underlying definition that you’re trying to solve. Does this make sense?
Just because you made the GetPoint input Optional, stuff downstream can still throw a warning/error if nothing is collected.

2 Likes

Hi Andy,

Thanks for the reply. I get what you are saying, but what I see in my grasshopper dedinition is not "Input parameter P failed to collect data: component “, it actually says that “GetPoint input failed to collect data”.

I don’t know why the video didn’t show, I made sure to pass the mouse to show the messages, but something glitches with the video recording.

Here is a screenshot of what I get:

Anyways, if you take a look at the definition inside the HOPs, you’ll notice that I have a stream filter depending on the state of the point, if the input is empty, it should return the mid-point of the curve, but as you can see on the previous demo video, that output doesn’t give anything.

Perhaps grasshopper is not loading the correct version of HOPS? I’m not sure how to check this, but if it works for you, maybe this is the case. Not sure, just brainstorming.

You should be able to see if you have the latest build of Hops by using the Package Manager (see image below).


Also, this is what I see when I open your file using the latest build of Hops.

Lastly, you’re Stream Filter component is happening downstream of the Curve Closest Point component… so the warning is being generated by the Curve Closest Point component which is being solved before the Stream Filter component.

I understand Andy, it is not my main definition, it is just a demo file that I made for debugging. I understand the stream filter is not optimally used.

Anyways, maybe the issue might be that you only made these changes available for R8, because the versions that I see are different from the ones you show, as I stated before there is no version 0.16.11 on my package manager, as shown below.

Can you confirm the issue lies with my rhino version? Also, if it does will it be available for r7, or it is a exclusive function for r8?

I have started to long at this post, just to confirm that this is the issue. LOL! I saw the date of the update, and since it was around August, I kind of it was the new update, but not I see it was August of 2023. So, I think it is safe to assume there are no plans to update R7’s HOPS. Thanks for your feedback, Andy!

Correct. Yes, all of the most recent changes to Hops have been focused on using Rhino 8… so, yes the latest versions are really only compatible with Rhino 8.

1 Like