- 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.
- 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
- 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)
_ 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
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,
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.
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
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!
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)
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