Hello folks,
I have some rigged biped characters which I want to export to UDK. For exporting to UDK, the bones objects must have the same name of default UDK Skeleton.
Whenever I manually rename the bones, it works perfectly, however I want a script to this automatically. Searching on google I came to this topic:
http://stackoverflow.com/questions/37261262/3dsmax-2011-script-how-to-re…
It`s exactly what I need, however, the above script does not work!
So I changed it a bit to this and at least got some results:
(
local nameMap = #( \
dataPair "R_" "Right",
dataPair "L_" "Left",
dataPair "Clavicle" "Clav"
-- add more mappings here
)
for namePair in nameMap do
(
--test variable values
print namePair.v1
print namePair.v2
for o in getNodebyName namePair.v1 all:on do
(
o.name = namePair.v2
)
)
)
Now it prints:
"R_"
"Right"
"L_"
"Left"
"Clavicle"
"Clav"
OK
So this is good, however, the problem is that the object selected, in case the bone Clavicle, does not get renamed, the name is still Clavicle instead of Clav.
I think it is something which has to do with this part of the script, this statement which tells to rename the object:
for o in getNodebyName namePair.v1 all:on do
(
o.name = namePair.v2
)
Any help?
Cheers.