Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
[ ] Implement it for .amf output tooMost slicers don't even support amf color properly, let's focus on 3mf