Skip to content

Vendor bundles and updating process

Walt Sorensen edited this page Feb 15, 2020 · 40 revisions

Vendor bundles and updating process

Vendor bundles are a collection of system presets in a single file, optionally with inheritance. Each vendor has its own bundle, e.g. PrusaResearch.ini stores all profiles for Prusa printers.

Header fields

This is an example header section:

[vendor]
name = Prusa Research      # Name for GUI display purposes (Configuration Wizard)
config_version = 0.1.1     # This bundle version, used for updating
config_update_url = https://example.com/location     # Location of updates (optional), see below ...
changelog_url = https://example.com/location/changelog
 
# Section for each model starts with `printer_model:` followed by the printer model ID
[printer_model:MK3]
name = Original Prusa i3 MK3   # Name for GUI display purposes
variants = 0.4; 0.25; 0.6      # Variant names separated by `;`
technology = FFF               # Either FFF or SLA
family = MK3                   # Optional, printers from the same family will be shown together in the Configuration Wizard
bed_model = mk3_bed.stl # An STL mode3l of the printer bed shape
bed_texture = mk3.svg # An SVG showing the texture of the bed, use for company logos displayed on the build plate
default_materials = Prusament PLA; Prusament PETG

The versioning system used by PrusaSlicer is based on Semantic Versioning, the config_version field expects a version string formated as Major.minor.patch, optionally there may also be a pre-release string (such as "-alpha") appended.

Individual preset fields for printer, filament, and print profiles

After the header section, individual preset sections follow. Each preset section's name starts with either:

  • printer: for printer profiles
  • filament: for filament profiles, or
  • print: for print profiles.

The colon is followed by the preset name. This name has to be globally unique (across all .ini files). For example, the "Prusament PLA" profile defined for the Creality Ender-3 printer is named "Prusament PLA @ENDER3", although only "Prusament PLA" is shown in the Filament installation wizard and at the Plater, more about name aliases later.

If the name is enclosed with asterisks (eg. [filament:*PLA*]) then the preset is marked internal and is not available in the PrusaSlicer. This is used for inheritance where common parent profiles of various end-usage profiles are hidden.

Examples

[printer:*common*]  # Common printer presets for Inheritance 
[filament:*common*] # Common filament presets for Inheritance 
[print:*common*]    # Common print presets for Inheritance

Example printer profile

[printer_model:MINI]
name = Original Prusa MINI
variants = 0.4; 0.25; 0.6
technology = FFF
family = MINI
bed_model = mini_bed.stl
bed_texture = mini.svg
default_materials = Prusament PLA; Prusament PETG @MINI

Example print profile

# MK3 #
[print:0.10mm DETAIL @MK3]      # Only "0.10mm DETAIL" will be visible to the user
inherits = *0.10mm*; *MK3*      # This profile inherits from two other profiles
# alias = 0.10mm DETAIL         # An alternative way to change the name of the profile visible to the user
bridge_speed = 30
compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and nozzle_diameter[0]==0.4 and ! single_extruder_multi_material
external_perimeter_speed = 25
infill_acceleration = 1250
fill_pattern = gyroid
fill_density = 15%

Example filament profile

[filament:Prusament PLA]
inherits = *PLA*
filament_vendor = Prusa Polymers
temperature = 215
filament_cost = 24.99
filament_density = 1.24

Inheritance

Different profiles often share a lot of settings and only differ in a few specific settings. To make the Vendor bundle easier to maintain and read, you can take advantage of inheriting values from a previously defined profile. You can only inherit from profiles within the same config file. For example, you cannot inherit from Creality.ini inside PrusaResearch.ini. Inheritance is achieved with the inherits field, for example:

[filament:Prusament PLA]
inherits = *PLA*

In this case, we first defined a common PLA profile that sets up most of the values. A Prusament profile will inherit all of the values of the common profile and then we can change only a few values specific to the brand. Changes to the common PLA profile will get propagated to all profiles that inherit its settings.

Multiple Inheritance is achieved either through a chain of inheritance profiles inheriting from each parent profile as in common > PLA > Generic PLA (i.e. Generic PLA inherits from PLA which inherits from common) or through adding multiple items in the inherit field separated by a semicolon ; as in inherits = *0.05mm*; *MK3* (i.e. the print profile inherits from the 0.05mm print profile then from the MK3 print profile) where last wins.

Associating presets with a specific printer

PrusaSlicer binds the Printer and Filament profile to the Printer profile using the compatible_printers_condition configuration value. With the introduction of the 3rd party printers, we are also suppressing Printer and Filament profiles from other vendors, therefore each vendor has to define a full set of Printer and Filament profiles in his config vendor bundle. Presets may be associated with a specific printer model or a variant with the printer_model and printer_variant fields.

Examples:

compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK2.*/ and nozzle_diameter[0]==0.4 and num_extruders==1
or
compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_CREALITY.*/
or
compatible_printers_condition = printer_model=="BIBO2" and nozzle_diameter[0]==0.4

Profile name aliases

The logical name (alias) of a print or filament preset is used in the main screen. It is also used in the configuration wizard (filaments selection). There are two ways to change the name of the profile visible to the user while internally keeping the name globally unique:

  • the @ symbol
  • the alias text

If neither is used, PrusaSlicer uses the full name as the alias.

The "@" symbol is used as a separator of a logical name from the full name, the suffix will be hidden. The alias can be used to achieve the same result, but also to make a change in the beginning of the name (not just to remove a suffix).

Example:

Full name: print:0.10mm DETAIL @0.25 nozzle MK3

Logical name: print:0.10mm DETAIL

Alias: print:0.10mm DETAIL

Custom GCode specific information

This section details information about custom GCode modifiers.

GCode placeholders

You can use T[initial_tool] placeholder in the start gcode. The [initial_tool] placeholder will be replaced with the initial tool number before the slicer gcode is exported to a file.

More placeholder tokens are listed in the Wiki

Macro constructs in the custom GCode sections

Custom GCode sections also allow the use of Conditional evaluations if else, and Expression evaluations {<expression>} in addition to the Legacy placeholder syntax: [variable]

More details on custom gcode macro constructs are listed in the Wiki

Multi-Extruder definitions

The easiest wat to build a config bundle for multi-extruder printers is to start by building a custom printer definition in the PrusaSlicer user interface. Once the multi extruder profiles are prepared in the slicer, export the settings as a config bundle. This exported file will contain all of the multi extruder specific settings. Edit the exported config bundle to your liking, mainly adding the header and trying to reduce config redundancy by using the inheritance.

Multi-extruder setting values are set in extruder order and are a comma-separated list. Below is an example list showing some of the possible multi-extruder settings set up for a dual extruder.

deretract_speed = 40,40
extruder_colour = #FFFF00;#229403
extruder_offset = 0x0,0x0
max_layer_height = 0.3,0.3
min_layer_height = 0.05,0.05
nozzle_diameter = 0.4,0.4
retract_before_travel = 2,2
retract_before_wipe = 70%,70%
retract_layer_change = 1,1
retract_length = 4,4
retract_length_toolchange = 1,1
retract_lift = 0,0
retract_lift_above = 0,0
retract_lift_below = 0,0
retract_restart_extra = 0,0
retract_restart_extra_toolchange = 0,0
retract_speed = 40,40
wipe = 1,1

Online updating

Note: The updating process is entirely optional.

A bundle that is to be updated automatically by PrusaSlicer from the network needs a config_update_url in its [vendor] section at the top of the file.

config_update_url = https://example.com/location

The config_update_url URL is used as a base for constructing URLs to get a bundle index and specific bundle versions.

Index file and compatibility constraints

The index is a simple text file listing the bundle versions and specifying PrusaSlicer compatibility constraints. Version strings are in the same Semver format as described above.

Example index file:

1.4
1.3 Updated print temperature
1.2 Added a new filament profile
max_slic3r_version=1.40.0      # This is a Slic3r version constraint
1.1
1.0.2
1.0.1
1.0
0.9-alpha

Each line is either a bundle version number, optionally followed by a string explanation of the changes, or a PrusaSlicer version constraint. The constraint may be either

max_slic3r_version=... , or min_slic3r_version=... The constraints are inclusive, ie. max_slic3r_version=1.40.0 means PrusaSlicer version 1.40.0 or lower.

The index file is read from top to bottom, each line is compared with the last max_slic3r_version, or min_slic3r_version.

min_slic3r_version <= vendor budle version <= max_slic3r_version

That means that the constraint applies to all versions below that line. In the example above, PrusaSlicer version up to 1.40.0 will only update this bundle up to version 1.1 and then it will stick with this version. On the other hand, PrusaSlicer version 1.41.0, for example, will update to 1.4.

min_slic3r_version = 2.1.1-beta0
1.0.8 Various changes in FFF profiles, new filaments/materials added. See changelog.
1.0.7 Updated layer height limits for MINI
1.0.6 Added Prusa MINI profiles
min_slic3r_version = 2.1.0-alpha0
1.0.5 Added SLA materials
1.0.4 Updated firmware version and 0.25mm nozzle profiles
1.0.3 Added filament profiles

In this example, profiles 1.0.8, 1.0.7 and 1.0.6 require at least version 2.1.1-beta0. Profiles 1.0.5, 1.0.4 and 1.0.3 require at least version 2.1.0-alpha0.

Release, release candidate, beta and alpha versions

The vendor bundle version can be tagged as a release candidate, beta or alpha version by appending a tag after the version number.

Example:

0.8.0 Updated for the PrusaSlicer 2.0.0 final release
0.8.0-rc1 Updated SLA profiles
0.8.0-rc Updated for the PrusaSlicer 2.0.0-rc release
0.8.0-beta1 Updated SLA profiles
0.8.0-beta Updated SLA profiles
0.8.0-alpha9 Updated SLA and FFF profiles
0.8.0-alpha8 Updated SLA and FFF profiles
0.8.0-alpha7 Updated SLA and FFF profiles

Depending on the PrusaSlicer release type (release, release candidate, beta, alpha), only specific vendor bundle versions are be accepted:

Release: Only release bundle versions

Release candidate: Release and release candidate bundle versions

Beta: Everything except for alpha bundle versions

Alpha: All bundle versions

This way it's possible to upload, for example, a new bundle alpha/beta version and it will be automatically ignored by stable releases of PrusaSlicer.

Checking and updating to a newer vendor bundle version

PrusaSlicer always downloads the index first and then decides whether to download a new bundle based on the index. It will not do anything if the index cannot be obtained or is invalid.

The index URL is constructed by appending "index.idx" to the config_update_url. In the above example, this would be "https://example.com/location/index.idx"

PrusaSlicer consults the index file and if it determines that an update is available, it will download a new bundle from an URL constructed by appending the version string and an ".ini" extension to the config_update_url.

For example: "https://example.com/location/1.4.ini" or a real example from the PrusaResearch repository.

Bundle indices (as well as updated bundles) are stored in the cache subdirectory of the user data directory. PrusaSlicer downloads indices and update bundles (if any) into the cache in the background. On the next application startup, it consults the cache and if updated bundles were previously downloaded, it offers to apply them.

For the initial bootstrapping, PrusaSlicer uses indices and bundles that come along with its installation.