Grasshopper

algorithmic modeling for Rhino

Clustering a [Python] Component: Input Access Does Not Change

Hi all,

I may have ran into a bug (or maybe I'm missing something). Please forgive me (and direct me to the discussion) if this is a known occurrence.

I'm using a [Python] component's inputs as the inputs of a cluster. I noticed that one can assign the input's access via the cluster component, exactly as if it were a scripting component.

However they don't seem to communicate with each other; when I change the cluster input's access it does not change the associated [Python] input's access.

I've tried to illustrate this below. I've attached the file shown in the image. Any ideas?

Best,

/SPM

Views: 887

Attachments:

Replies to This Discussion

Hi Stephen,

you just encountered a problem with the automatic creation of clusters.

This user interface (UI) is shown, but it clearly does not make any difference. The 'Access' choice is shown because it is automatically created by the cluster selector algorithm. It re-uses parameter types from the script, so the parameter UI with 'List Access', etc is visualized. If you create the cluster by using cluster input and cluster output, and appropriate parameters, then the buggy interface is not shown.

Were you trying to solve some particular issu, or just reporting a bug?

Thanks,

Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

Attachments:

Thanks for the reply and explanation, Giulio.

I understand that the cluster inherits the UI via the automatic creation; I was hoping this feature was a functional one!

I'm happy to report a bug, but am specifically looking for the ability to change the 'Access' Param for any given variable input without diving into the cluster. See below for what I mean.

I'm going to take a stab at a script that tries to do this.

I would really strongly suggest not to do this.
What problem are you trying to solve with this?

Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

Ha. I suppose "curiosity" won't fly in this case, will it?
To explain said curiosity: I have a cluster component that uses a mix of inputs (some are native GH component inputs, others are Python inputs). The Python script formats its own variable inputs and the 'Access' Param is crucial to the output. I'd like to be able to switch between the three options seamlessly. I hope this makes sense.

Curiosity is fine. :)

I see two issues though:

  • you are leveraging the Python UI outside, on the cluster, which really is just a bug which has real reasons to exist, but is really still just a bug. If you use other means, like that switch, then, maybe...
  • changing anything that affects solution solving is non-acceptable behavior during a solution. It is possible to do it, though. Only in UI that is outside the solution chain (basically, stuff like Galapagos or custom forms flying on top of everything).

So, if your goal is to explain students/an audience the difference between Item Access, List Access, and Tree Access, I would suggest to just include three components. If you really need the cluster thing, then, in the cluster, add three scripts and switch them on/off in scripting depending on what you are trying to do. You can then have a fourth script that selects the proper output, or use some normal Grasshopper components.

Would that work?

Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

Curiosity did kill the cat, however. Haha.

What you wrote above all makes sense. I heeded your words of wisdom and found a work-around for what I'm trying to achieve. See below for the personal User Object I'm working on; hopefully it illustrates why I was hell-bent on having direct and easy access to the 'Access' param.

I can imagine I'll start to run into issues once the initial tree is a messy one (i.e. has branches with different path lengths, etc.). I'll cross that bridge when I get there, I suppose.

I did try to change the 'Access' param via Python scripting but couldn't really get it to work. I'll keep at it.

Thanks for the help,

/SPM

Hi again Stephen,

this is how I would approach the never-met-before case of needing to deal with datatrees, lists and items at the same time.

I hope this helps,

Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

Attachments:

Oh, man. I wish dealing with all three was never needed, aha.

Thanks for the script, Giulio. I ended up doing something similar in one code by making the 'Access' switch a boolean toggle (I was only using 'List Access' and 'Item Access', so it suited my needs).

Your method is very slick; thanks!

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