How to rename a custom channel ?

How to rename a custom channel ?

roshanshilimkar3434
Advocate Advocate
915 Views
2 Replies
Message 1 of 3

How to rename a custom channel ?

roshanshilimkar3434
Advocate
Advocate

I've got this rig in which all the custom channels are written in chinese. How do I change it to english ?

 

 

                                                     chinese.png

 

The attribute of the controller shows the name in chinese but when I right click and select that node it's written in english- https://drive.google.com/file/d/1iIEqIytSuFYB1NMznkHwv3pgcFzNG5Gr/view?usp=share_link

0 Likes
Accepted solutions (1)
916 Views
2 Replies
Replies (2)
Message 2 of 3

Kahylan
Advisor
Advisor
Accepted solution

Hi!

 

There isn't a simple translation button for this. Since those are nice names given to the attributes. Atleast I'm assuming that because they contain non-Ascii characters and visibilty remained unchanged.

 

Now to display the long names you need to delete the nice names.

By hand you could do that by selecting an attribute, then in the channelbox menu using "Edit -> Edit attribute..." in the popup menu you then select your attributes one by one and delete whatever is in the "Nice name" textfield.

 

But doing this by hand would take a long time, especially since you have a whole rig with this problem.

 

So I wrote a python script for you that does this automatically:

 

import maya.cmds as mc

dag = mc.ls(dag = True)

for d in dag:
    attrs = mc.listAttr(d, ud = True) or []
    for a in attrs:
        mc.addAttr("{0}.{1}".format(d,a), e= True, nn= "")

 

When you run this script, it will at first look like nothing happend, but if you deselect and reselect the object you have selected, the attributenames should have changed.

 

I hope it helps!

0 Likes
Message 3 of 3

roshanshilimkar3434
Advocate
Advocate

thank you very much, also the script has worked perfectly