def get_maya_property_name(prop, ignore_channel=False):
    """
    Given a property, return a reasonable Maya name to use for it.
    If ignore_channel is True, return the property for the whole vector, eg. return
    '.translate' instead of '.translateX'.

    This doesn't create or query anything.  It just generates a name to use elsewhere.
    """
    prop_parts = prop.path.split('/')

    # Get the property key, without any channel suffixes attached.
    prop_key = prop_parts[0]
    mapping = {
        'translation': 'translate',
        'rotation': 'rotate',
        'scale': 'scale',
    }
    maya_key = None
    if prop_key in mapping:
        prop_key = mapping[prop_key]

    if prop.path.count('/') == 1 and not ignore_channel:
        # If we've been given a single channel, eg. rotation/x, return it.
        assert len(prop_parts) == 2, prop_parts
        assert prop_parts[1] in ('x', 'y', 'z'), prop_parts
        return '%s%s' % (prop_key, prop_parts[1].upper())
    else:
        # Otherwise, return the vector itself.
        return prop_key