From 76ad729af702e82b76235267b6399c74a0a27590 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 28 May 2025 11:09:35 +0200 Subject: [PATCH 1/5] Add methods to retrieve UV coordinates and texture data CURA-12544 --- python/MeshData.sip | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/MeshData.sip b/python/MeshData.sip index e2fa7a6..0204df5 100644 --- a/python/MeshData.sip +++ b/python/MeshData.sip @@ -17,4 +17,8 @@ public: void setVerticesFromBytes(const bytearray& data); void setFacesFromBytes(const bytearray& data); -}; \ No newline at end of file + + bytearray getUVCoordinatesPerVertexAsBytes(const Scene* scene) const; + + std::string getTexturePath(const Scene* scene) const; +}; From dca84652595dd64988e0cb8883099c1d57ffd3c4 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 28 May 2025 15:12:31 +0200 Subject: [PATCH 2/5] Add method for UV coordinates storage CURA-12544 --- python/MeshData.sip | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/MeshData.sip b/python/MeshData.sip index 0204df5..f8c21ae 100644 --- a/python/MeshData.sip +++ b/python/MeshData.sip @@ -20,5 +20,7 @@ public: bytearray getUVCoordinatesPerVertexAsBytes(const Scene* scene) const; + void setUVCoordinatesPerVertexAsBytes(const bytearray& data, Scene* scene); + std::string getTexturePath(const Scene* scene) const; }; From e4d70f71914ec88d1a944f263690272739ec0f85 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 3 Jun 2025 13:25:30 +0200 Subject: [PATCH 3/5] Add arguments to store texture information CURA-12544 --- python/MeshData.sip | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/MeshData.sip b/python/MeshData.sip index f8c21ae..ad9cdbc 100644 --- a/python/MeshData.sip +++ b/python/MeshData.sip @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Ultimaker B.V. + // Copyright (c) 2022 Ultimaker B.V. // pySavitar is released under the terms of the LGPLv3 or higher. class MeshData @@ -20,7 +20,7 @@ public: bytearray getUVCoordinatesPerVertexAsBytes(const Scene* scene) const; - void setUVCoordinatesPerVertexAsBytes(const bytearray& data, Scene* scene); + void setUVCoordinatesPerVertexAsBytes(const bytearray& data, const std::string& texture_path, Scene* scene); std::string getTexturePath(const Scene* scene) const; }; From f17ca409adaf707ca0655b806b3d89dfeafbd7ff Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 3 Jun 2025 16:10:51 +0200 Subject: [PATCH 4/5] Add arguments to load texture data CURA-12544 --- python/SceneNode.sip | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/SceneNode.sip b/python/SceneNode.sip index d2212ad..93b8224 100644 --- a/python/SceneNode.sip +++ b/python/SceneNode.sip @@ -20,8 +20,8 @@ public: std::string getName(); void setName(std::string name); - std::string getId(); - void setId(std::string id); + int getId(); + void setId(const int id); const std::map& getSettings() const; void setSetting(const std::string& key, MetadataEntry& entry); From 64457454e8b3d8e418b1ee24ef4fc1d2394cb661 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 3 Jun 2025 16:22:00 +0200 Subject: [PATCH 5/5] Update headers CURA-12544 --- python/MeshData.sip | 2 +- python/SceneNode.sip | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/MeshData.sip b/python/MeshData.sip index ad9cdbc..3beffd7 100644 --- a/python/MeshData.sip +++ b/python/MeshData.sip @@ -1,4 +1,4 @@ - // Copyright (c) 2022 Ultimaker B.V. +// Copyright (c) 2025 Ultimaker B.V. // pySavitar is released under the terms of the LGPLv3 or higher. class MeshData diff --git a/python/SceneNode.sip b/python/SceneNode.sip index 93b8224..48c9547 100644 --- a/python/SceneNode.sip +++ b/python/SceneNode.sip @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Ultimaker B.V. +// Copyright (c) 2025 Ultimaker B.V. // pySavitar is released under the terms of the LGPLv3 or higher. class SceneNode