• Krzysztof Chalupka's avatar
    Submesh 0/n: Default to empty Meshes · aab95575
    Krzysztof Chalupka authored
    Summary:
    The default behavior of Meshes (with verts=None, faces=None) throws an exception:
    ```
    meshes = Meshes()
    > ValueError: Verts and Faces must be either a list or a tensor with shape (batch_size, N, 3) where N is either the maximum number of verts or faces respectively.
    ```
    
    Instead, let's default to an empty mesh, following e.g. PyTorch:
    ```
    empty_tensor = torch.FloatTensor()
    > torch.tensor([])
    ```
    
    this change is backwards-compatible (you can still init with verts=[], faces=[]).
    
    Reviewed By: bottler, nikhilaravi
    
    Differential Revision: D35443453
    
    fbshipit-source-id: d638a8fef49a089bf0da6dd2201727b94ceb21ec
    aab95575
test_meshes.py 47.2 KB