def parse_ucx(name):
    """
    Helper function that takes an object name and returns a 2-tuple consisting of
    the original object name (without 'UCX_' prefix) and UCX index suffix as an int.

    https://docs.unrealengine.com/latest/INT/Engine/Content/FBX/StaticMeshes/index.html#collision

    Will return (None, None) if the input name is not a UCX_ at all.

    Will return an index of -1 if the input is a UCX, but no index could be parsed.
    """
    if not name.startswith("UCX_"):
        return (None, None)
    else:
        # strip UCX_ prefix
        name = name[4:]

    # index starting value
    idx = -1

    # check if this has Blender's duplicated object naming scheme
    if len(name) > 4:
        if name[-1].isdigit() and name[-2].isdigit() and name[-3].isdigit() and name[-4] == ".":
            # add to the index whatever value is in the last 3 digits
            idx += int(name[-3:])
            # strip the numbers and dot from the name
            name = name[:-4]

    # extract all characters from the end that are numerica
    last_digits = []
    for i in range(1, len(name)):
        if name[-i].isdigit():
            last_digits.insert(0, name[-i])
        else:
            break

    # strip the digits off the end of the name
    name = name[:-len(last_digits)]

    # if there was a dot or underscore seperating the digit, strip that too
    if name.endswith(".") or name.endswith("_"):
        name = name[:-1]

    # convert last digits (an array of digit characters) into an int
    try:
        idx += int("".join(last_digits))
    except ValueError:
        # failed to get an index, but this is still a UCX
        return (name, idx)

    return (name, idx)