From 1d96539dade54814e8015d42b2abf106f72110ec Mon Sep 17 00:00:00 2001
From: Florent Berthaut <florent.berthaut@univ-lille.fr>
Date: Tue, 10 Oct 2023 13:17:45 +0200
Subject: [PATCH] Fix local address discovery

---
 core/IvmiScene.gd | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/IvmiScene.gd b/core/IvmiScene.gd
index ef5318a..c56a78f 100644
--- a/core/IvmiScene.gd
+++ b/core/IvmiScene.gd
@@ -88,6 +88,7 @@ func _ready():
 				_is_2D = false
 				print("IVMI : Initialised OpenXR Interface")
 				if _open_xr_passthrough :
+					get_viewport().transparent_bg=true
 					var pt : bool = true
 					if _xr_interface.is_passthrough_supported():
 						if !_xr_interface.start_passthrough():
@@ -99,7 +100,6 @@ func _ready():
 							else:
 								pt=false
 					if pt :
-						get_viewport().transparent_bg=true
 						print("IVMI : Activated OpenXR Passthrough")
 					else:
 						print("Error : Could not activate OpenXR Passthrough")
@@ -247,7 +247,7 @@ func _process(delta) :
 								_osc_to_pd.set_output(_osc_output_address, _osc_output_port)
 								var local_addr = "127.0.0.1"
 								for addr in IP.get_local_addresses() :
-									if not ":" in addr :
+									if not ":" in addr and addr!="127.0.0.1":
 										local_addr = addr
 								_osc_to_pd.send_msg("/ivmi/hello_from_gd","sf",[local_addr, _input_port])
 
-- 
GitLab