CURA-12544 saving and loading painted files in cura#57
Conversation
CURA-12544
CURA-12544
CURA-12544
CURA-12544
CURA-12544
CURA-12544
|
|
||
| using namespace Savitar; | ||
|
|
||
| UVCoordinatesIndices::UVCoordinatesIndices(int group_index, int vertex_1_index, int vertex_2_index, int vertex_3_index) |
There was a problem hiding this comment.
group is used to have multiple textrues for the same model, then the logic is texture group 0 is for seam painting, texture group 1 is for overhang painting for instance or am I understanding this wrong?
There was a problem hiding this comment.
You are right that the group is used for multiples texture on the same model, however we are not going to use it. We will do a single UV-mapping per model, with a single texture. Then every pixel will encode the information about seam/support/material/... This is an interesting idea that we didn't consider though, but since every face is linked to a single texture, we cannot really do it. I'll give it a though with Remco.
| [[nodiscard]] int getId() const; | ||
|
|
||
| void setId(std::string id); | ||
| void setId(int id); |
There was a problem hiding this comment.
Any particular reason this change is needed? We just added savitar to neoprep and since javascript doens't have true integer numeric types. This change would be a bit non-idiomatic to implement.
There was a problem hiding this comment.
Yes ! Since we now have to handle:
- An ID for the object
- An ID for the coordinates group
- An ID for the texture path
And all of them should be unique, libSavitar calculates proper IDs for everyone, so I need to store them as integers so that I can find a proper value for the next time I need an ID. If this really is an issue, I can find an other way, but I would prefer not to.
There was a problem hiding this comment.
Strings could also solve the that specific issue right? If we use integers, can we then somehow make sure the ID never excedes
There was a problem hiding this comment.
IDs are using incremented integers starting from 0, so we should be safe 😄
Save and load painted models textures in 3MF files
CURA-12544
Documentation is not 100% to match the current level of documentation, and because some methods are reeeeeally sefl-explanatory IMHO. If you think some more methods/classes deserve it, just ask.