Skip to content

Commit

Permalink
Addon -> Project
Browse files Browse the repository at this point in the history
  • Loading branch information
xezno committed Oct 26, 2022
1 parent 150b2d9 commit c03a41c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .addon
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"Type": "tool",
"Org": "local",
"Ident": "quixel_bridge",
"Tags": null,
"Schema": 1,
"HasAssets": true,
"AssetsPath": "",
Expand Down
2 changes: 1 addition & 1 deletion code/BridgeSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private static BridgeSettings LoadFromDisk()
var jsonInput = File.ReadAllText( SettingsFile );
var settings = JsonSerializer.Deserialize<BridgeSettings>( 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;
}
Expand Down
6 changes: 3 additions & 3 deletions code/SettingsWindow/SettingsWindow.Widgets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<LocalAddon> addons )
private static ComboBox AddAddonPicker( string title, string subtitle, Layout parent, IReadOnlyList<LocalProject> addons )
{
AddTitle( title, parent );
AddSubtitle( subtitle, parent );
Expand All @@ -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;

Expand Down Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion code/SettingsWindow/SettingsWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
2 changes: 1 addition & 1 deletion code/Utils/Template.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit c03a41c

Please sign in to comment.