trimesh.resources¶
- trimesh.resources.get_bytes(name: str) bytes¶
Get a resource from the trimesh/resources folder as binary data.
- Parameters:
name – File path relative to trimesh/resources
- Returns:
File data as raw bytes.
- Return type:
resource
- trimesh.resources.get_json(name: str) dict¶
Get a resource from the trimesh/resources folder as a decoded string.
- Parameters:
name (str) – File path relative to trimesh/resources/{name}
- Returns:
File data decoded from JSON.
- Return type:
resource
- trimesh.resources.get_schema(name: str) dict¶
Load a schema and evaluate the referenced files.
- Parameters:
name (str) – Filename of schema.
- Returns:
Loaded and resolved schema.
- Return type:
schema
- trimesh.resources.get_stream(name: str) BytesIO¶
Get a resource from the trimesh/resources folder as a binary stream.
- Parameters:
name (str) – File path relative to trimesh/resources
- Returns:
File data as a binary stream.
- Return type:
resource
- trimesh.resources.get_string(name: str) str¶
Get a resource from the trimesh/resources folder as a decoded string.
- Parameters:
name – File path relative to trimesh/resources
- Returns:
File data as a string.
- Return type:
resource