MCPcopy
hub / github.com/lightningpixel/modly / _get_texture_image

Function _get_texture_image

api/routers/optimize.py:105–111  ·  view source on GitHub ↗

Return the base color texture image regardless of material type.

(geom: trimesh.Trimesh)

Source from the content-addressed store, hash-verified

103
104
105def _get_texture_image(geom: trimesh.Trimesh):
106 """Return the base color texture image regardless of material type."""
107 mat = geom.visual.material
108 img = getattr(mat, "image", None)
109 if img is not None:
110 return img
111 return getattr(mat, "baseColorTexture", None)
112
113
114def _decimate(input_path: str, target_faces: int, tmp_dir: str) -> trimesh.Trimesh:

Callers 2

_decimateFunction · 0.85
_smoothFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected