Skip to content

Commit 01281ed

Browse files
committed
add flip_u param
1 parent 8767544 commit 01281ed

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

py5-resources/py5-module/src/py5/shape_conversion.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,8 @@ def trimesh_trimesh_to_py5shape_converter(sketch, obj: Trimesh, **kwargs):
470470
if isinstance(obj.visual, TextureVisuals):
471471
use_texture = True
472472
uv = obj.visual.uv[obj_faces_ravel]
473+
if kwargs.get("flip_u", False):
474+
uv[:, 0] = 1 - uv[:, 0]
473475
if kwargs.get("flip_v", False):
474476
uv[:, 1] = 1 - uv[:, 1]
475477
vertices = np.hstack([vertices, uv])

0 commit comments

Comments
 (0)