def HasRootMotionBone(obj, rootBoneName):
    """
    Returns True if the root bone is named @rootBoneName
    @obj (bpy.types.Object). Object.type is assumed to be 'ARMATURE'
    @rootBoneName (string). Name of the root motion bone to compare with
    """
    bones = obj.data.bones
    for bone in bones:
        #print(bone.name, len(bone.children), bone.parent)
        if (bone.parent is None) and (bone.name==rootBoneName):
            return True
    return False