UserData nested dictionarys + references



I just accidentally discovered the automatic reference-creation when creating custom User Data through GH components. Unfortunately, it was doing it to strings I was passing into the CUD, and therefore breaking things on the other side which were expecting a certain dictionary layout (instead of == string, it makes == another dictionary).

The same thing happens with number values. I.e. integers will be made into reference types, pointing to the first instance of that value. This is needlessly heavy if there are large dictionaries with boolean or integer properties, and can cause confusion.

For larger objects it makes a lot of sense.

IMO basic types (numbers, strings, booleans) should bypass the referencing. Could this be toggle-able, at least?

To illustrate the point, in the below example, zone is a property with value 1, material is a dictionary with name as a parameter, which is also 1. name is instead turned into a reference.



That’s a buggity bug. Let’s move this to github on SpeckleRhino repo!