Log duplicate bone names

Hello,
I have an issue with bone names. Maybe I'm going blind with old age or something but I keep receiving an error regarding two bones that have the same name.
Having checked the bone hierarchy, I can't seem to find the issue.

I have searched for a Maxscript for Max 2013 to log any duplicate bone name entries and not been successful.

I would be very much grateful if someone could assist me with my current issue.

Thank you in advance.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Dekrayzis's picture

Thank you for the assistance.

Thank you for the assistance.

barigazy's picture

...

With this fn you can select all scene bone objects that have duplicated name.
Also this fn returns array of these bones

fn selectDuplicateBones = 
(
	local allBones = for bone in geometry where isKindOf bone BoneGeometry collect bone.name
	if allBones.count == 0 then format "No Bones In This Body!\n" else
	(
		local duplicates = #()
		for i = 1 to allBones.count-1 while i < allBones.count do
		(
			for j = (i+1) to allBones.count where stricmp allBones[i] allBones[j] == 0 do
			(
				append duplicates (getNodeByName allBones[i])
			)
		)
		if duplicates.count > 0 do (select duplicates ; duplicates)
	)
)
selectDuplicateBones()

barigazy

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.