Home Website Youtube GitHub

Naming as "Capitalization"

Hello !
I’ve found a bug when building the rig from a template on which I’ve changed litteraly everything to be named with a capital leter.
When I build the rig, I don’t know how but the bones was named as “RightHandindex”, “RightHandpinky”, etc, and you can note that “index”, “pinky” and others are created without capitals.

Here is the configuration :



I think i have no other way to customize names so I made a script that I added in Post Script to rename all the finger joints to fix that bug.

If you have another solution, I would be interested !
Thank you :slight_smile:

(When you report bugs, please include more info like mGear version, and Maya version and any other details you can think of.)

However, in this case, this is not a bug. You chose Description Letter Case = “Capitalization”. You should use “Default”. Because Capitalization uses the Python string.capitalize() which would turn ThisKindOfWord to Thiskindofword.

test = 'MyFancyStringsHere'
print(test, test.capitalize())
# ('MyFancyStringsHere', 'Myfancystringshere')

If you choose default, it will not change your case. Here is the code from mgear.shifter

def letter_case_solve(name, letter_case=0):
    """Change the letter case

    Args:
        name (str): name
        letter_case (int, optional):
            0 = will not change the leter casing
            1 = will convert all letters to upper case
            2 = will convert all letters to lower case
            3 = will capitalize the first letter of the name

    Returns:
        TYPE: Description
    """
    if letter_case == 1:
        name = name.upper()
    elif letter_case == 2:
        name = name.lower()
    elif letter_case == 3:
        name = name.capitalize()
    return name
1 Like

Oh thank you for your answer, and sorry for the mistake ! I didn’t know what does “Default”.

1 Like

Hello ! I’m reopening this thread, as I found an issue or maybe a misunderstanding :
In the guide settings, if I set controls to be “Lower Case”, why does my controls stills has capitals inside their names ?
I have for exemple a spine component named “Spine” but when building, it stays like this and hasn’t changed to lower case. I guess the desired behavior is that when building the rig, the naming convention is taking all the names of the components and applies those rules…

More globally: if I want to put all my controls from Upper Case to Lower Case, i will have to :

  • update the guide settings → naming rules to Lower Case
  • update the guide settings → update controls sides naming (check if there is any upper case)
  • update the guide settings → extensions naming (check if there is any upper case)
  • update all my components and lower case manually all the names.

It feels like updating the guide naming rules for lowering letters is kind of useless because anyway I will have to update all my components. Or the naming rules aren’t applied to component names, and you just loose the ability to update all the rig in one second.
Am I wrong ?