summaryrefslogtreecommitdiffstats
path: root/Scripts/Fold/Editor/FoldWindow.cs
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2026-01-01 16:56:53 -0800
committeryum <yum.food.vr@gmail.com>2026-01-01 16:56:53 -0800
commitd06bf919efd978f018ddcb4e2d5807a7783fcc84 (patch)
treeeb2a6ad6602ff13ed3ab95111f0e6fd940d911d4 /Scripts/Fold/Editor/FoldWindow.cs
parente70d2cb317295571c57abd229846424754dff937 (diff)
Begin work on "Fold," a node UI for manipulating vertex deformations
The idea is to expose a visual programming environment to speed up & simplify animating vertex deformation effects.
Diffstat (limited to 'Scripts/Fold/Editor/FoldWindow.cs')
-rw-r--r--Scripts/Fold/Editor/FoldWindow.cs41
1 files changed, 41 insertions, 0 deletions
diff --git a/Scripts/Fold/Editor/FoldWindow.cs b/Scripts/Fold/Editor/FoldWindow.cs
new file mode 100644
index 0000000..186008c
--- /dev/null
+++ b/Scripts/Fold/Editor/FoldWindow.cs
@@ -0,0 +1,41 @@
+using UnityEngine;
+using UnityEditor;
+using GraphProcessor;
+
+public class FoldWindow : BaseGraphWindow
+{
+ BaseGraph tmpGraph;
+
+ [MenuItem("Tools/yum_food/Fold")]
+ public static BaseGraphWindow Open()
+ {
+ var graphWindow = CreateWindow<FoldWindow>();
+
+ graphWindow.tmpGraph = ScriptableObject.CreateInstance<BaseGraph>();
+ graphWindow.tmpGraph.hideFlags = HideFlags.HideAndDontSave;
+ graphWindow.InitializeGraph(graphWindow.tmpGraph);
+
+ graphWindow.Show();
+ return graphWindow;
+ }
+
+ protected override void OnDestroy()
+ {
+ graphView?.Dispose();
+ DestroyImmediate(tmpGraph);
+ }
+
+ protected override void InitializeWindow(BaseGraph graph)
+ {
+ titleContent = new GUIContent("Fold");
+
+ if (graphView == null)
+ {
+ graphView = new FoldGraphView(this);
+ graphView.Add(new FoldToolbarView(graphView));
+ }
+
+ rootView.Add(graphView);
+ }
+}
+