From c03a41c0f6381bba1ab3e210863e451a782b6882 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 27 Oct 2022 00:48:27 +0100 Subject: [PATCH] Addon -> Project --- .addon | 1 + code/BridgeSettings.cs | 2 +- code/SettingsWindow/SettingsWindow.Widgets.cs | 6 +++--- code/SettingsWindow/SettingsWindow.cs | 2 +- code/Utils/Template.cs | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.addon b/.addon index 1a6ba08..1a4e0d7 100644 --- a/.addon +++ b/.addon @@ -3,6 +3,7 @@ "Type": "tool", "Org": "local", "Ident": "quixel_bridge", + "Tags": null, "Schema": 1, "HasAssets": true, "AssetsPath": "", diff --git a/code/BridgeSettings.cs b/code/BridgeSettings.cs index 761f4c8..9fccaaa 100644 --- a/code/BridgeSettings.cs +++ b/code/BridgeSettings.cs @@ -53,7 +53,7 @@ private static BridgeSettings LoadFromDisk() var jsonInput = File.ReadAllText( SettingsFile ); var settings = JsonSerializer.Deserialize( jsonInput ); - settings.ProjectPath ??= Utility.Addons.GetAll().Where( x => x.Active ).FirstOrDefault().GetRootPath(); + settings.ProjectPath ??= Utility.Projects.GetAll().Where( x => x.Active ).FirstOrDefault().GetRootPath(); return settings; } diff --git a/code/SettingsWindow/SettingsWindow.Widgets.cs b/code/SettingsWindow/SettingsWindow.Widgets.cs index 2dc03f5..2ba60b8 100644 --- a/code/SettingsWindow/SettingsWindow.Widgets.cs +++ b/code/SettingsWindow/SettingsWindow.Widgets.cs @@ -17,7 +17,7 @@ private static LineEdit AddLineEdit( string label, string subtitle, Layout paren return lineEdit; } - private static ComboBox AddAddonPicker( string title, string subtitle, Layout parent, IReadOnlyList addons ) + private static ComboBox AddAddonPicker( string title, string subtitle, Layout parent, IReadOnlyList addons ) { AddTitle( title, parent ); AddSubtitle( subtitle, parent ); @@ -27,7 +27,7 @@ private static ComboBox AddAddonPicker( string title, string subtitle, Layout pa for ( int i = 0; i < addons.Count; i++ ) { - LocalAddon addon = addons[i]; + LocalProject addon = addons[i]; if ( !addon.Active ) continue; @@ -80,7 +80,7 @@ private static CheckBox AddCheckBox( string label, string subtitle, Layout paren return checkBox; } - private static string GetAddonIcon( LocalAddon addon ) + private static string GetAddonIcon( LocalProject addon ) { if ( addon.Config.Type == "map" ) return "public"; diff --git a/code/SettingsWindow/SettingsWindow.cs b/code/SettingsWindow/SettingsWindow.cs index f908f67..4f14f08 100644 --- a/code/SettingsWindow/SettingsWindow.cs +++ b/code/SettingsWindow/SettingsWindow.cs @@ -45,7 +45,7 @@ public void CreateUI() "Export Addon", "The addon where your imports will get sent to", addonSettings, - Utility.Addons.GetAll() ); + Utility.Projects.GetAll() ); } Layout.AddStretchCell( 1 ); diff --git a/code/Utils/Template.cs b/code/Utils/Template.cs index 8037e0a..df54758 100644 --- a/code/Utils/Template.cs +++ b/code/Utils/Template.cs @@ -23,7 +23,7 @@ public Template( string templatePath ) private string FindBasePath() { - var addon = Utility.Addons.GetAll().FirstOrDefault( x => x.Config.Ident == "quixel_bridge" ); + var addon = Utility.Projects.GetAll().FirstOrDefault( x => x.Config.Ident == "quixel_bridge" ); return addon.GetCodePath(); }