Hi there! I am working with a model that has a skeleton imported from another software. The bone naming and the vertex-groups of the mesh must have the same format for later exports. The mesh is symmetric, but the naming for symmetry used is “Lft” and “Rht” instead of Blender recognised naming “.L” and “.R” respectively. I have already done some on-the-fly scripts that help me mirror bones in EDIT and POSE modes, however they work on key pressed and not while editing/posing bones (such as the mirror does).
Can I access the symmetry module to modify it to custom naming acceptance?
If I can, where can I find the file? And, would it run as a script or should I have to make a Blender build?
If I can’t, is there a way to make a script/add-on call the operator on every modification? Is there any example I could reference at?
As a general rule, Blender’s interface and addons are Python while the internals are C/C++.
Is it possible to use text for your data exchange format? (as opposed to a binary format)
Doing a search and replace is easier than building Blender from source if you are not familiar with that sort of thing.
To be honest I don’t quite understand what do you mean with “use text for data exchange format instead of a binary format”. Do you mean changing bones names and vertex-group names to match the Blender Naming Conventions to later change names back to export requirements?
In the meanwhile, I have been researching by my own and found out excatly what is the operation I want to modify. This operation is the one showed at the picture below: Object.use_mesh_mirror_x, also extended from “bpy.data.objects[“Mesh”].use_mesh_mirror_x”. Therefore, I guess that somewhere in the bpy lib is the “use_mesh_mirror_x” operation which I should be able to access and modify, but which I can’t find.
On the other hand, although first I would have to look at the mirror code to see how they apply the Naming Conventions, I had also thought of modifying the Naming Convention keywords and separators to accept the ones I need to use. One thing which is just a guess of mine is that the naming for left and right bones are only readed if the indetifiers “L” / “R” are the last characters of the bone name, but this would need of confirmation.
A bone should be mapped to a vertex group. If the bone and vertex group have the same name you are ok to go.
The .L and .R convention has only two important uses. One is to transfer data between left/right during weight paint. The other is to have a half mesh with mirror modifier, to allow it autogenerate unique vertex groups (behind the scenes) of the other half part.
If you have a full model I assume. You will have to rename bones and vertex groups to have the same name (the vertex group is the bone name).
Optionally, you can delete all of the .R vertex groups, then you will do a fake editing on all .L vertex groups. Just set the brush opacity to 0% (or 100% accordingly) and make a stroke, only to allow the data copied from .L to .R group.