[ANSWERED] Where does Blender keep its list of acceptable ".left"/".right" strings, etc?

Hello,

I’m taking a look at blender’s armature naming code and I can’t find a list of names for different left/right/up/down etc. (henceforth referred to as chiral identifiers). I’d like to find a complete list of acceptable chiral identifiers (i.e., those that can be used with X-mirror*) so I can use them in my addon. I’m currently doing this by making the list editable by the user via a JSON file, that my addon reads with Python. It currently has all of the strings I can think of, but I don’t know if Blender understands all of them, or if Blender has more that I don’t know about.

*(of course X-mirror doesn’t handle .top or .bot etc, but maybe in the future there will be y-mirror and z-mirror. And either way, Blender’s auto-name bones has a feature for y/z axis, even if it isn’t functional with mirroring. So I’d like to handle those situations, too, but it’s not as important.)

I suppose the chiral identifiers might be handled by the translation? If so, is there a way to get a list in Python for custom naming scripts? Thanks.

Even if this is not possible, I’d like to have a full list of Blender’s chiral identifiers for English and other common languages. Any help finding this would be appreciated.

Looks like you want void BLI_string_flip_side_name
in blender/source/blender/blenlib/intern/string_utils.c

A quick glance says the identifiers are L and R, either upper or lower case.
Unlikely this will be internationalized, IMHO, due to the coding complications

1 Like

Thanks! Even better, there are implementations of other string utilities much like the functions I wrote in my addon – and it looks like I’m doing them the right way! This is a great reference, thanks again!