Wednesday, 28 September 2011

VBScript XSI rename objcet

'input a name that you want to replace
removeName = "cs_em5902_CTRL_Mocap_rig_"
replaceName = ""

'auto select object inculd remoueName
SelectObj "*"+removeName+"*"
dim list
set list = GetValue( "SelectionList" )

'rename MK_set node
if list.count > 0 then
for each maker in list
oldName = maker.Name
maker.Name = Replace(oldName, removeName, replaceName)
LogMessage maker.Name
end if

No comments: