0
$\begingroup$

I'm doing a model import into a game, and need to transfer an existing weight painted character onto a different rig, however I have a lot of separated objects that need their vertices renamed, is there a way to have it so for example every vertices for all the selected objects called "LeftHand" get renamed to "HandL"?

$\endgroup$

1 Answer 1

0
$\begingroup$

You can use a Python script, you have to go to the Scripting tab, create a new file, paste the below, and press ▶ play button.

rename_from = 'LeftHand'
rename_to = 'HandL'

import bpy
from bpy import context as C

for ob in C.selected_objects:
    vg = ob.vertex_groups.get(rename_from)
    if vg:
        vg.name = rename_to

$\endgroup$
4
  • $\begingroup$ It worked thanks! One extra question though, is there any way to have the existing vertices names get automatically updated to match the bones located around them's closest area (to match the setup used for the previous models who used the rig) or is it simply best to just manually rename them? $\endgroup$
    – Cerulean
    Commented Oct 1, 2022 at 22:32
  • $\begingroup$ @Cerulean it could be possible to write such a script... $\endgroup$ Commented Oct 1, 2022 at 22:33
  • $\begingroup$ Do you know of a script that does that? I also wonder if there's a way to batch merge vertices weights as well because I tend to need that too. $\endgroup$
    – Cerulean
    Commented Oct 1, 2022 at 23:09
  • $\begingroup$ @Cerulean You can ask another question, maybe someone will write that script for you, depending on how clear the question will be. $\endgroup$ Commented Oct 2, 2022 at 8:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .