def load_remote(url, **kwargs):
    """
    Load a mesh at a remote URL into a local trimesh object.

    This must be called explicitly rather than automatically
    from trimesh.load to ensure users don't accidentally make
    network requests.

    Parameters
    ------------
    url : string
      URL containing mesh file
    **kwargs : passed to `load`
    """
    # import here to keep requirement soft
    import requests

    # download the mesh
    response = requests.get(url)
    # wrap as file object
    file_obj = util.wrap_as_stream(response.content)

    # so loaders can access textures/etc
    resolver = visual.resolvers.WebResolver(url)

    # actually load
    loaded = load(file_obj=file_obj,
                  file_type=url,
                  resolver=resolver,
                  **kwargs)
    return loaded
def load_remote ( url , ** kwargs ) : import requests response = requests . get ( url ) file_obj = util . wrap_as_stream ( response . content ) resolver = visual . resolvers . WebResolver ( url ) loaded = load ( file_obj = file_obj , file_type = url , resolver = resolver , ** kwargs ) return loaded
Load a mesh at a remote URL into a local trimesh object.

    This must be called explicitly rather than automatically
    from trimesh.load to ensure users don't accidentally make
    network requests.

    Parameters
    ------------
    url : string
      URL containing mesh file
    **kwargs : passed to `load`