This adds a human-readable name to generated color components, to make assigning filaments to colors easier in a slicer for instance.
For now, it's implemented only for .3mf output, and tested to work with the latest OrcaSlicer and Cura. These two read the name from a different part in the input though, so the name is set in both places to make it work for either slicer.
The name is derived from the color values post-csg conversion, so for instance "red" becomes [1, 0, 0, 1]. In a follow-up PR we can try to use the original name perhaps, or even allow defining a custom name.
This adds a human-readable name to generated color components, to make assigning filaments to colors easier in a slicer for instance.
For now, it's implemented only for .3mf output, and tested to work with the latest OrcaSlicer and Cura. These two read the name from a different part in the input though, so the name is set in both places to make it work for either slicer.
The name is derived from the color values post-csg conversion, so for instance
"red"
becomes[1, 0, 0, 1]
. In a follow-up PR we can try to use the original name perhaps, or even allow defining a custom name.Some TODOs before this can be merged: