OverviewFilesCommitsIssuesDocsReleasesPeers

blender-bridge commits / 69066f3

Fix UV mapping: remove incorrect image flip
np.flipud() double-corrected the image orientation. Blender's bottom-to-top pixel storage and Godot's top-to-bottom UV convention cancel each other out naturally — no image flip is needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
69066f39379ca532f0551cbdf3947c95ffdae1cd
by plankatron <fleeky@gmail.com> · 2026-03-04T20:17:30.000Z

Changed files (4) +6 -6

blender_addon/__init__.py +4 -4
……@@ -176,12 +176,12 @@ def _send_image_file(img_name: str, tex_id: int):
176176 if w == 0 or h == 0:
177177 return
178178
179 # Extract pixels as raw RGBA8 (Blender stores bottom-to-top, Godot expects top-to-bottom)
179 # Extract pixels as raw RGBA8. Blender stores bottom-to-top and Godot stores
180 # top-to-bottom, but UV conventions are also opposite (Blender V=0 at bottom,
181 # Godot V=0 at top). These cancel out, so NO flip is needed.
180182 pixels = np.empty(w * h * 4, dtype=np.float32)
181183 image.pixels.foreach_get(pixels)
182 arr = pixels.reshape(h, w, 4)
183 arr = np.flipud(arr) # flip Y: Blender bottom-up → Godot top-down
184 uint8 = (np.clip(arr, 0.0, 1.0) * 255.0 + 0.5).astype(np.uint8)
184 uint8 = (np.clip(pixels, 0.0, 1.0) * 255.0 + 0.5).astype(np.uint8)
185185
186186 path = f"/tmp/bridge_tex_{tex_id}.rgba"
187187 with open(path, "wb") as f:
blender_addon/blender_manifest.toml +1 -1
……@@ -2,7 +2,7 @@ schema_version = "1.0.0"
22id = "blender_godot_bridge"
33name = "Blender-Godot Bridge"
44tagline = "Real-time bidirectional scene sync with Godot"
5version = "0.18.1"
5version = "0.18.2"
66blender_version_min = "4.2.0"
77type = "add-on"
88maintainer = "blender-bridge <noreply@localhost>"
blender_bridge_addon.zip +0 -0
(no content changes — binary or rename)
src/blender_bridge.cpp +1 -1
……@@ -264,7 +264,7 @@ Error BlenderBridge::start_server(const String &socket_path) {
264264 _known_instance_ids.clear();
265265 _next_object_id = 1;
266266
267 UtilityFunctions::print("BlenderBridge v0.18.1: Server started (shm=", _shm_name, ", sock=", socket_path, ", regions=2x", (int)_region_size, ")");
267 UtilityFunctions::print("BlenderBridge v0.18.2: Server started (shm=", _shm_name, ", sock=", socket_path, ", regions=2x", (int)_region_size, ")");
268268 return OK;
269269}
270270