speckleworks/SpeckleRhino

Query Speckle Object component update

Opened this issue · 2 comments

Step 0:

(Note that @megankarbowski is actively working on resolving this - this issue to solicit feedback and see if there is any interest in merge it into the main repo.)

Expected Behaviour

We expect the Query Speckle Object component to be able to query all of a Speckle Object's properties, not just the custom properties in the properties key.

While the top-level properties can be accessed via the Expand Speckle Object component, the order of these properties is not guaranteed, and the component is huge. Being able to access all the properties / keys of a SpeckleObject will allow us to build more robust workflows (that don't depend on a particular order of outputs).

Actual Behaviour

You can only query keys inside the properties dictionary.

Affected Projects

This is a grasshopper specific issue.

Proposed Solution

We propose to modify the Query Speckle Object component to start looking for keys at the top level of a Speckle object. This means that definitions that use the existing component would have to update their input path to add properties. at the beginning.

for example:

desired key old path new path
properties.volume volume properties.volume
type (not possible) type

Alternatively, we could make this a new component with a slightly different name and hide the other component.

This looks like a quite welcome improvement, and it's good feedback for 2.0 too. Happy to have it come upstream!

I'm conservative when it comes to possibly changing the behaviour of an existing component, as things can break in subtle ways...

Alternatively, we could make this a new component with a slightly different name and hide the other component.

This is probably the safest option for everyone! The old component can be hidden and marked as deprecated - which means that old definitions relying on it will work as before, but going forward the new one would be used.

PS: Seems it's a matter of just renaming the old class, continuity is ensured by the component's guid.

Thanks, @didimitrie, sounds good.

If I understand the procedure correctly, this means that we should

  1. Rename the old QuerySpeckleObjectComponent class to QuerySpeckleObjectComponent_OBSOLETE without changing the GUID
  2. Set the exposure of the QuerySpeckleObjectComponent_OBSOLETE class to hidden.
  3. Create a new class called QuerySpeckleObjectComponent with the new behaviour and a new GUID.

@megankarbowski - looks like we have a way forward