0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

python maya rename joints

Posted at
import maya.cmds as cmds

# Get a list of all nodes that end with '_M'
nodes_to_rename = cmds.ls("*:*_M")

# Rename each node to end with '_Mocap_M'
for node in nodes_to_rename:
    new_name = node.replace("_M", "_Mocap_M")
    cmds.rename(node, new_name)

nodes_to_rename = cmds.ls("*:*_L")

for node in nodes_to_rename:
    new_name = node.replace("_L", "_Mocap_L")
    cmds.rename(node, new_name)

nodes_to_rename = cmds.ls("*:*_R")

for node in nodes_to_rename:
    new_name = node.replace("_R", "_Mocap_R")
    cmds.rename(node, new_name)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?