1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-21 01:36:03 +08:00

81 Commits

Author SHA1 Message Date
Fernando Molon Toigo
d54a03988a Added virtual GetBodyHighlightStyle (#197) 2019-11-23 01:47:39 +01:00
Simon Rodriguez
6a1c1dbb4f This line was not present before commit 43bcb54fda4378e46a678c866242954248a63702 (Odin inspector support (#182) and causes the window to repaint every frame but only if you have a custom node editor. 2019-10-09 10:20:11 +02:00
Thor Brigsted
085906efd2 Moved default EditorGUIUtility.labelWidth so that it can be overwritten in OnBodyGUI 2019-09-25 16:39:52 +02:00
Thor Brigsted
43bcb54fda Odin inspector support (#182)
* Added Odin Inspector support
* Added support for ports
2019-09-02 00:41:57 +02:00
Thor Brigsted
891ecebc3f Put NodeEditorReflection into its own static class 2019-07-24 10:04:05 +02:00
Thor Brigsted
8d64843d42 Node skin is now white with default grey tint
This lets you get more outrageous colors with [NodeTint]
2019-06-28 23:08:18 +02:00
Adsitoz
55dddf8142 Rename Revert (#164)
- Not working the same way across all versions of Unity.
2019-06-26 10:08:22 +02:00
Simon Rodriguez
5d45300935 Unified all functions that set the default node name (#161) 2019-06-23 11:54:14 +02:00
Simon Rodriguez
fefea30594 Added support for copy paste in menu and ctrl+c / ctrl+v / cmd+c / cmd+v. 2019-06-13 18:36:40 +02:00
Thor Brigsted
91151b327a Bugfix: Calling base.OnBodyGUI after drawing ports would make noodles disappear 2019-05-09 00:02:58 +02:00
Thor Brigsted
c3e85a9f82 UPGRADE NOTICE: Renamed 'instance ports' to 'dynamic ports'.
To upgrade, simply rename all your method calls involving instance ports eg. 'AddInstanceOutput' to the dynamic port equivalent eg. 'AddDynamicOutput'
There is no functional difference. The community just agreed this was a more fitting name for the feature.
2019-05-05 10:52:36 +02:00
Thor Brigsted
4263e45b24 Rework node renaming
Renaming now happens on a separate popup.
2019-03-08 19:50:31 +01:00
Thor Brigsted
6783324018 Fix drawing instance twice for instanceportlists 2019-03-04 18:29:43 +01:00
Thor Brigsted
2939fe4935 Added automatic drawing of instance ports
Fixed minor issue getting parentType twice
2019-03-02 11:53:54 +01:00
Thor Brigsted
c306701853 .Net 2.0 compatability 2019-02-17 12:39:25 +01:00
Simon Rodriguez
662e919aaa Renaming node to nothing (#112)
When the name is empty or just whitespaces, it reverts to the original node type name
2019-02-17 11:57:17 +01:00
Thor Brigsted
5b11e81027
Move context menu functions around to allow more customization (#87)
Moved NodeEditorWindow.ShowNodeContextMenu to NodeEditor.AddContextMenuItems
Moved NodeEditorWindow.ShowGraphContextMenu to NodeGraphEditor.AddContextMenuItems
Moved NodeEditorWindow.CreateNode to NodeGraphEditor.CreateNode
2018-12-15 12:40:16 +01:00
Thor Brigsted
5803ae45ba
Revert "Allow to trigger renames via F2 key" 2018-11-16 14:06:59 +01:00
Thor Brigsted
55e57dc2ac
Merge pull request #79 from tmorgner/TriggerRenameViaKeyboard
Allow to trigger renames via F2 key
2018-11-16 13:19:12 +01:00
Thomas Morgner
b138388c29 Allow to trigger renames via F2 key 2018-11-16 12:14:04 +00:00
Thomas Morgner
11c8f29672 Clear edit-mode when reselecting node while renaming node 2018-11-16 12:01:34 +00:00
Thor Brigsted
b9bd67bd28 Cleanup
Removed unused code, added/fixed comments
2018-10-30 09:38:44 +01:00
Thor Brigsted
e9c6b6f221 Removed middleman function 2018-10-27 19:57:13 +02:00
Thor Brigsted
16992c3972 Added NodeEditor.GetBodyStyle, allowing per-node body styles 2018-10-27 18:41:13 +02:00
Thor Brigsted
ff97cc4494 Switched Dict.ContainsKey out with Dict.TryGetValue for performance gain. 2018-09-09 18:25:41 +02:00
phoenixanimations
ffc061f64e
Update NodeEditor.cs
I initially found out about this through
https://docs.unity3d.com/ScriptReference/Editor.html 
specifically these two comments:

```csharp
// Update the serializedProperty - always do this in the beginning of OnInspectorGUI.
        serializedObject.Update ();
...
// Apply changes to the serializedProperty - always do this in the end of OnInspectorGUI.
        serializedObject.ApplyModifiedProperties ();
```

I'm assuming, although I don't know for sure, that since OnBodyGUI displays the serialize objects in the custom inspector, that it must follow the same rules as well. Either way these lines of code solve for me the glitch: pressing undo while typing and getting a disconnect between the node and the inspector.
2018-08-26 22:55:57 -04:00
Thor Brigsted
5a88ddbda6 Removed automatically setting header to white. Controlling header color is now easier 2018-06-25 22:46:07 +02:00
Simon Rodriguez
c015b6ec4b Added attribute NodeWidth.
Changes the width used when rendering the node in the editor.
2018-06-17 14:16:13 +02:00
Thor Brigsted
19e244212c Added NodeRename #11 2018-04-05 20:59:50 +02:00
Thor Brigsted
63b51aaa10 Added more preferences control
Preferences can now be saved with a custom key, and custom default settings can be specified.

Other changes:
XNodeInternal renamed to XNodeEditor.Internal
NodeEditorWindow.graphEditor exposed as public
2018-01-30 12:27:17 +01:00
Thor
66de07e1a7 More strongly typed namespaces to prevent import conflicts 2017-12-18 10:37:02 +01:00
neko1990
ec4429e969 compatibility patches, make xNode work on Unity 5.4. 2017-12-03 23:50:54 +08:00
Thor Brigsted
d7e133a822 Defined namespaces across all scripts prevent conflicts. 2017-12-02 09:56:41 +01:00
Thor Kramer Brigsted
aabd2e4145 Added NodeGraphEditor.GetTypeColor for custom node-graph specific type colors 2017-11-28 10:49:24 +01:00
Thor Kramer Brigsted
215a3475ea Small editor erformance gain. Removed PrettifyCamelCase.
Use ObjectNames.NicifyVariableName instead
2017-11-28 09:38:21 +01:00
Thor Kramer Brigsted
639680b4f2 Merge branch 'master' of https://github.com/Siccity/xNode.git into development 2017-11-27 09:31:15 +01:00
Thor Kramer Brigsted
e7f759497b NodeGraphEditor work continued 2017-11-27 09:29:07 +01:00
Thor Brigsted
8c688b9f8b Changed default node width from 200 to 208 to match grid lines 2017-11-26 23:35:11 +01:00
Jason Beetham
0f6fca09bd Fixed issue with NodeTint not working properly. 2017-11-25 19:47:40 -07:00
Thor Kramer Brigsted
710692a326 Added virtual NodeEdutor.GetTint() 2017-11-23 10:06:57 +01:00
Thor Kramer Brigsted
4ea25f6aee Initial NodeGraphEditor implementation 2017-11-22 14:54:06 +01:00
Thor Kramer Brigsted
07f1f9aac5 Maked NodeEditor.OnHeaderGUI as virtual 2017-11-20 09:51:12 +01:00
Thor Brigsted
c6a4735c71 Renamed to xNode
Added XNode and XNodeEDitor namespaces
Removed unnecessary usings
2017-11-05 23:42:31 +01:00
Thor Kramer Brigsted
86c7966fe6 Changed NodeEditor.OnHeaderGUI and NodeEditorOnBodyGUI to public 2017-11-02 17:46:44 +01:00
Thor Kramer Brigsted
90c3621795 Moved NodeEditor.[CustomNodeEditor].contextMenuName to Node.[CreateNodeMenu].menuName 2017-11-02 17:37:11 +01:00
Thor Kramer Brigsted
d3bb36fe0e Big update: Warning: Updating to this commit will break all node connections.
Internal NodePorts now uses dicts instead of lists. This is faster and more manageable.
Added instance ports.
Added Node.Ports, Node.Outputs, Node.Inputs, Node.InstanceOutputs, Node.InstanceInputs
Changed public GetInputByFieldName to GetInputValue and GetInputPort
2017-11-02 14:54:03 +01:00
Thor Kramer Brigsted
ab74f8fd36 OnBodyGUI() remake
Default OnBodyGUI now uses default PropertyFields as suppied by UnityEditor.
This means fields are drawn on nodes the same way as they are drawn in the inspector.
out portPosition has also been moved to a static field. It is set automatically using the NodeEditorGuiLayout methods.
Alternatively, you can alter it manually during your node GUI drawing.
2017-10-31 14:52:10 +01:00
Thor Kramer Brigsted
f335ecfbb5 Nodes now show unsupported value types as labels. 2017-10-31 11:25:49 +01:00
Thor Brigsted
2dc7450661 Improved userfriendlyness of [Input] and [Output] 2017-10-20 23:01:38 +02:00
Thor
9db84d1608 Replaced node Rect rect with node Vector2 position. Improved node hover check. 2017-10-19 15:15:34 +02:00