iClone 7
Released in 7.73
Issue 6709
Bones returned from GetSkinBones() have a different ID than the same ones you get from GetSelectedBones()
The bones from GetSkinBones() seem to be a copy as those objects can not be referred to in the actual clip but the same selected bones can.
OS: Windows 10
  •  5
  •  1097
Submitted byelMartino
Thanks Irving, I noticed that there were no motion bones returned for non-human characters and I assumed this is the expected behaviour and that there are no motion bones for those characters. This now makes sense.
Feedback Tracker Admin
Hi Martin,

Thank you for your further clarification and test code. It helped us find a bug in OpenAPI.
The motion bone and skin bone structure exists in all type of iClone characters, including the Non-human. So if you want to apply a motion clip or add animation key to the character, the Motion Bone will always be the one you should be looking for. However, we found a defect in retrieving motion bone from non-human character, GetMotionBones() always returns an empty list which is not correct. For non-human character, the number of motion bones is expected to be the same as the number of skin bones. This bug will be fixed in next patch.

Here is the code snippet for testing the motion bone defect, I hope it’s more clear for you:

    s = avatar.GetSkeletonComponent().GetSkinBones()
    m = avatar.GetSkeletonComponent().GetMotionBones()
    if ( len( m ) == len( s ) ):
        print( "PASS" )
        print( f"FAILED - MotionBoneNum({len(m)}) is expected equal to SkinBoneNum({len(s)})" )

Apart from the defect we found, the GetSelectedBones() always returns motion bones. You can think of this function as Get Selected Motion Bones. So the results of your test code are expected. If the GetMotionBones() works correctly, or if we provide a function to Get Selected Skin Bones, then you can find the bone with matched ID. Please let me know if you want to request an API to Get Selected Skin Bones.

elMartino the test code snippet to compare the bones which produces the output on the screenshot:
    sc_src: RLPy.RISkeletonComponent = avatar_src.GetSkeletonComponent()
    bl_src: list = sc_src.GetSkinBones()
    sl_src: list = sc_src.GetSelectedBones()

    b = avatar_src.GetSkeletonComponent().GetSkinBones()[3]
    n = b.GetName()
    print(n + " : " + "type: " + type(b).__name__ + " : " + str(b.GetID()))

    b = sl_src[0]
    n = b.GetName()
    print(n + " : " + "type: " + type(b).__name__ + " : " + str(b.GetID()))
Hi Irving,

Thanks for your reply. I am aware of the difference between motion and skin bones. I'm just talking about skin bones here. If you have a non-human character and select a skin bone and use the GetSelectedBones() method, the ID of that bone is different to the SAME skin bone you get via the method GetSkinBones().
None of the skin bones returned from the method GetSkinBones() is valid when referred to in a clip. See in my screenshot where I output the selected bone and the one from the list via GetSkinBones() - they have different IDs therefore are different objects and that's why I get None object errors when I try to use the bones returned from the GetSkinBones(). Please test this and let me know.

  • Screenshot_3.png
Feedback Tracker Admin
Hi elMartino,

Please see the python API page below about the Motion Bone and Skin Bone in iClone's character animation system:

GetSelectedBones() always returns selected motion bones which have fixed structure and naming. You can animate character by applying motion clip or adding transform key to the motion bone.
GetSkinBones() returns skin bones that may have different bone structure and naming according to the character generations, the ID of Skin Bone is usually different from Motion Bone.

I hope this answered your question.