Commit ff10d30b authored by Nathan Chambron's avatar Nathan Chambron
Browse files

Merge branch 'mergeIntoGraphView' into 'develop'

Merge into graph view

See merge request !5
parents aa225982 76b27192
Loading
Loading
Loading
Loading
+18 −23
Original line number Diff line number Diff line
# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
#
# Modified from:
#     https://github.com/github/gitignore/blob/master/Unity.gitignore

/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Uu]serSettings/
[Tt]emp/
[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Mm]emoryCaptures/

# Fraunhofer HHI / IMC / Unity settings
#/[Aa]ssets/Fraunhofer
/[Aa]pp
/[Bb]in
/[Ee]xe

# Never ignore Asset meta data
!/[Aa]ssets/**/*.meta

# Uncomment this line if you wish to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools*

# TextMesh Pro files
#[Aa]ssets/TextMesh*Pro/

# Autogenerated Jetbrains Rider plugin
[Aa]ssets/Plugins/Editor/JetBrains*
# [Aa]ssets/AssetStoreTools*

# Visual Studio cache directory
.vs/
@@ -66,3 +51,13 @@ sysinfo.txt

# Crashlytics generated file
crashlytics-build.properties

# Windows
Thumbs.db
Thumbs.db.meta

# MacOS
*.DS_Store

# VS Code
*.vscode
 No newline at end of file
+18 −1
Original line number Diff line number Diff line
@@ -44,6 +44,24 @@ namespace Assets.ETSI.ARF.ARF_World_Storage_API.Editor.Windows
        //to delay the reframe (otherwise it reframes when the graph isn't built yet)
        int twoFrames = 0;

        public static void ShowWindowFromWorldStorageWindow(WorldStorageServer server, WorldStorageUser user)
        {
            var window = GetWindow<WorldGraphWindow>("Graph Editor", true, typeof(SceneView));
            if (window.myGraph != null)
            {
                if (window.myGraph.ServerAndLocalDifferent() && EditorUtility.DisplayDialog("Saving node positions", "The World Graph has been modified. \nWould you like to push the modifications to the server ?", "Yes", "No"))
                {
                    window.myGraph.SaveInServer();
                }
                window.rootVisualElement.Remove(window.myGraph);
            }
            GraphEditorWindow.ResetWindow();
            window.worldStorageServer = server;
            window.worldStorageUser = user;
            SaveInfo.instance.nodePositions = null;
            window.OnEnable();
        }

        [MenuItem("ARFWorldStorage/Edit Graph...")]
        public static void ShowWindow()
        {
@@ -52,7 +70,6 @@ namespace Assets.ETSI.ARF.ARF_World_Storage_API.Editor.Windows

        public void OnEnable()
        {
            //rootVisualElement.Add(GenerateToolbar());
            if (worldStorageServer != null)
            {
                try { 
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ MonoImporter:
  serializedVersion: 2
  defaultReferences:
  - m_ViewDataDictionary: {instanceID: 0}
  - worldStorageServer: {fileID: 11400000, guid: 3a9ba82f4e8dd124ca2b005861c64d01, type: 2}
  - worldStorageServer: {instanceID: 0}
  - worldStorageUser: {fileID: 11400000, guid: c0696089e4a855b46ad490437919b1e8, type: 2}
  executionOrder: 0
  icon: {instanceID: 0}
+3 −7
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ using UnityEngine;
using UnityEditor;
using ETSI.ARF.WorldStorage;
using ETSI.ARF.WorldStorage.REST;
using Assets.ETSI.ARF.ARF_World_Storage_API.Editor.Windows;

#if USING_OPENAPI_GENERATOR
using Org.OpenAPITools.Api;
@@ -133,6 +134,7 @@ namespace ETSI.ARF.WorldStorage.UI
            GUI.backgroundColor = WorldStorageWindow.arfColors[4];
            if (GUILayout.Button("Open World Representation Graph Window..."))
            {
                WorldGraphWindow.ShowWindowFromWorldStorageWindow(worldStorageServer, worldStorageUser);
            }
            GUI.backgroundColor = ori;

@@ -194,12 +196,6 @@ namespace ETSI.ARF.WorldStorage.UI
            ScriptableObject target = this;
            SerializedObject so = new SerializedObject(target);

            GUI.backgroundColor = WorldStorageWindow.arfColors[4];
            if (GUILayout.Button("Open World Graph Window..."))
            {
            }
            GUI.backgroundColor = ori;

            // ###########################################################
            // Get creators
            // ###########################################################
+181 −1040

File changed.

Preview size limit exceeded, changes collapsed.