OverviewFilesCommitsIssuesDocsReleasesPeers

blender-bridge commits / bc47f93

Fix B4: clear stale texture IDs on reconnect
After Godot restart, _baker._texture_ids contained stale entries that prevented _scan_material_textures from re-registering textures with the fresh VT instance. Now cleared on reconnect. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bc47f939b998cc1b7852f7aa751de57a1066ae85
by plankatron <fleeky@gmail.com> · 2026-03-04T18:11:01.000Z

Changed files (1) +3 -2

blender_addon/__init__.py +3 -2
……@@ -303,13 +303,14 @@ def _attempt_reconnect():
303303 _detector.register()
304304 _detector.set_resize_callback(_on_shm_resized)
305305
306 # Reuse existing baker to preserve _texture_ids (prevents re-requesting
307 # all textures on reconnect). Only update SHM reference and ring buffer.
306 # Reuse existing baker but clear stale _texture_ids (Godot restarted;
307 # its VT has no registrations, so textures must be re-requested).
308308 tile_ring_offset = _shm._region_size * 2
309309 tile_ring_size = _shm.size - tile_ring_offset
310310 if _baker is not None:
311311 _baker._shm = _shm
312312 _baker.init_ring_buffer(tile_ring_offset, tile_ring_size)
313 _baker._texture_ids.clear() # Godot restarted; force re-registration
313314 else:
314315 _baker = TileBaker(_shm, tile_size=128, max_mips=8)
315316 _baker.init_ring_buffer(tile_ring_offset, tile_ring_size)