| … | … | @@ -48,22 +48,26 @@ def _poll_timer(): |
| 48 | 48 | for msg in messages: |
| 49 | 49 | text = msg.decode("utf-8", errors="replace") |
| 50 | 50 | if text == "scene_exported": |
| 51 | | # Full scene import from Godot |
| 51 | # Full scene import from Godot — suppress change detector |
| 52 | 52 | if _importer is not None: |
| 53 | if _detector is not None: |
| 54 | _detector.suppress() |
| 53 | 55 | scene = bpy.context.scene |
| 54 | 56 | if hasattr(scene, "bridge_clear_on_import") and scene.bridge_clear_on_import: |
| 55 | 57 | _clear_bridge_objects() |
| 56 | 58 | _importer.full_import() |
| 57 | | # Share ID mapping with change detector |
| 58 | 59 | if _detector is not None: |
| 59 | 60 | _detector.set_id_map(_importer._id_to_name) |
| 61 | _detector.unsuppress() |
| 60 | 62 | print(f"BlenderBridge: Imported scene from Godot") |
| 61 | 63 | elif text == "transform_update": |
| 62 | | # Incremental transform update |
| 64 | # Incremental transform update — suppress change detector |
| 63 | 65 | if _importer is not None: |
| 66 | if _detector is not None: |
| 67 | _detector.suppress() |
| 64 | 68 | count = _importer.poll_updates() |
| 65 | | if count > 0: |
| 66 | | print(f"BlenderBridge: Updated {count} transforms") |
| 69 | if _detector is not None: |
| 70 | _detector.unsuppress() |
| 67 | 71 | elif text.startswith("texture_registered:"): |
| 68 | 72 | # Godot registered a texture: texture_registered:name,id |
| 69 | 73 | parts = text.split(":", 1)[1].split(",") |
| … | … | @@ -164,6 +168,10 @@ class BRIDGE_OT_import_scene(bpy.types.Operator): |
| 164 | 168 | self.report({"ERROR"}, "Not connected") |
| 165 | 169 | return {"CANCELLED"} |
| 166 | 170 | |
| 171 | # Suppress change detector during import |
| 172 | if _detector is not None: |
| 173 | _detector.suppress() |
| 174 | |
| 167 | 175 | # Clear existing bridge objects if enabled |
| 168 | 176 | if context.scene.bridge_clear_on_import: |
| 169 | 177 | _clear_bridge_objects() |
| … | … | @@ -171,6 +179,7 @@ class BRIDGE_OT_import_scene(bpy.types.Operator): |
| 171 | 179 | _importer.full_import() |
| 172 | 180 | if _detector is not None: |
| 173 | 181 | _detector.set_id_map(_importer._id_to_name) |
| 182 | _detector.unsuppress() |
| 174 | 183 | |
| 175 | 184 | header = _shm.read_header() |
| 176 | 185 | self.report( |