| … | … | @@ -176,12 +176,12 @@ def _send_image_file(img_name: str, tex_id: int): |
| 176 | 176 | if w == 0 or h == 0: |
| 177 | 177 | return |
| 178 | 178 | |
| 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. | |
| 180 | 182 | pixels = np.empty(w * h * 4, dtype=np.float32) |
| 181 | 183 | 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) | |
| 185 | 185 | |
| 186 | 186 | path = f"/tmp/bridge_tex_{tex_id}.rgba" |
| 187 | 187 | with open(path, "wb") as f: |
| … | … | @@ -2,7 +2,7 @@ schema_version = "1.0.0" |
| 2 | 2 | id = "blender_godot_bridge" |
| 3 | 3 | name = "Blender-Godot Bridge" |
| 4 | 4 | tagline = "Real-time bidirectional scene sync with Godot" |
| 5 | version = "0.18.1" | |
| 5 | version = "0.18.2" | |
| 6 | 6 | blender_version_min = "4.2.0" |
| 7 | 7 | type = "add-on" |
| 8 | 8 | maintainer = "blender-bridge <noreply@localhost>" |
| … | … | @@ -264,7 +264,7 @@ Error BlenderBridge::start_server(const String &socket_path) { |
| 264 | 264 | _known_instance_ids.clear(); |
| 265 | 265 | _next_object_id = 1; |
| 266 | 266 | |
| 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, ")"); | |
| 268 | 268 | return OK; |
| 269 | 269 | } |
| 270 | 270 |