Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: scenario tab created, refresh models and images #189

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package/Editor/CompositionEditor/CompositionEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class CompositionEditor : EditorWindow
internal RenderTexture renderTexture;
private Texture2D screenshot;

[MenuItem("Window/Scenario/Editors/Composition Editor", false,0)]
[MenuItem("Scenario/Editors/Composition Editor", false,0)]
public static void ShowWindow()
{
var window = GetWindow<CompositionEditor>("Composition Editor");
Expand Down
2 changes: 1 addition & 1 deletion package/Editor/DataBuilder/DataBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ private enum ScreenshotType
private float cameraDistance = 2f;
private float lightDistance = 2f;

[MenuItem("Window/Scenario/Builders/3D Data Builder", false, 0)]
[MenuItem("Scenario/Builders/3D Data Builder", false, 0)]
public static void ShowWindow()
{
GetWindow<DataBuilder>("3d Data Builder");
Expand Down
2 changes: 1 addition & 1 deletion package/Editor/ImageEditor/ImageEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class ImageEditor : EditorWindow

private static float minimumWidth = 1775f;

[MenuItem("Window/Scenario/Editors/Image Editor", false, 1)]
[MenuItem("Scenario/Editors/Image Editor", false, 1)]
public static void ShowWindow()
{
ImageEditor window = GetWindow<ImageEditor>("Image Editor");
Expand Down
3 changes: 2 additions & 1 deletion package/Editor/Images/Images.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class Images : EditorWindow
/// </summary>
internal static string cdnExtension = "&format=jpeg&quality=80&width=256";

[MenuItem("Window/Scenario/Images", false, 10)]
[MenuItem("Scenario/Images", false, 10)]
public static void ShowWindow()
{
if (isVisible)
Expand All @@ -46,6 +46,7 @@ public static void ShowWindow()
GetInferencesData();

var images = (Images)GetWindow(typeof(Images));
images.autoRepaintOnSceneChange = true;
ImagesUI.Init(images);
}

Expand Down
2 changes: 1 addition & 1 deletion package/Editor/InpaintingEditor/InpaintingEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class InpaintingEditor : EditorWindow
private static InpaintingEditorUI inpaintingEditorUI;
private static Texture2D inpaintingTexture;

[MenuItem("Window/Scenario/Editors/Inpainting Editor", false, 2)]
[MenuItem("Scenario/Editors/Inpainting Editor", false, 2)]
public static void ShowWindow()
{
InpaintingEditor window = GetWindow<InpaintingEditor>("Inpainting Editor");
Expand Down
3 changes: 2 additions & 1 deletion package/Editor/Isometric Workflow/IsometricWorkflow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public class IsometricWorkflow : EditorWindow

#endregion

[MenuItem("Window/Scenario/Workflows/1. Isometric Workflow")]
[MenuItem("Scenario/Workflows/1. Isometric Workflow")]
public static void ShowWindow()
{
if (isVisible)
Expand All @@ -165,6 +165,7 @@ public static void ShowWindow()
InferenceManager.SilenceMode = true;

var isometricWorkflow = GetWindow<IsometricWorkflow>("Isometric Workflow");
isometricWorkflow.autoRepaintOnSceneChange = true;
isometricWorkflow.minSize = new Vector2(1024, 625);

if (isometricWorkflow.isometricStartScreen == null)
Expand Down
2 changes: 1 addition & 1 deletion package/Editor/LayerEditor/LayerEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class LayerEditor : EditorWindow
private LayerEditorRightPanel rightPanel;
private ContextMenuActions contextMenuActions;

[MenuItem("Window/Scenario/Editors/Layer Editor", false, 3)]
[MenuItem("Scenario/Editors/Layer Editor", false, 3)]
public static void ShowWindow()
{
GetWindow<LayerEditor>("Layer Editor");
Expand Down
5 changes: 4 additions & 1 deletion package/Editor/Models/Models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ private void OnGUI()

private void OnEnable()
{
ShowWindow();
SetTab(privacyQuickStart);
}

Expand All @@ -96,14 +97,16 @@ private void OnDestroy()
isProcessing = false;
}


#endregion

#region Public Methods

[MenuItem("Window/Scenario/Models", false, 11)]
[MenuItem("Scenario/Models", false, 11)]
public static void ShowWindow()
{
window = GetWindow<Models>("Models");
window.autoRepaintOnSceneChange = true;
window.minSize = new Vector2(MinimumWidth, window.minSize.y);
}

Expand Down
2 changes: 1 addition & 1 deletion package/Editor/PixelEditor/PixelEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class PixelEditor : EditorWindow
private static readonly float MinimumWidth = 1650f;
private PixelEditorUI pixelEditorUI = new();

[MenuItem("Window/Scenario/Editors/Pixel Editor", false, 4)]
[MenuItem("Scenario/Editors/Pixel Editor", false, 4)]
public static void ShowWindow()
{
var window = EditorWindow.GetWindow(typeof(PixelEditor), false, "Pixel Editor") as PixelEditor;
Expand Down
2 changes: 1 addition & 1 deletion package/Editor/Plugins/APIPricing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Scenario.Editor
{
public class APIPricingWindow : EditorWindow
{
[MenuItem("Window/Scenario/API Pricing", false, 101)]
[MenuItem("Scenario/API Pricing", false, 101)]
public static void ShowWindow()
{
Application.OpenURL("https://docs.scenario.com/page/api-pricing");
Expand Down
2 changes: 1 addition & 1 deletion package/Editor/PromptWindow/PromptBuilderWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class PromptBuilderWindow : EditorWindow
public static Action<string> onReturn;
public static PromptBuilderWindow Instance;

[MenuItem("Window/Scenario/Builders/Prompt Builder", false, 1)]
[MenuItem("Scenario/Builders/Prompt Builder", false, 1)]
public static void ShowWindow()
{
Instance = GetWindow<PromptBuilderWindow>("Prompt Builder");
Expand Down
2 changes: 1 addition & 1 deletion package/Editor/PromptWindow/PromptWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class PromptWindow : EditorWindow

private CreationMode activeMode = null;

[MenuItem("Window/Scenario/Prompt Window", false, 5)]
[MenuItem("Scenario/Prompt Window", false, 5)]
public static void ShowWindow()
{
var promptWindow = GetWindow<PromptWindow>("Prompt Window");
Expand Down
2 changes: 1 addition & 1 deletion package/Editor/Settings/PluginSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private void OnEnable()
}
}

[MenuItem("Window/Scenario/Scenario Settings", false, 100)]
[MenuItem("Scenario/Scenario Settings", false, 100)]
public static void ShowWindow()
{
GetWindow<PluginSettings>("Scenario Settings");
Expand Down
2 changes: 1 addition & 1 deletion package/Editor/UpscaleEditor/UpscaleEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class UpscaleEditor : EditorWindow
private static readonly float MinimumWidth = 1650f;
private static readonly UpscaleEditorUI UpscaleEditorUI = new();

[MenuItem("Window/Scenario/Editors/Upscale Editor", false, 5)]
[MenuItem("Scenario/Editors/Upscale Editor", false, 5)]
public static void ShowWindow()
{
var window = EditorWindow.GetWindow(typeof(UpscaleEditor), false, "Upscale Editor") as UpscaleEditor;
Expand Down
Loading