From 07e97a58fb8a13c0084cadc40b5f835f43d0850b Mon Sep 17 00:00:00 2001 From: Jan Ploski Date: Fri, 27 Dec 2024 18:45:25 +0100 Subject: [PATCH] Fixed issue #815 (black baked UV image, wrong source region mapped to baked UV image) --- operators/project.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/operators/project.py b/operators/project.py index 7180763d..c0c8afd4 100644 --- a/operators/project.py +++ b/operators/project.py @@ -408,8 +408,9 @@ def callback(results: List[api.GenerationResult] | Exception): for face in bm.faces: for loop in face.loops: src_uvs[loop.vert.index] = loop[src_uv_layer].uv + src_uvs[loop.vert.index][1] = 1.0 - src_uvs[loop.vert.index][1] dest_uvs[loop.vert.index] = loop[dest_uv_layer].uv - bake(context, bm, result.image.ravel(), dest, src_uvs, dest_uvs) + bake(context, bm, image_utils.rgba(result.image).ravel(), dest, src_uvs, dest_uvs) dest.update() dest.pack() image_texture_node.image = dest