multi_material_print
Print multiple 3D objects with different materials or colors on one build plate, assigning each model its own material and slicing automatically.
Instructions
Print multiple objects in different materials/colors on one build plate.
Takes a JSON array of objects, each with a model file and material
assignment. Builds a multi-material 3MF file with per-object filament
assignments, slices it, auto-maps materials to AMS slots, and prints.
This is how you print "object A in red PLA, object B in black PETG"
in a single print job.
Example: Print a bracket in PETG and a cover in PLA::
multi_material_print(
objects_json='[
{"file_path": "/path/to/bracket.stl", "material_id": "petg"},
{"file_path": "/path/to/cover.stl", "material_id": "pla"}
]',
printer_name="my_bambu",
printer_id="bambu_a1",
)
Each object in the JSON array supports:
- ``file_path`` (required): Path to STL/OBJ/GLB mesh file.
- ``material_id`` (required): Material identifier (e.g. ``"petg"``).
- ``name`` (optional): Display name for the object.
- ``color`` (optional): Hex color override (e.g. ``"#FF0000"``).
- ``group`` (optional): Objects sharing a group index are placed
coincident (for meshes that share one coordinate space, like a
body and its inlay). By default every object is its own group
and gets its own spot on the plate.
The tool automatically:
1. Looks up each material's properties (temps, colors)
2. Arranges the objects side by side on the plate (per ``group``)
and builds a multi-object 3MF with per-object material assignments
3. Generates merged slicer overrides (uses the highest-temp material)
4. Checks AMS slots for matching materials
5. Slices and prints with correct AMS mapping
Requires PrusaSlicer or OrcaSlicer installed locally.
The emitted 3MF (``multi_material_3mf`` in the result) also opens in
Bambu Studio, which keeps the per-object materials but re-derives
print settings itself — the result's ``slicer_note`` explains this;
relay it to the user when handing over the file.
Args:
objects_json: JSON array of objects with ``file_path`` and
``material_id`` keys (see example above).
printer_name: Registered printer name in fleet.
printer_id: Printer model ID for profile selection.
auto_ams: Auto-detect AMS slot mapping (default ``True``).
extra_overrides: Additional slicer overrides JSON.
slicer_path: Explicit path to slicer binary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| auto_ams | No | ||
| printer_id | No | ||
| slicer_path | No | ||
| objects_json | Yes | ||
| printer_name | No | ||
| extra_overrides | No |