file.py
rerun.log.file
class MeshFormat
Bases: Enum
Mesh file format.
GLB = 'GLB'
class-attribute
instance-attribute
glTF binary format.
OBJ = 'OBJ'
class-attribute
instance-attribute
Wavefront .obj format.
class ImageFormat
dataclass
Bases: Enum
Image file format.
JPEG = 'jpeg'
class-attribute
instance-attribute
JPEG format.
PNG = 'png'
class-attribute
instance-attribute
PNG format.
def log_mesh_file(entity_path, mesh_format, *, mesh_bytes=None, mesh_path=None, transform=None, timeless=False, recording=None)
Log the contents of a mesh file (.gltf, .glb, .obj, …).
You must pass either mesh_bytes
or mesh_path
.
You can also use [rerun.log_mesh
] to log raw mesh data.
Example:
# Move mesh 10 units along the X axis.
transform=np.array([
[1, 0, 0, 10],
[0, 1, 0, 0],
[0, 0, 1, 0]])
Parameters:
Name | Type | Description | Default |
---|---|---|---|
entity_path |
str
|
Path to the mesh in the space hierarchy |
required |
mesh_format |
MeshFormat
|
Format of the mesh file |
required |
mesh_bytes |
bytes | None
|
Content of an mesh file, e.g. a |
None
|
mesh_path |
Path | None
|
Path to an mesh file, e.g. a |
None
|
transform |
ArrayLike | None
|
Optional 3x4 affine transform matrix applied to the mesh |
None
|
timeless |
bool
|
If true, the mesh will be timeless (default: False) |
False
|
recording |
RecordingStream | None
|
Specifies the |
None
|
def log_image_file(entity_path, *, img_bytes=None, img_path=None, img_format=None, timeless=False, recording=None)
Log an image file given its contents or path on disk.
You must pass either img_bytes
or img_path
.
Only JPEGs and PNGs are supported right now.
JPEGs will be stored compressed, saving memory, whilst PNGs will currently be decoded before they are logged. This may change in the future.
If no img_format
is specified, rerun will try to guess it.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
entity_path |
str
|
Path to the image in the space hierarchy. |
required |
img_bytes |
bytes | None
|
Content of an image file, e.g. a |
None
|
img_path |
Path | None
|
Path to an image file, e.g. a |
None
|
img_format |
ImageFormat | None
|
Format of the image file. |
None
|
timeless |
bool
|
If true, the image will be timeless (default: False). |
False
|
recording |
RecordingStream | None
|
Specifies the |
None
|