Translates a plyxd model object to a dict

def _pylxd_model_to_dict(obj):
    '''Translates a plyxd model object to a dict'''
    marshalled = {}
    for key in obj.__attributes__.keys():
        if hasattr(obj, key):
            marshalled[key] = getattr(obj, key)
    return marshalled