I want to duplicate a skeleton and control how I rename its bones.
Using maxops.cloneNodes will duplicate the skeleton hierarchy,
but the default renaming method is undesirable (appending “001”, “002”…etc to each cloned node name.)
I can find no way to control the naming of the resulting clone.
Am I stuck with a renaming pass after the cloning operation?
In all honesty. I think that it is quite logical that these operations are separated as it are 2 different parts of the problem solving.
I am not really sure what the problem is and why you want to do everything in one go ?
You can just get the new nodes with the parameter “newNodes” and rename then the way you want it.
You can easily remove/replace those new 3 last characters. For max this is just a default way of doing it so you will not end up with nodes with the same name.
I get why Max does this -maya does the same. I just wish I had direct control over how.
the issue was I had source bones that were already named using numbered suffixes
like “spine_01” ,“Spine_02”, “r_leg_01”,“r_leg_02” , “thumb_01”, etc to begin with.
Rather than always adding “001” suffix, maxops.cloneNodes incremented those numbers on the cloned geo.
this meant he suffixes of the cloned bones were all over the place, so just globally swapping out “001” was not possible.
changing the naming convention of the source skeleton to “spine_a”, “Spine_b” etc was what I ended up doing.