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

512 Commits

Author SHA1 Message Date
Kailey Joanette
75a04920b1 Fixed an issue with Undo / Redo not working correctly with Odin PropertyTree 2020-12-16 10:55:45 +01:00
Simon Rodriguez
d4deeed45b Added support in preferences for default node tint 2020-11-18 08:41:49 +01:00
Thor Brigsted
6aacfbfd2d SceneGraph draw default inspector 2020-11-14 16:25:16 +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
a03c4c5d0e Added filtered node at port contextMenu
Added compatible menus when the right mouse button is clicked on the port and preferences filter is active
2020-10-07 20:57:40 -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
1b32e2ec03 Added new methods at NodeEditorUtilities
_ HasCompatiblePortType:
Looking for ports with value Type compatible with a given type.

- GetCompatibleNodesTypes:
Filter only node types that contains some port value type compatible with an given type
2020-10-07 19:00:56 -03:00
juliocp
72c7ca9d04 Port Padding BugFIX
Added the separate port padding to control the port's offset position in relation to the node content padding

Currently, if I try to create a custom theme for node, i will be stuck with the port padding, because currently there are not separate padding from the node,
2020-10-07 16:33:10 -03:00
juliocp
e820157fad Some useful methods for research at NodeEditorAction
Some useful methods for research.

Now with these methods and the previous commit it is now possible to play not only with the theme of xNode but also with the functionality of ports, nodes and noodles.
2020-10-07 11:16:25 -03:00
juliocp
cce4b44091 Update NodeEditorAction.cs
I made these variables public to be able to work with more information from GraphEditor. They are only Boolean and do not pose any danger.

- IsDraggingPort:
- IsHoveringPort
- IsHoveringNode
- IsHoveringReroute
2020-10-06 11:11:29 -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
7aefddfaae Default background and grid Color
Changed the default background and grid colors of the graph in the preferences. This will maintain the new layout of nodes and ports uniform with the background. (More Clean)
2020-10-05 16:52:28 -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
af34ea6c47 Revert "Fixed mouse propagation in custom graph editors. Now you can use buttons and other controls."
This reverts commit 22b379353016739d0d537ee3920299a00ce451f5.
2020-09-09 11:53:51 +02:00
Thor Brigsted
22b3793530 Fixed mouse propagation in custom graph editors. Now you can use buttons and other controls. 2020-09-08 18:43:32 +02:00
Simon Rodriguez
b5fb59a84e
Added OpenOnCreate settings. (#295)
Adds the option to prevent opening the graph editor when creating a new graph.
Suggested in Issues #286
2020-08-26 21:51:45 +02:00
Simon Rodriguez
123415bd83
tooltips on label fields. serializedproperty.tooltip is broken and is always empty. (#294) 2020-08-26 21:50:53 +02:00
Simon Rodriguez
b6528a255c
Added InheritedAny for cases where a middle class can get inputs from child class and parent class (#293) 2020-08-26 21:49:48 +02:00
Meng Fanye
e2a0037b4d
fix: connections will break after InsertDuplicateNodes and restarting unity editor (#290) 2020-08-25 09:54:23 +02:00
MYTNB
1fb94b2413
Fix Port Disconnect Bug (#289) 2020-08-13 13:08:58 +02:00
MYTNB
85341bf4cc
Add Disconnect(Node) Menu And Node Header Tooltip (#288) 2020-08-11 08:31:53 +02:00
belivo
60a8e89cdb
fix node and graph multi-edit (#273)
Co-authored-by: Israel Prince-Beliveau <iprincebeliveau@kabaminc.com>
2020-06-11 21:40:04 +02:00
Christiaan Bloemendaal
6c85abf9bc
Fix handles color not being reset to original color (#266)
Co-authored-by: Christiaan Bloemendaal <christiaan@codeglue.com>
2020-05-27 14:20:37 +02:00
chrisfairc
a8daac60b0
Add a dragthreshold to better distunguish right clicks and right drags (#230)
* add a drag threshold so right clicks are better distinguished from right drags especially on large screens

* ignore mac files too

* dont use less than 1 as a drag threshold

Co-authored-by: Chris Fairclough <chris@zulleon.com>
2020-05-27 08:20:20 +02:00
fdtdev
8046e6e0bf
[FIX] fix a problem when a complex class with optional port drawing is used with NodeEditorGUILayout.DynamicPortList. By having an item that wasn't drawing the port, the method was throwing a KeyNotFoundException when reordering. (#262)
The fix detects if there isn't a port when swapping rects.
2020-05-09 13:21:35 +02:00
Romain Théry
4c6d22a152
Improve rename popup (#256) 2020-05-07 10:21:39 +02:00
Dan Erhardt
a1cf78d3fb
Fix for AutoConnect method. (#255)
Prevents incompatible connections between node ports when creating a new node on connection drag.
2020-04-26 17:44:46 +02: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
c2a99ba2b5 Improved commenting on attributes 2020-04-21 15:52:06 +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
Dan Erhardt
bbdbee90a1
Fix to prevent division by 0 (#251) 2020-04-20 16:56:33 +02:00
Dan Erhardt
e704b97c77
A fix for an ArgumentException error. (#250)
This is the fix proposed by nostravaganza on discord.
It works 100%. Could not reproduce the error again.
2020-04-20 16:21:19 +02:00
Thor Brigsted
049a62465c Made nodeEditorWindow.selectedReroutes public 2020-04-19 20:41:12 +02:00
Simon Rodriguez
a61bb3f87e
Implemented OrderBy in Add Node Menu (#247) 2020-04-14 08:11:21 +02:00
Simon Rodriguez
76cf825090 Suggestion! A new way of drawing lines very similar to Unitys upcoming Shader Node Editor. 2020-04-13 19:35:52 +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
f899e48ee0 Added undo support and default graph name to SceneGraph 2020-04-03 15:01:44 +02:00
Thor Brigsted
f3b211ed83 Fixed error on adding nodes in scene graphs 2020-04-03 11:26:12 +02:00
Thor Brigsted
6a69cdaf9c New component: SceneGraph, lets you create a graph inside the scene which can reference scene objects. 2020-04-03 11:09:57 +02:00
Thor Brigsted
172bdbb7e5
Merge pull request #237 from jeffcampbellmakesgames/fix/cache_adds_duplicate_fields
Added fix for duplicate node fields found
2020-03-08 14:46:23 +01:00
Jeff Campbell
9add4e11b2
Added fix for rename bug with v2 AssetDatabase (#239)
* Added fix for NodeGraph rename bug with v2 AssetDatabase where renaming a graph asset can sometimes result in it being swapped as the main asset with one of the node sub assets.
2020-03-08 12:56:57 +01:00
Jeff Campbell
11b7f4ac44 Added NRE check for ValidateGraphEditor
* Added NRE check to prevent exception when NodeGraphEditor.GetEditor returns null and an existing non-null graph editor is already present.
2020-03-07 21:30:46 +01:00
Jeff Campbell
bbfc44b04f Added fix for duplicate node fields found
* Added fix for duplicate node fields found while iterating through base fields; on 2019.3 using .Net 20 getting the fields of the node type will return all base type fields as well. This results in the iteration up through the base classes and adding their instance fields resulting in duplicates which causes errors on node creation when assigning port information.
2020-02-28 22:52:30 +01:00