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