Skip to content

Commit

Permalink
Fixed issue carson-katri#815 (black baked UV image, wrong source regi…
Browse files Browse the repository at this point in the history
…on mapped to baked UV image)
  • Loading branch information
jploski committed Dec 27, 2024
1 parent c2622a8 commit 07e97a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion operators/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 07e97a5

Please sign in to comment.