Colon ":" symbol truncates layer name

Hi,
I noticed there is an issue with colon in the layer name. After you save, and reopen the file, the first part of the layer name got removed. See below for different cases

Rhino6 on Windows 10
Version 6 SR19
(6.19.19295.1001, 10/22/2019)

Before | After save
image image

I would avoid using colons altogether in layer names, as a double colon :: is used to separate sub layers internally, so it might confuse the layer manager code.

Avoiding the problem is a always a good idea :smile:, but Rhino should do that for the user by not letting colons be used. Or internally store the colon symbol as a hexcode or something.

Btw Have you tried semicolon as a replacement?

1 Like

A colon is a character that one can see people wanting to use in layer names, so if McNeel need a separator it would be better to make it a more obscure character. Maybe the section sign § (U00A7) would serve?
And as @Holo says, disallow user access to that character when entering layer names.

(wishlist @pascal)

Not going to happen. Changing the sublayer separator now would break huge amounts of code both past and present.

1 Like

Only if the code is badly written. In object-oriented programming the scope of such a change should be limited to a single class. Also, anything as critical as a delimiter should not be hard-coded.

What I’m talking about are the hundreds of scripts and functions already written by users and plug-in developers and the thousands of files dating back to V3 when sublayers were introduced that use this separator and thus would all be broken.

Oops :open_mouth:

Yeah, just don’t look at my own code too closely… :innocent:

The double colon ‘::’ is the delimiter, why would a colon with spaces on both sides be interfering ?
Conclusion:
I guess avoiding the problem is the way to go.
Having one space on the right seems to work fine for now :shushing_face: