Compare commits
3 Commits
Contextual
...
main
Author | SHA1 | Date | |
---|---|---|---|
|
8e8a996812 | ||
|
c56311277c | ||
|
20818926de |
@ -1,5 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
|
#if UNITY_2022_1_OR_NEWER
|
||||||
using UnityEngine.UIElements;
|
using UnityEngine.UIElements;
|
||||||
|
#else
|
||||||
|
using UnityEditor.UIElements;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
namespace ImageProcessingGraph.Editor
|
namespace ImageProcessingGraph.Editor
|
||||||
{
|
{
|
||||||
@ -20,4 +25,5 @@ namespace ImageProcessingGraph.Editor
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -6,7 +6,7 @@ using Unity.Burst;
|
|||||||
|
|
||||||
namespace ImageProcessingGraph.Editor.Nodes.Types.Image.Utilities.ViewNode
|
namespace ImageProcessingGraph.Editor.Nodes.Types.Image.Utilities.ViewNode
|
||||||
{
|
{
|
||||||
[NodeInfo("View Texture", "Utility/View Texture", false, null ,typeof(ViewTextureNodeEditor))]
|
[NodeInfo("View Texture", "Utility/View Texture", false, null , editorType: typeof(ViewTextureNodeEditor))]
|
||||||
public partial class ViewTextureNode : BaseImageNode
|
public partial class ViewTextureNode : BaseImageNode
|
||||||
{
|
{
|
||||||
[NodeAttributes.Input("Texture")] public Texture2D texture;
|
[NodeAttributes.Input("Texture")] public Texture2D texture;
|
||||||
|
@ -313,6 +313,18 @@ namespace ImageProcessingGraph.Editor.Unity_Image_Processing.Scripts.Editor.Wind
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void BuildContextualMenu(ContextualMenuPopulateEvent evt)
|
||||||
|
{
|
||||||
|
evt.menu.InsertAction(evt.menu.MenuItems().Count, "Open Documentation", OpenDocumentation);
|
||||||
|
evt.menu.AppendSeparator();
|
||||||
|
base.BuildContextualMenu(evt);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OpenDocumentation(DropdownMenuAction obj)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void SavePosition() => graphNode.SetPosition(GetPosition());
|
public void SavePosition() => graphNode.SetPosition(GetPosition());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,19 +73,15 @@ namespace ImageProcessingGraph.Editor
|
|||||||
DrawNodes();
|
DrawNodes();
|
||||||
DrawConnections();
|
DrawConnections();
|
||||||
|
|
||||||
foreach (var conn in asset.Connections)
|
|
||||||
{
|
|
||||||
if (conn.internalEdge == null)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//GetNode(conn.inputPort.nodeID).ToggleExposedVariable(conn.internalEdge.input, true);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
graphViewChanged += OnGraphViewChanged;
|
graphViewChanged += OnGraphViewChanged;
|
||||||
Undo.undoRedoEvent += UndoEvent;
|
|
||||||
|
Undo.undoRedoPerformed += UndoRedoPerformed;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UndoRedoPerformed()
|
||||||
|
{
|
||||||
|
DrawNodes();
|
||||||
|
DrawConnections();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateButtons()
|
private void CreateButtons()
|
||||||
@ -237,12 +233,6 @@ namespace ImageProcessingGraph.Editor
|
|||||||
return compatiblePorts;
|
return compatiblePorts;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UndoEvent(in UndoRedoInfo undo)
|
|
||||||
{
|
|
||||||
DrawNodes();
|
|
||||||
DrawConnections();
|
|
||||||
}
|
|
||||||
|
|
||||||
private GraphViewChange OnGraphViewChanged(GraphViewChange graphviewchange)
|
private GraphViewChange OnGraphViewChanged(GraphViewChange graphviewchange)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -6,9 +6,11 @@ A tool for applying image transformations and effects using a graph-based node s
|
|||||||
|
|
||||||
- **Tested on:**
|
- **Tested on:**
|
||||||
- Unity 2022.3.50f1
|
- Unity 2022.3.50f1
|
||||||
|
- Unity 2021.3.16f1
|
||||||
- Unity 6000.0.19f1 (Unity 6)
|
- Unity 6000.0.19f1 (Unity 6)
|
||||||
|
|
||||||
- **Supported versions:**
|
- **Supported versions:**
|
||||||
|
- Unity 2021.3
|
||||||
- Unity 2022.0
|
- Unity 2022.0
|
||||||
- Unity 2023.0
|
- Unity 2023.0
|
||||||
- Unity 6000.0
|
- Unity 6000.0
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "com.chromium.imageprocessingrah",
|
"name": "com.chromium.imageprocessingrah",
|
||||||
"version": "0.0.0",
|
"version": "0.0.1",
|
||||||
"displayName": "Image Processing Graph",
|
"displayName": "Image Processing Graph",
|
||||||
"description": "Stuffs",
|
"description": "Stuffs",
|
||||||
"unity": "2022.3",
|
"unity": "2021.3",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.burst": "1.8.17"
|
"com.unity.burst": "1.8.17"
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user