Bambu Studio and OrcaSlicer descend from PrusaSlicer and keep its habit of writing metadata in comments, but they arrange the file in marked blocks and use their own marker names. This page is taken from the source code of Bambu Studio (version 02.09.02.62) and of the OrcaSlicer development branch (2.6.0-dev) as of 3 December 2026. OrcaSlicer writes one of two styles depending on whether the selected printer is a Bambu Lab machine.
Order of the file
| File | Order of the parts |
|---|---|
| Bambu Studio | Header block, configuration block, thumbnails (printers not made by Bambu Lab only), executable block |
| OrcaSlicer, Bambu Lab printer | Header block, configuration block, extrusion widths, executable block, filament totals |
| OrcaSlicer, other printers | Header block, thumbnails, extrusion widths, executable block, filament totals and times, configuration block |
Each block is delimited by a pair of comments: ; HEADER_BLOCK_START and
; HEADER_BLOCK_END, ; CONFIG_BLOCK_START and
; CONFIG_BLOCK_END, ; THUMBNAIL_BLOCK_START and
; THUMBNAIL_BLOCK_END, ; EXECUTABLE_BLOCK_START and
; EXECUTABLE_BLOCK_END. OrcaSlicer leaves out the whole header block
when the thumbnail setting asks for the BTT_TFT form, and can be told
to leave out the configuration block.
Bambu Studio header block
The lines come in this order. Lists are separated by commas.
| Comment | Contents |
|---|---|
; BambuStudio version | Producer line |
; model printing time: time; total estimated time: time | Print time for Bambu Lab printers. For others it is ; estimated printing time (normal mode) = time, one line for each enabled time mode |
; total layer number: n | Number of layers |
; total filament length [mm] : list | Length of each filament used |
; total filament volume [cm^3] : list | Volume of each filament used |
; total filament weight [g] : list | Weight of each filament used, two decimals |
; model label id: list | Numbers of the objects that can be skipped. Written only when there is more than one instance and no more than 64, and not for calibration prints |
; object max height: list | Height of each of those objects, two decimals; written with the line above |
; filament_density: list | Filament densities |
; filament_diameter: list | Filament diameters |
; max_z_height: z | Greatest height, two decimals |
; filament: list | The filaments used, counted from 1 |
; support_material_on_wipe_tower: 0 | Fixed line |
; Legal and Compliance Notice | Followed by one long line of notice text |
Bambu Studio’s own G-code reader accepts either the application name or
generated by BambuStudio as the sign of its files.
OrcaSlicer header block
| Comment | Contents |
|---|---|
; generated by OrcaSlicer version on timestamp | Producer line |
; model printing time: time; total estimated time: time | Bambu Lab printers only |
; total layer number: n | Number of layers |
; model label id: list | Skippable objects; Bambu Lab printers only, and not for calibration prints |
; filament_density:, ; filament_diameter:, ; max_z_height:, ; filament: | As in Bambu Studio |
Between the thumbnails or configuration block and the executable block, OrcaSlicer
writes the extrusion widths of each print region, for example
; external perimeters extrusion width = wmm
(two decimals), and the same for perimeters, infill, solid infill, top infill,
support material when there is support, and the first layer when its width is set.
Belt printers get further comments that record their tilt and transform settings.
Configuration block
The block holds the slicer settings, one per line, as
; key = value.
- Bambu Studio writes it right after the header. It omits settings with no value
and
compatible_printers,compatible_prints,print_host,print_host_webui,printhost_apikey,printhost_cafile,printhost_user,printhost_passwordandprinthost_port. - OrcaSlicer writes it after the header for Bambu Lab printers, adding
; first_layer_bed_temperature =n and; first_layer_temperature =n. For other printers it comes after the executable block, with those two lines and also; bed_shape =points and; first_layer_height =h (three decimals). It leaves out a fixed list of newer internal settings.
Thumbnails
Bambu Studio puts PNG previews in the G-code only for printers not made by Bambu Lab:
; THUMBNAIL_BLOCK_START ; thumbnail beginwidthxheight length;base64, at most 78 characters a line; thumbnail end ; THUMBNAIL_BLOCK_END
OrcaSlicer uses the same shape, with an empty line and a bare ; after
; THUMBNAIL_BLOCK_START. length counts the base64
characters. The word before begin and end names the image
type:
| Tag | Image |
|---|---|
thumbnail | PNG |
thumbnail_JPG | JPEG |
thumbnail_QOI | QOI |
thumbnail_BIQU | The BIQU form |
thumbnail_QIDI | The QIDI (ColPic) form |
Two forms are not base64 blocks:
BTT_TFT: a line of;, the width and the height as four hexadecimal digits each, ended by CR LF. Each row of pixels follows as a line of;and four hexadecimal digits a pixel in RGB565, with transparency multiplied into the colour and the image flipped vertically; the values0020,0841and0861are written as0000. After the last thumbnail comes; bigtree thumbnail end.- ColPic: the first image is a line
;gimage:data and later ones are;simage:data.
Layer and feature markers
Bambu Studio, and OrcaSlicer for Bambu Lab printers, write the first form. OrcaSlicer writes the second form for all other printers; it is close to PrusaSlicer’s.
| Bambu form | OrcaSlicer, other printers | Meaning |
|---|---|---|
; CHANGE_LAYER | ;LAYER_CHANGE | A new layer starts |
; Z_HEIGHT: z | ;Z:z | Print height of the layer, mm |
; LAYER_HEIGHT: h | ;HEIGHT:h | Layer height; repeated when it changes |
; LINE_WIDTH: w | ;WIDTH:w | Extrusion width of the following moves |
; FEATURE: role | ;TYPE:role | What the following moves print |
; WIPE_START, ; WIPE_END | ;WIPE_START, ;WIPE_END | Wipe moves |
; COLOR_CHANGE | ;COLOR_CHANGE | Colour change; OrcaSlicer appends ,Tn,colour |
; PAUSE_PRINTING | ;PAUSE_PRINT | Pause inserted by the user |
; CUSTOM_GCODE | ;CUSTOM_GCODE | Custom G-code inserted by the user |
Role names
| Slicer | Values after FEATURE: or TYPE: |
|---|---|
| Both | Undefined, Inner wall, Outer wall, Overhang wall, Sparse infill, Internal solid infill, Top surface, Bottom surface, Ironing, Bridge, Gap infill, Skirt, Brim, Support, Support interface, Support transition, Prime tower, Custom, Multiple |
| Bambu Studio only | Floating vertical shell, Support ironing, Flush |
| OrcaSlicer only | Internal Bridge |
Tool changes, purging and other markers
The comments in this table are shown with the space after the semicolon that both slicers use for them.
| Comment | Meaning |
|---|---|
; WIPE_TOWER_START, ; WIPE_TOWER_END | Prime tower section |
; CP_TOOLCHANGE_WIPE | Wipe in a tool change on the tower |
; FLUSH_START, ; FLUSH_END | Filament flushing |
; VFLUSH_START, ; VFLUSH_END | A second pair of flushing tags, read by the G-code processor |
; NOZZLE_CHANGE_START, ; NOZZLE_CHANGE_END | Change of nozzle. Bambu Studio reads a following list such as OF0 NF1 ON7 NN5, in which NN is the nozzle used by the moves that follow |
; SKIPPABLE_START, ; SKIPPABLE_END, ; SKIPTYPE: type | A section that may be skipped, and its kind |
; MACHINE_START_GCODE_END, ; MACHINE_END_GCODE_START | End of the printer’s start code and start of its end code |
;VTn Hn | Bambu Studio: initial extruder and nozzle numbers |
; PA_LINE_CALIBRATION_START, ; PA_LINE_CALIBRATION_END | Bambu Studio: pressure advance line calibration |
; COOLING_NODE: n, ; PURGING FINISHED, ; Slow Down Start, ; Slow Down End, ; open powerlost recovery, ; close powerlost recovery | Further notes written by Bambu Studio |
M1031 S1 ;IRONING_EXTRUSIONS_START, M1031 S0 ;IRONING_EXTRUSIONS_END | Bambu Studio: commands around ironing, with a naming comment |
; OUTER_OVERHANG_WALL | OrcaSlicer: marks an overhanging part of an outer wall |
; PA_CHANGE:Tn MM3MM:x ACCEL:a BR:0|1 RC:n OV:0|1 | OrcaSlicer, adaptive pressure advance: tool setting index, extruded volume per millimetre value, acceleration, bridge or overhang flag, role change flag, overhang wall flag |
; MANUAL_TOOL_CHANGE , ; EXTERNAL_PURGE, ;_DURING_PRINT_EXHAUST_FAN | Further reserved tags of OrcaSlicer |
Comments beginning ;_ and names beginning _GP_ are working
markers and placeholders that the slicer acts on or replaces while writing the file.
OrcaSlicer also has placeholders written between @ signs, such as
@TOTAL_WEIGHT@, for print time, filament and cost; they are replaced
after export.
Object labels and cancelling objects
| Lines | Written by |
|---|---|
; OBJECT_ID: n | Bambu Studio |
; start printing object, unique label id: n and M624 mask; later ; stop printing object, unique label id: n and M625 | Both, for Bambu Lab printers |
; printing object name | Bambu Studio, other printers |
; printing object name id:n copy m, then ; stop printing object name id:n copy m | OrcaSlicer, when object labels are switched on |
EXCLUDE_OBJECT_DEFINE NAME= CENTER=x,y, then EXCLUDE_OBJECT_START NAME= and EXCLUDE_OBJECT_END NAME= | Klipper printers; see Klipper commands |
M486 Sid, M486 Aname, M486 S-1 | OrcaSlicer, Marlin and RepRapFirmware printers |
; object ids of layer N start: list and M624; ; object ids of this layerN end: list and M625 | Bambu Studio, around timelapse code. The second comment has no space before the layer number |
; remaining object ids: list and M639 mask | Bambu Studio |
The mask after M624 and M639 is a 64-bit field
in base64. Bit i stands for the ith object, counting from 0,
in the sorted list of label numbers. The eight bytes are encoded least significant
byte first, although a comment in the source says the opposite.
OrcaSlicer totals after the executable block
| Comment | Contents |
|---|---|
; filament used [mm] = , ; filament used [cm3] = , ; filament used [g] = , ; filament cost = | Values for each filament |
; total filament used [g] = , ; total filament cost = | Sums, two decimals; printers not made by Bambu Lab |
; total filament change = n | Written when greater than zero; same printers |
; total layers count = n | Same printers |
; estimated printing time (normal mode) = time | Followed by the silent mode time when that mode is enabled |
; estimated first layer printing time (normal mode) = time | Time for the first layer |
Progress commands
Both slicers keep placeholders where M73 progress lines belong and fill
them in once the print time has been estimated. See
Commands for what M73
means.
What is not covered
The meaning of the Bambu Lab firmware commands that appear beside these comments,
the values accepted after SKIPTYPE:, and the byte layout inside the
BIQU and ColPic image data are not given here. Other versions of either slicer may
differ.
Sources
- Bambu Studio source –
GCode.cpp,GCode/GCodeProcessor.cpp,ExtrusionEntity.cppandutils.cpp, read on 3 December 2026 - OrcaSlicer source – the same files and
GCode/Thumbnails.cpp, read on 3 December 2026