validate sampling_mode

Summary: New sampling mode option in TexturesUV mush match when collating meshes.

Reviewed By: patricklabatut

Differential Revision: D33235901

fbshipit-source-id: f457473d90bf022e65fe122ef45bf5efad134345
This commit is contained in:
Jeremy Reizenstein 2021-12-21 04:45:10 -08:00 committed by Facebook GitHub Bot
parent 7449951850
commit b51be58f63

View File

@ -1061,6 +1061,11 @@ class TexturesUV(TexturesBase):
)
if not align_corners_same:
raise ValueError("All textures must have the same align_corners value.")
sampling_mode_same = all(
tex.sampling_mode == self.sampling_mode for tex in textures
)
if not sampling_mode_same:
raise ValueError("All textures must have the same sampling_mode.")
verts_uvs_list = []
faces_uvs_list = []