Does anyone know if there is a way to get component connected to a cluster input using python scripting in grasshopper? What I’m trying to do is to get the actual component from within the cluster by retriving component connected to the ClusterHooks
I know I can get a component connected to the scripting component itself using the following.
input_params = getattr(ghenv.Component.Params, "Input")
input_indx = 0
connected = list(input_params[input_indx].Sources)
I thought I can do something similar by getting the parent cluster the scripting component is in by retrieving the owner component which returns the cluster
comp = ghenv.Component.OnPingDocument()
owner = comp.Owner # cluster element if it's inside
and tried calling if I can retrieve the input. But it seems like, GH_Cluster does not expose its inputs directly like a normal component (Params.Input) for me to retrieve the Sources . Does anyone know how I might achieve this? Any input is greatly appreciated.