CURA-12544 saving and loading painted files in cura#7
Conversation
CURA-12544
CURA-12544
CURA-12544
|
|
||
| void setUVCoordinatesPerVertexAsBytes(const bytearray& data, const std::string& texture_path, Scene* scene); | ||
|
|
||
| std::string getTexturePath(const Scene* scene) const; |
There was a problem hiding this comment.
there is no way to set a texture path?
There was a problem hiding this comment.
You actually set it by using setUVCoordinatesPerVertexAsBytes, and I didn't need a direct setter so didn't create it
There was a problem hiding this comment.
I don't understand, you set the texture path by calling the setUVCoordinatesPerVertexAsBytes function? I would expect to have to function, something akin to setUV and setTextureImage. You're saying setUVCoordinatesPerVertexAsBytes does both?
There was a problem hiding this comment.
Yes indeed... The UV coordinates are actually stored in two places:
- The coordinates themselves are stored in the global resources
- The mesh stores indices of the coordinates for each of its faces
Then the texture is also stored in a separate resource, linked from the coordinates. So in order to simplify the management and avoid mistakes, I decided to add it all to a single call. But maybe I should rename the function then, because it does more than advertised.
Save and load painted models textures in 3MF files
CURA-12544