选择相关的控制器同时K帧是经常要用的功能,有时候一个一个选也挺麻烦的。有下图的结构,选择根节点运行脚本,将选择所有带有"_con_数字" 命名的控制器。
import re as re
root = py.listRelatives(py.selected(),allDescendents=1,fullPath=1)
print root[0]
orig = re.findall(r"(\w*_con_\d{1,10})",str(root))
py.select(set(orig))
选择相关的控制器同时K帧是经常要用的功能,有时候一个一个选也挺麻烦的。有下图的结构,选择根节点运行脚本,将选择所有带有"_con_数字" 命名的控制器。
import re as re
root = py.listRelatives(py.selected(),allDescendents=1,fullPath=1)
print root[0]
orig = re.findall(r"(\w*_con_\d{1,10})",str(root))
py.select(set(orig))