Hi guys,
I just wondered if its possible to set Hops inputs as optional so that the component runs without every input set.
I also noticed there is no option to turn off parallel computing when inputs are trees.
Did I miss something?
It is possible in theory - but buggy at the moment. It works with Number and Integer parameters but I can’t get it to work with Vector inputs etc.
Should you want to try it yourself, you can pass optional=True
as an argument when creating the param.
hs.HopsNumber("Values", "V", "Optional values", hs.HopsParamAccess.LIST, optional=True)
@stevebaer maybe you could take a look at this. It would be really nice to have optional inputs working for all param types.
alright I see.
I worked around this for now by passing in a serialized json containing all inputs
Are you having Hops call a separate grasshopper definition or is it calling a ghhops-server python script?
it’s calling a grasshopper definition
Parallel computing is always on for hops components. You don’t get an option to turn this on/off as it really should not be disabled with hops.
I see that Hops is currently not working with geometry as default parameters and will see what can be done to make this work. Other data like points, numbers, integers, and strings should work. If you feed data into the “Get” components, that data should be used as the defaults when called from Hops.
I added this to the issue tracker for Hops at
Hi @stevebaer
I am running into the same issue here. And at least for me, just by making the input “optional”, it would solve the problem.
I mean, when setting up the “At Most” field of the “Get Geometry” equal to 0, that would make that input optional. Because that doesn’t work in the moment either.
Does it make sense?
That makes sense. We may be able to inspect the “At Least” property and if it is set to zero inform the system that the input is optional.
How’s the inspection comping along?
Have the same issue, @victorwanderleyb did you manage to find a workaround? I tried to even put a dummy object into the gh file and upon loading with hops, the dummy object was gone, so that didnt work either…
Not really Karim. Had to adjust my workflow in an annoying way.
Still very much wanted here!
Any update on this issue? Is there any way to allow a geometry input to be optional so that component still runs even if no input is provided for a specific parameter?
Optional hops inputs. I also want it. Should I make a new thread @stevebaer ?
Hello, just jumping on the thread to add another request for optional hops inputs (for my use case this would be more useful than default geometry)
Hi, same here, would be really helpful. Default values would also help. Are there plans for this ?
Hi, I would also really love this feature! Glad I am not the only one.
I have created a YT (Compute-294) to be able to track this issue. Thanks for bringing this back up as I had not seen this request before. I’ll see what I can do.