1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 09:16:01 +08:00

73 Commits

Author SHA1 Message Date
Thor Brigsted
b8c08a8eb1 WIP 2019-05-09 17:21:38 +02:00
Thor Brigsted
e89671480c WIP 2019-05-08 22:53:15 +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
Thor Brigsted
94b9318858 Renamed some methods 2017-10-16 21:08:35 +02:00
Thor Brigsted
d498484802 Prettified default node titles 2017-10-15 18:07:52 +02:00
Thor Brigsted
81f01cefc9 Added editor callback onUpdateNode 2017-10-15 16:31:46 +02:00
Thor Brigsted
5e68b6bcdc Big update.
Removal of scripts now also clears dependant nodes, to avoid null objects.
NodePorts now support fallback values.
UI Changes.
node.graph is now serialized as well.
2017-10-14 16:19:24 +02:00
Thor Brigsted
c1db2d9e4b Minor UI design changes 2017-10-14 10:52:20 +02:00
Thor Brigsted
427dc8d53c Added NodeEditorGUILayout static class. Improved int, float, double, long editor fields. 2017-10-14 10:47:16 +02:00
Thor Brigsted
64282028aa Code FixFormat
None of the code was changed, just moved around.
2017-10-14 08:37:33 +02:00
Thor Brigsted
9abdf2995e Added Node Editor entry in Preferences. Custom colors for value types can now be assigned 2017-10-14 08:33:46 +02:00