Naming consistency when adding folders

When adding folders manually in the editor. If you name a folder “John” the name will be “John”, but if you name the folder “John Smith” the name will be “john_smith”. It would be nice if the capitalization is consistent. I’d expect either for “John” to turn into “john” or “John Smith” to turn into “John_Smith”.

Hi !

I think automated changes should only be applied for sanity reasons.

For example the underscore ( _ ) replaces the space (because it often creates problems).

Non-essentials changes could lead to frustration.
For example if a company’s rule for assets is to name them as lowercase (or uppercase), we should let them decide themselves.

Yes, that makes perfect sense. Currently, uppercase letters are changed to lowercase letters when spaces are being replaced with underscores.

It looks like a bug, let’s wait for an Ynput guy to enlighten us.

1 Like

As far as I know,
There’s a difference between Asset Name and Asset Path
Asset Name is kept as it is.
Asset Path is the full path of the asset with uppercase letters are changed to lowercase letters when spaces are being replaced with underscores.

You name the folder John Smith the name will be john_smith

So, it won’t be just john_smith… it should be folder_name/john_smith

You can find that Launcher uses asset names while DCCs use asset paths.

Hi Mustafa,

I’m talking about this name field:

I’m not sure which version of Ayon you’re running but the Name field was replaced by the Path field.

Here’s how it looks like on my side

Not sure what version I’m running or where to check. I cloned the git repository Monday morning.

But when I go under “Browser”, it does say “Path”. But not under the “Editor” tab. Either way, it does the same under the path variable. It converts it to all lowercase when removing underscores. But does not convert to lowercase otherwise.

If the bug has already been handled, that’s amazing. But must be running a relatively recent build, if I cloned it Monday. :slight_smile:

This is a good question!
I’ve added it here.

Anyway, this still describes the issue mentioned here.

When there’s no space - then no characters are being lowercased.
But if there’s a space, then suddenly characters are being lowercased and spaces replaced with underscore.

The feedback was:

Do not lowercase the words, just replace the invalid characters so that “John Case” would be “John_Case”

Currently:

  • JohnJohn
  • John Casejohn_case

I can reproduce this behavior on 1.0.0-rc.6+202401151731

Expected:

  • JohnJohn
  • John CaseJohn_Case

So that names with a space suddenly don’t get an additional conversion on the casing that it otherwise wouldn’t. I suppose even this would be more consistent:

  • Johnjohn
  • John Casejohn_case

But that would basically be saying we don’t allow uppercase characters - which might be, as others have mentioned, be way too strict.

3 Likes

Hello !

I have tested, using the latest of everything (as available yesterday) :

  • Server 1.0.0-rc.6+202401151731
  • Addon openpype_3.18.4
  • Launcher 1.0.0

I have created an asset called like this : TEST A
(there is a space inside)

Then, when creating a blender scene for that asset, or when publishing, the Anatomy rule {folder[name]} is evaluated as test_a, instead of TEST_A.
So, there may be a bug : uppercase letters are changed to lowercase letters when spaces are being replaced with underscores.


1 Like