Deleting Attribute User Text Values from Properties GUI (bug?)

Hi McNeelies,

Just started testing and implementing Attribute User Text and so far it seems quite revolutionary for adding information directly onto Rhino objects! One thing that keeps tripping me up though, is that when one deletes the string in a Value field this deletes the Key as well:

I understand that key/value lists can’t have empty entries, but perhaps you can “reset” the deleted entry to a space symbol again? Similar to how “empty” values are filled out with a space symbol automatically when your first make a key?

Edit: Oh this is actually more serious, even if one enters a space symbol in a Value field (i.e. to “delete” the value), this will also delete the Key! Perhaps an empty Value field should have a more explicit/visual placeholder, like a dash? Or empty fields should be allowed, having Null/None or something behind the scenes?

Best,

Anders

2 Likes

Hmm, interesting.
I consider this a bug. I hope it is not designed like that.

Its even hard to make blank text.

This is how it works with scriptsyntax. When you set a value to ‘’ (empty string), the key gets deleted.

I know that is how it works behind the scenes, what I’m saying is that the Rhino GUI experience is not super intuitive and objectively broken (i.e adding a space symbol as the value will delete the key, even though values are instantiated as space symbols in the first place).

I’m not sure how this is relevant. Can you elaborate?

Yeah, one can also argue why even empty string is not allowed.
In my opinion it should be allowed. Just like in a dictionary you can set a value as empty string so it should be with UserText attributes.

But yet again, there is UserDictionary attached to each object, perhaps in your case @AndersDeleuran you can use the dictonary? Alas, that doesn’t have a UI panel. Another thing I wish to see implemented.

The focus of this topic is the UI/UX of the Attribute User Text Properties panel (and how it might be a bit broken/inconsistent). This is obviously related to how one get/sets UserText behind the scenes (i.e. through code/scripting), but focus please :wink:

1 Like

Yes, but UserDictionary is UserText on boosters, allowing the things you need. the problem stays it allows empty string but UI/UX is completely missing there.

Then you will have float/int/any type as value. I’d be completely fine if they copy/paste the code of the UserText panel and create UserDict panel. This will solve all issues.

Having UserDictionary exposed through GUI would definitely be powerful.

But for now I’d just like to have deleted Values in the User Text Values panel be automatically replaced by space (or another symbol), which is how they are instantiated in the first place :man_shrugging:

2 Likes

@AndersDeleuran I meant to tell you that while you weren’t looking I fixed this in the WIP and will for v6 but a bunch of holidays got me sitting on the couch eating cookies and I forgot to mention it until now.

https://mcneel.myjetbrains.com/youtrack/issue/RH-56502

4 Likes

That’s terrific, thanks so much for the update @Trav :cookie:

RH-56502 is fixed in the latest Service Release

2 Likes