Loading Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/BaseWindow.cs +1 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ namespace ETSI.ARF.WorldStorage.UI protected Vector2 scrollPos; protected Color ori; protected GUIStyle gsTest; protected string saveText = "Save"; public void Update() { Loading Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/GraphEditorWindow.cs +24 −11 Original line number Diff line number Diff line Loading @@ -189,6 +189,9 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows GUILayout.Label("Augmented Reality Framework", leftStyle); GUILayout.Label("Copyright (C) 2024, ETSI (BSD 3-Clause License)", leftStyle); //separator line Rect rect = EditorGUILayout.GetControlRect(false, 1); EditorGUI.DrawRect(rect, Color.gray); switch (type) { Loading Loading @@ -221,7 +224,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows //anchor icon EditorGUILayout.BeginHorizontal(); Texture anchorImage = (Texture)AssetDatabase.LoadAssetAtPath("Assets/ETSI.ARF/ARF World Storage API/Images/anchor.png", typeof(Texture)); GUI.backgroundColor = Color.clear; GUI.backgroundColor = WorldStorageWindow.arfColors[8]; GUILayout.Box(anchorImage, GUILayout.Width(40), GUILayout.Height(40)); //anchor label Loading @@ -245,7 +248,8 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows GUI.backgroundColor = Color.clear; GUILayout.BeginHorizontal(); GUILayout.Box(warningImage, GUILayout.Width(27), GUILayout.Height(27)); EditorGUILayout.LabelField("This element is not synchronized with the World Storage"); GUILayout.Label("This element is not synchronized with the World Storage!", EditorStyles.whiteBoldLabel); GUILayout.EndHorizontal(); } Loading @@ -260,7 +264,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows EditorGUILayout.LabelField("UUID ", EditorStyles.boldLabel, GUILayout.Width(50)); if (!SaveInfo.instance.nodePositions.ContainsKey(worldAnchor.UUID.ToString())) { EditorGUILayout.LabelField("none yet (element not yet saved in the server)"); EditorGUILayout.LabelField("None yet (element not yet saved in the server)"); } else { Loading @@ -268,6 +272,8 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows } EditorGUILayout.EndHorizontal(); GUI.backgroundColor = Color.white; //name EditorGUILayout.BeginHorizontal(); EditorGUI.BeginChangeCheck(); Loading Loading @@ -433,7 +439,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows // //FOOTER // GUILayout.FlexibleSpace(); //GUILayout.FlexibleSpace(); EditorGUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); Loading Loading @@ -494,6 +500,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows GUI.backgroundColor = Color.green; if (GUILayout.Button("Save")) { System.Guid _creator = Guid.NewGuid(); // System.Guid.Parse(WorldStorageWindow.WorldStorageWindowSingleton.worldStorageUser.UUID); if (SaveInfo.instance.nodePositions.ContainsKey(worldAnchor.UUID.ToString())) { if (SaveInfo.instance.elemsToUpdate.Contains(worldAnchor.UUID.ToString())) Loading @@ -510,6 +517,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows posX.Add(worldAnchorNode.GetPosition().x.ToString()); var posY = new Collection<String>(); posY.Add(worldAnchorNode.GetPosition().y.ToString()); WorldAnchor worldAnchor = worldAnchorNode.worldAnchor; worldAnchor.KeyvalueTags["unityAuthoringPosX"] = posX; worldAnchor.KeyvalueTags["unityAuthoringPosY"] = posY; Loading Loading @@ -560,7 +568,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows //trackable icon EditorGUILayout.BeginHorizontal(); Texture trackImage = (Texture)AssetDatabase.LoadAssetAtPath("Assets/ETSI.ARF/ARF World Storage API/Images/trackable.png", typeof(Texture)); GUI.backgroundColor = Color.clear; GUI.backgroundColor = WorldStorageWindow.arfColors[7]; GUILayout.Box(trackImage, GUILayout.Width(40), GUILayout.Height(40)); //trackable label Loading @@ -584,7 +592,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows GUI.backgroundColor = Color.clear; GUILayout.BeginHorizontal(); GUILayout.Box(warningImage, GUILayout.Width(27), GUILayout.Height(27)); EditorGUILayout.LabelField("This element is not synchronized with the World Storage"); GUILayout.Label("This element is not synchronized with the World Storage!", EditorStyles.whiteBoldLabel); GUILayout.EndHorizontal(); } Loading @@ -599,7 +607,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows EditorGUILayout.LabelField("UUID ", EditorStyles.boldLabel, GUILayout.Width(50)); if (!SaveInfo.instance.nodePositions.ContainsKey(trackable.UUID.ToString())) { EditorGUILayout.LabelField("none yet (element not yet saved in the server)"); EditorGUILayout.LabelField("None yet (element not yet saved in the server)"); } else { Loading @@ -607,6 +615,8 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows } EditorGUILayout.EndHorizontal(); GUI.backgroundColor = Color.white; //name EditorGUILayout.BeginHorizontal(); EditorGUI.BeginChangeCheck(); Loading Loading @@ -932,6 +942,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows TrackablePayload = new byte[64], LocalCRS = localCRS, Unit = UnitSystem.CM, Confidence = 0, TrackableSize = trackableSize, KeyvalueTags = new KeyvalueTagList() }; Loading Loading @@ -1010,7 +1021,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows //world link icon EditorGUILayout.BeginHorizontal(); Texture linkImage = (Texture)AssetDatabase.LoadAssetAtPath("Assets/ETSI.ARF/ARF World Storage API/Images/link.png", typeof(Texture)); GUI.backgroundColor = Color.clear; GUI.backgroundColor = WorldStorageWindow.arfColors[9]; GUILayout.Box(linkImage, GUILayout.Width(40), GUILayout.Height(40)); //world link label Loading @@ -1034,19 +1045,21 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows GUI.backgroundColor = Color.clear; GUILayout.BeginHorizontal(); GUILayout.Box(warningImage, GUILayout.Width(27), GUILayout.Height(27)); EditorGUILayout.LabelField("This element is not synchronized with the World Storage"); GUILayout.Label("This element is not synchronized with the World Storage!", EditorStyles.whiteBoldLabel); GUILayout.EndHorizontal(); } //ELEMENT'S ATTRIBUTES EditorGUI.BeginChangeCheck(); GUI.backgroundColor = Color.white; //uuid EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("UUID ", EditorStyles.boldLabel, GUILayout.Width(50)); if (!SaveInfo.instance.linkIds.Contains(worldLink.UUID.ToString())) { EditorGUILayout.LabelField("none yet (element not yet saved in the server)"); EditorGUILayout.LabelField("None yet (element not yet saved in the server)"); } else { Loading Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/TrackableWindow.cs +3 −4 Original line number Diff line number Diff line Loading @@ -67,12 +67,14 @@ namespace ETSI.ARF.WorldStorage.UI winSingleton.worldStorageUser = user; if (!string.IsNullOrEmpty(UUID)) { winSingleton.saveText = "Update"; winSingleton.UUID = UUID; winSingleton.GetParams(); } else { // Create new one winSingleton.saveText = "Create"; winSingleton.AddObject(); } } Loading Loading @@ -155,7 +157,7 @@ namespace ETSI.ARF.WorldStorage.UI // --------------------- EditorGUILayout.BeginHorizontal(); GUI.backgroundColor = WorldStorageWindow.arfColors[2]; if (GUILayout.Button("Save")) if (GUILayout.Button(saveText)) { Debug.Log("PUT Trackable"); Loading @@ -170,7 +172,6 @@ namespace ETSI.ARF.WorldStorage.UI if (WorldStorageWindow.WorldStorageWindowSingleton != null) { WorldStorageWindow.WorldStorageWindowSingleton.GetTrackables(); WorldStorageWindow.WorldStorageWindowSingleton.repaint = true; } Close(); }); Loading @@ -194,7 +195,6 @@ namespace ETSI.ARF.WorldStorage.UI if (WorldStorageWindow.WorldStorageWindowSingleton != null) { WorldStorageWindow.WorldStorageWindowSingleton.GetTrackables(); WorldStorageWindow.WorldStorageWindowSingleton.repaint = true; } Close(); }); Loading Loading @@ -316,7 +316,6 @@ namespace ETSI.ARF.WorldStorage.UI UUID = response.result; UUID = UUID.Trim('"'); //Bugfix: remove " from server return value WorldStorageWindow.WorldStorageWindowSingleton.GetTrackables(); WorldStorageWindow.WorldStorageWindowSingleton.repaint = true; }); } Loading Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/WorldAnchorWindow.cs +3 −1 Original line number Diff line number Diff line Loading @@ -64,12 +64,14 @@ namespace ETSI.ARF.WorldStorage.UI winSingleton.worldStorageUser = user; if (!string.IsNullOrEmpty(UUID)) { winSingleton.saveText = "Update"; winSingleton.UUID = UUID; winSingleton.GetParams(); } else { // Create new one winSingleton.saveText = "Create"; winSingleton.AddObject(); } } Loading Loading @@ -152,7 +154,7 @@ namespace ETSI.ARF.WorldStorage.UI // --------------------- EditorGUILayout.BeginHorizontal(); GUI.backgroundColor = WorldStorageWindow.arfColors[2]; if (GUILayout.Button("Save")) if (GUILayout.Button(saveText)) { Debug.Log("PUT World Anchor"); Loading Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/WorldGraphWindow.cs +7 −1 Original line number Diff line number Diff line Loading @@ -122,6 +122,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows EditorGUI.BeginChangeCheck(); worldStorageServer = (WorldStorageServer)EditorGUILayout.ObjectField("World Storage Server", worldStorageServer, typeof(WorldStorageServer), false, GUILayout.Width(500)); worldStorageUser = (WorldStorageUser)EditorGUILayout.ObjectField("User", worldStorageUser, typeof(WorldStorageUser), false, GUILayout.Width(500)); if (EditorGUI.EndChangeCheck()) { GraphEditorWindow.ResetWindow(); Loading @@ -143,6 +144,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows myGraph.style.top = Length.Percent(11); myGraph.style.bottom = Length.Percent(5); rootVisualElement.Add(myGraph); Debug.Log("World Graph window initialized."); } catch (Exception e) { Loading @@ -163,7 +165,11 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows leftStyle.alignment = TextAnchor.MiddleLeft; GUILayout.Label("Augmented Reality Framework", leftStyle); GUILayout.Label("Copyright (C) 2022, ETSI (BSD 3-Clause License)", leftStyle); GUILayout.Label("Copyright (C) 2024, ETSI (BSD 3-Clause License)", leftStyle); //separator line Rect rect = EditorGUILayout.GetControlRect(false, 1); EditorGUI.DrawRect(rect, Color.gray); //reframe all elements to see them all if (SaveInfo.instance.toReFrame && (twoFrames == 2)) Loading Loading
Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/BaseWindow.cs +1 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ namespace ETSI.ARF.WorldStorage.UI protected Vector2 scrollPos; protected Color ori; protected GUIStyle gsTest; protected string saveText = "Save"; public void Update() { Loading
Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/GraphEditorWindow.cs +24 −11 Original line number Diff line number Diff line Loading @@ -189,6 +189,9 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows GUILayout.Label("Augmented Reality Framework", leftStyle); GUILayout.Label("Copyright (C) 2024, ETSI (BSD 3-Clause License)", leftStyle); //separator line Rect rect = EditorGUILayout.GetControlRect(false, 1); EditorGUI.DrawRect(rect, Color.gray); switch (type) { Loading Loading @@ -221,7 +224,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows //anchor icon EditorGUILayout.BeginHorizontal(); Texture anchorImage = (Texture)AssetDatabase.LoadAssetAtPath("Assets/ETSI.ARF/ARF World Storage API/Images/anchor.png", typeof(Texture)); GUI.backgroundColor = Color.clear; GUI.backgroundColor = WorldStorageWindow.arfColors[8]; GUILayout.Box(anchorImage, GUILayout.Width(40), GUILayout.Height(40)); //anchor label Loading @@ -245,7 +248,8 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows GUI.backgroundColor = Color.clear; GUILayout.BeginHorizontal(); GUILayout.Box(warningImage, GUILayout.Width(27), GUILayout.Height(27)); EditorGUILayout.LabelField("This element is not synchronized with the World Storage"); GUILayout.Label("This element is not synchronized with the World Storage!", EditorStyles.whiteBoldLabel); GUILayout.EndHorizontal(); } Loading @@ -260,7 +264,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows EditorGUILayout.LabelField("UUID ", EditorStyles.boldLabel, GUILayout.Width(50)); if (!SaveInfo.instance.nodePositions.ContainsKey(worldAnchor.UUID.ToString())) { EditorGUILayout.LabelField("none yet (element not yet saved in the server)"); EditorGUILayout.LabelField("None yet (element not yet saved in the server)"); } else { Loading @@ -268,6 +272,8 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows } EditorGUILayout.EndHorizontal(); GUI.backgroundColor = Color.white; //name EditorGUILayout.BeginHorizontal(); EditorGUI.BeginChangeCheck(); Loading Loading @@ -433,7 +439,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows // //FOOTER // GUILayout.FlexibleSpace(); //GUILayout.FlexibleSpace(); EditorGUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); Loading Loading @@ -494,6 +500,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows GUI.backgroundColor = Color.green; if (GUILayout.Button("Save")) { System.Guid _creator = Guid.NewGuid(); // System.Guid.Parse(WorldStorageWindow.WorldStorageWindowSingleton.worldStorageUser.UUID); if (SaveInfo.instance.nodePositions.ContainsKey(worldAnchor.UUID.ToString())) { if (SaveInfo.instance.elemsToUpdate.Contains(worldAnchor.UUID.ToString())) Loading @@ -510,6 +517,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows posX.Add(worldAnchorNode.GetPosition().x.ToString()); var posY = new Collection<String>(); posY.Add(worldAnchorNode.GetPosition().y.ToString()); WorldAnchor worldAnchor = worldAnchorNode.worldAnchor; worldAnchor.KeyvalueTags["unityAuthoringPosX"] = posX; worldAnchor.KeyvalueTags["unityAuthoringPosY"] = posY; Loading Loading @@ -560,7 +568,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows //trackable icon EditorGUILayout.BeginHorizontal(); Texture trackImage = (Texture)AssetDatabase.LoadAssetAtPath("Assets/ETSI.ARF/ARF World Storage API/Images/trackable.png", typeof(Texture)); GUI.backgroundColor = Color.clear; GUI.backgroundColor = WorldStorageWindow.arfColors[7]; GUILayout.Box(trackImage, GUILayout.Width(40), GUILayout.Height(40)); //trackable label Loading @@ -584,7 +592,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows GUI.backgroundColor = Color.clear; GUILayout.BeginHorizontal(); GUILayout.Box(warningImage, GUILayout.Width(27), GUILayout.Height(27)); EditorGUILayout.LabelField("This element is not synchronized with the World Storage"); GUILayout.Label("This element is not synchronized with the World Storage!", EditorStyles.whiteBoldLabel); GUILayout.EndHorizontal(); } Loading @@ -599,7 +607,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows EditorGUILayout.LabelField("UUID ", EditorStyles.boldLabel, GUILayout.Width(50)); if (!SaveInfo.instance.nodePositions.ContainsKey(trackable.UUID.ToString())) { EditorGUILayout.LabelField("none yet (element not yet saved in the server)"); EditorGUILayout.LabelField("None yet (element not yet saved in the server)"); } else { Loading @@ -607,6 +615,8 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows } EditorGUILayout.EndHorizontal(); GUI.backgroundColor = Color.white; //name EditorGUILayout.BeginHorizontal(); EditorGUI.BeginChangeCheck(); Loading Loading @@ -932,6 +942,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows TrackablePayload = new byte[64], LocalCRS = localCRS, Unit = UnitSystem.CM, Confidence = 0, TrackableSize = trackableSize, KeyvalueTags = new KeyvalueTagList() }; Loading Loading @@ -1010,7 +1021,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows //world link icon EditorGUILayout.BeginHorizontal(); Texture linkImage = (Texture)AssetDatabase.LoadAssetAtPath("Assets/ETSI.ARF/ARF World Storage API/Images/link.png", typeof(Texture)); GUI.backgroundColor = Color.clear; GUI.backgroundColor = WorldStorageWindow.arfColors[9]; GUILayout.Box(linkImage, GUILayout.Width(40), GUILayout.Height(40)); //world link label Loading @@ -1034,19 +1045,21 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows GUI.backgroundColor = Color.clear; GUILayout.BeginHorizontal(); GUILayout.Box(warningImage, GUILayout.Width(27), GUILayout.Height(27)); EditorGUILayout.LabelField("This element is not synchronized with the World Storage"); GUILayout.Label("This element is not synchronized with the World Storage!", EditorStyles.whiteBoldLabel); GUILayout.EndHorizontal(); } //ELEMENT'S ATTRIBUTES EditorGUI.BeginChangeCheck(); GUI.backgroundColor = Color.white; //uuid EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("UUID ", EditorStyles.boldLabel, GUILayout.Width(50)); if (!SaveInfo.instance.linkIds.Contains(worldLink.UUID.ToString())) { EditorGUILayout.LabelField("none yet (element not yet saved in the server)"); EditorGUILayout.LabelField("None yet (element not yet saved in the server)"); } else { Loading
Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/TrackableWindow.cs +3 −4 Original line number Diff line number Diff line Loading @@ -67,12 +67,14 @@ namespace ETSI.ARF.WorldStorage.UI winSingleton.worldStorageUser = user; if (!string.IsNullOrEmpty(UUID)) { winSingleton.saveText = "Update"; winSingleton.UUID = UUID; winSingleton.GetParams(); } else { // Create new one winSingleton.saveText = "Create"; winSingleton.AddObject(); } } Loading Loading @@ -155,7 +157,7 @@ namespace ETSI.ARF.WorldStorage.UI // --------------------- EditorGUILayout.BeginHorizontal(); GUI.backgroundColor = WorldStorageWindow.arfColors[2]; if (GUILayout.Button("Save")) if (GUILayout.Button(saveText)) { Debug.Log("PUT Trackable"); Loading @@ -170,7 +172,6 @@ namespace ETSI.ARF.WorldStorage.UI if (WorldStorageWindow.WorldStorageWindowSingleton != null) { WorldStorageWindow.WorldStorageWindowSingleton.GetTrackables(); WorldStorageWindow.WorldStorageWindowSingleton.repaint = true; } Close(); }); Loading @@ -194,7 +195,6 @@ namespace ETSI.ARF.WorldStorage.UI if (WorldStorageWindow.WorldStorageWindowSingleton != null) { WorldStorageWindow.WorldStorageWindowSingleton.GetTrackables(); WorldStorageWindow.WorldStorageWindowSingleton.repaint = true; } Close(); }); Loading Loading @@ -316,7 +316,6 @@ namespace ETSI.ARF.WorldStorage.UI UUID = response.result; UUID = UUID.Trim('"'); //Bugfix: remove " from server return value WorldStorageWindow.WorldStorageWindowSingleton.GetTrackables(); WorldStorageWindow.WorldStorageWindowSingleton.repaint = true; }); } Loading
Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/WorldAnchorWindow.cs +3 −1 Original line number Diff line number Diff line Loading @@ -64,12 +64,14 @@ namespace ETSI.ARF.WorldStorage.UI winSingleton.worldStorageUser = user; if (!string.IsNullOrEmpty(UUID)) { winSingleton.saveText = "Update"; winSingleton.UUID = UUID; winSingleton.GetParams(); } else { // Create new one winSingleton.saveText = "Create"; winSingleton.AddObject(); } } Loading Loading @@ -152,7 +154,7 @@ namespace ETSI.ARF.WorldStorage.UI // --------------------- EditorGUILayout.BeginHorizontal(); GUI.backgroundColor = WorldStorageWindow.arfColors[2]; if (GUILayout.Button("Save")) if (GUILayout.Button(saveText)) { Debug.Log("PUT World Anchor"); Loading
Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/WorldGraphWindow.cs +7 −1 Original line number Diff line number Diff line Loading @@ -122,6 +122,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows EditorGUI.BeginChangeCheck(); worldStorageServer = (WorldStorageServer)EditorGUILayout.ObjectField("World Storage Server", worldStorageServer, typeof(WorldStorageServer), false, GUILayout.Width(500)); worldStorageUser = (WorldStorageUser)EditorGUILayout.ObjectField("User", worldStorageUser, typeof(WorldStorageUser), false, GUILayout.Width(500)); if (EditorGUI.EndChangeCheck()) { GraphEditorWindow.ResetWindow(); Loading @@ -143,6 +144,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows myGraph.style.top = Length.Percent(11); myGraph.style.bottom = Length.Percent(5); rootVisualElement.Add(myGraph); Debug.Log("World Graph window initialized."); } catch (Exception e) { Loading @@ -163,7 +165,11 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows leftStyle.alignment = TextAnchor.MiddleLeft; GUILayout.Label("Augmented Reality Framework", leftStyle); GUILayout.Label("Copyright (C) 2022, ETSI (BSD 3-Clause License)", leftStyle); GUILayout.Label("Copyright (C) 2024, ETSI (BSD 3-Clause License)", leftStyle); //separator line Rect rect = EditorGUILayout.GetControlRect(false, 1); EditorGUI.DrawRect(rect, Color.gray); //reframe all elements to see them all if (SaveInfo.instance.toReFrame && (twoFrames == 2)) Loading