-
Notifications
You must be signed in to change notification settings - Fork 0
CURA-12544 saving and loading painted files in cura #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no way to set a texture path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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