Skip to content

Commit 8767544

Browse files
committed
add flip_v param
1 parent 943af27 commit 8767544

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +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-
uv[:, 1] = 1 - uv[:, 1]
473+
if kwargs.get("flip_v", False):
474+
uv[:, 1] = 1 - uv[:, 1]
474475
vertices = np.hstack([vertices, uv])
475476

476477
if "texture" in kwargs:

0 commit comments

Comments
 (0)