speckleworks/SpeckleRhino

GH Receiver maintain wires when switching streams

djsiroky opened this issue · 0 comments

Step 0:

Expected Behaviour

When switching stream IDs for the Grasshopper DataReceiver node, it would be nice if any wires from the output side were maintained, either by the position of the output param or the name.

This would be useful if selected between multiple streams (like in the example below), or if using a template script that the user would input with their own stream.

Actual Behaviour

When switching, all wires are disconnected:
speckleWires

Affected Projects

Don't think so

Reproduction Steps & System Config (win, osx, web, etc.)

  • Generate multiple streams, copy their IDs to a panel
  • Select one of them using your favorite nodes and pass it to a DataReiceiver
  • Wire up the output to some other favorite node
  • Switch which ID is being passed to the receiver
  • ------

Win10, Rhino6

Proposed Solution (if any)

@didimitrie from Slack discussion:

one of the things we talked with @daviddekoning, @mishaelnuh, @teocomi, etc. and more was to essentially have the receiver have one output only, and then another component that would allow that output to be broken down by various things, like layers (original input ports), object type, or other props.

Alternatively, it appears (based on a quick look at GhReceiverCoreClient.cs) that some amount of checking for param names and updating instead of deleting all and re-adding occurs when you are refreshing a stream. I wonder if that approach could work when changing to a new stream. So if your old stream had output params [A, B, C] and the new one has [A, D, E], param A is kept and the rest are deleted/re-added.