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

57 Commits

Author SHA1 Message Date
LoomDoom
b23e769c3b added cases to handle Copy and Rename for scenegraphs correctly 2022-08-27 13:28:00 +02:00
Kailey Joanette
f1cbe6191d Limit AdvancedGenericMenu to UNITY_2019_1_OR_NEWER 2021-12-26 15:12:46 -05:00
Kailey Joanette
3666509002 Advanced Generic menu that can be searched 2021-12-25 13:07:43 -05:00
ZLX
e17e9a8ba1 Fix node order in AddContextMenuItems with filter 2021-06-11 13:41:34 +08:00
Thor Brigsted
822b7ae156 Formatting 2020-12-17 13:50:11 +01:00
juliocp
eba850ba98 Merge branch 'changes_to_theme_work' into context_menu_filter 2020-10-12 21:21:25 -03:00
juliocp
fdd9b24eca Added Virtual portStyle
- Added the GetPortStyle(...) as virtual method at GraphEditor.
With this, users can customize the texture for different ports, and they can also modify the padding without having to overwrite the default xNode style.

This prevents many problems when working with multiple graphics.

The style properties used from Style is:
- padding-left.
- padding-right.
- normal.background, to border texture.
- active.background, to dot texture.
2020-10-12 21:17:53 -03:00
juliocp
c316f5d80f Merge remote-tracking branch 'upstream/master' into context_menu_filter 2020-10-12 11:05:00 -03:00
Thor Brigsted
cde52ff21a Formatting 2020-10-12 09:40:40 +02:00
juliocp
b0f20cafa4 renamed dragToCreate to createFilter
- Renamed the preferences dragToCreateFilter to createFilter
- Removed dragToCreate as a condition to use createFilter
2020-10-07 21:08:31 -03:00
juliocp
37d82ad215 Added DragToCreate compatible filter
- Added preference to filter the nodes from the draggable context menu, to show only nodes that have ports compatible with the dragged port
- Minor modification in NodeEditorActions, to allow the filter
- Minor modification in NodeGraphEditor to use or not the filter, based in preferences
2020-10-07 19:31:07 -03:00
juliocp
2d91e45dba Added parameter to AddContexMenuItens
- Added parameters to get contextMenu with compatibles node filter.
These parameters are auto-filled and do not interfere with the standard operation of this function.

> Param: Type compatibleType:
Use it to filter only nodes with ports value type, compatible with this type: Default null.

> Param: NodePor.IO:
Direction of the compatiblity: (Default Input)
2020-10-07 19:12:35 -03:00
juliocp
7c301c88a7 Virtual GetPortBackgroundColor at NodeGraph
Exposed virtual method to control the color of the background Port. Now it is possible to override in the NodeGraph.
Will be used to spotlight compatible ports!
2020-10-05 21:44:46 -03:00
juliocp
629474d042 Added Noodle Thickness at preferences
The default value for the thickness of the noodle can be modified from xNode preferences.

This value is only effective if the user does not make an override from the EditorGraph at GetNoodleThickness(...).

Many users do not like to edit from the script, this will help in the creation of my new layout template, similar to the new graphView from unity
2020-10-05 16:25:08 -03:00
Thor Brigsted
d9d90f0f7b
Add [RequireNode] attribute to graphs (#254) 2020-04-24 15:57:50 +02:00
Romain Théry
c298b5ee53
Add virtual OnWindowFocus and OnWindowFocusLost in NodeGraphEditor(#253) 2020-04-23 15:08:43 +02:00
Romain Théry
ff2c1e8158
Mark CopyNode as virtual (#252) 2020-04-23 11:27:02 +02:00
Thor Brigsted
8965d365e6 Add [DisallowMultipleNodes] for limiting how many nodes of a certain type can exist on any graph 2020-04-21 15:31:07 +02:00
Simon Rodriguez
a61bb3f87e
Implemented OrderBy in Add Node Menu (#247) 2020-04-14 08:11:21 +02:00
Thor Brigsted
e2c7934f1e Limit the OnDropObjects warning to only show when a node graph editor is present 2020-04-04 14:01:05 +02:00
Thor Brigsted
f3b211ed83 Fixed error on adding nodes in scene graphs 2020-04-03 11:26:12 +02:00
Marco Secchi
be0d452d12 Fix wrong override message. (#204) 2019-11-06 11:53:13 +01:00
Wang Cong
2d1a671b71 Undo support (#199)
Added undo support for move, create, duplicate and delete node, and connect port
2019-11-06 11:42:22 +01:00
Thor Brigsted
421fb5747e Added virtual NodeEditorGraph.GetNoodlePath and GetNoodleStroke for additional customization 2019-10-17 00:16:36 +02:00
Thor Brigsted
08af93c2e3 Added NodeGraphEditor.GetNoodleThickness 2019-10-16 23:08:07 +02:00
Igor Vasiak
63b0bf428b Added gradients to connection noodles (#191)
Upgrade notice: Override GetNoodleGradient instead of GetNoodleColor
2019-10-15 17:13:54 +02:00
Thor Brigsted
4b073648c9 Added noodle hover highlight 2019-09-25 10:48:36 +02:00
Thor Brigsted
979bd5f7cf Added nodeGraphEditor.GetNoodleColor
Now you can override the color of noodles!
2019-09-23 23:25:23 +02:00
MowfaqAlarbi
5433e36837 Show Node Create list When Dragging To Nothing (#183)
And a user setting to disable it, of course
2019-09-06 19:13:00 +02:00
Thor Brigsted
788b8d8a0b Automatically remove "Node" postfix from creation menu 2019-08-12 00:11:14 +02:00
Thor Brigsted
891ecebc3f Put NodeEditorReflection into its own static class 2019-07-24 10:04:05 +02:00
Thor Brigsted
d0e1cd5d66 Fixed #144 - Added virtual GetPortTooltip in NodeGraphEditor 2019-06-29 16:56:50 +02:00
William Henry
9b239c3564 Added Drop event to Node Graph (#157)
Override NodeGraphEditor.OnDropObjects to deal with items dropped into the graph through DragAndDrop
2019-06-29 00:04:39 +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
Simon Rodriguez
833e26ccc3 Make RemoveNode + switch order
* made RemoveNode function virtual
used for example when a graph wants to block a delete

* switched order of remove function and destroy function.
target.RemoveNode was always getting a null value
2019-05-13 20:53:34 +02:00
Thor Brigsted
d68aea2a8a Fixed #142 - New feature: Automatically remove "Node" postfix in names 2019-05-10 09:55:10 +02:00
Thor Brigsted
8adc4fd459 Fixed #128, #127, #64 - Added NodeEditorBase.OnCreate, OnGraphEditor.OnOpen, and NodeEditorBase.window 2019-04-06 13:27:44 +02:00
Thor Brigsted
f6e0e3bc4d Added NodeGraphEditor.GetPortColor 2019-04-03 21:50:29 +02:00
Thor Brigsted
3972ac5abf Allow naming nodes in Init 2019-01-21 22:25:05 +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
b9bd67bd28 Cleanup
Removed unused code, added/fixed comments
2018-10-30 09:38:44 +01:00
Thor Brigsted
c202829c9d Bugfix and old code removal
Fixed NodeEditorGUILayout.PortField being inconsistent with Ports drawn by NodeEditorGUILayout.PropertyField
Removed obsolete NodeEditorGraph.GetNodePath
2018-06-21 23:21:32 +02:00
Thor Brigsted
61ca00ce31 Renamed GetNodePath to GetNodeMenuName (consistency)
Empty menuNames now skips, just like null does
2018-05-13 12:18:16 +02:00
Thor Brigsted
2582d5aaf3 Added option to disable autosave in preferences 2018-04-13 10:46:51 +02:00
Thor Brigsted
bab898e489 Exposed virtual OnGUI() and 'position' for graph editors 2018-04-10 22:59:32 +02:00
Thor Brigsted
ba8b9ef447 Removed unused dictionary 2018-04-10 22:57:25 +02:00
Thor Brigsted
1885d453a4 Removed #if UNITY_EDITOR from NodeGraph.cs #23 2018-04-05 21:53:03 +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