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

87 Commits

Author SHA1 Message Date
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
Thor Brigsted
cde52ff21a Formatting 2020-10-12 09:40:40 +02: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
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
Simon Rodriguez
123415bd83
tooltips on label fields. serializedproperty.tooltip is broken and is always empty. (#294) 2020-08-26 21:50:53 +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
Lumos
7e93ffe4b7 Fix for the dynamic port "serialisation desync" problem. (#223)
* Exclude strings from array types manually to prevent them from being treated as char arrays.
2020-01-21 08:01:57 +01:00
Simon Rodriguez
72ff273b5c Rewrite that caches the ordered property attributes so the gui layout drawer can draw them in the correct order.
Rewrote how the property attributes are drawn, more compact less messy code.
2019-11-12 22:37:29 +01:00
Simon Rodriguez
984fe730c0 Added support for [Header] attribute 2019-11-08 09:57:54 +01:00
Thor Brigsted
4e1b2e1fe6 Fixed warning 2019-09-07 04:03:00 +02:00
Thor Brigsted
5bc267d23b Fixed #119 - node port background color inconsistency 2019-07-24 23:52:31 +02:00
Thor Brigsted
891ecebc3f Put NodeEditorReflection into its own static class 2019-07-24 10:04:05 +02:00
Mikhail
93fa101af8 Multiple dynamicPortList IndexOutofRange fix. (#176) 2019-07-22 00:41:58 +02:00
Thor Brigsted
0c1ae4881d Fixed #147 - Adding dynamic port using "+" causes exception 2019-06-08 01:41:58 +02:00
Thor Brigsted
8a03811ee3 More DynamicPortList debug messages 2019-05-13 14:26:29 +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
d7f5bd2a1a Added obsolete methods to help with upgrading
Relating the Instance port > dynamic port change
2019-05-06 17:54:43 +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
4cf7113740
Improved noodle tangents (#136) 2019-04-14 19:01:26 +02:00
Thor Brigsted
f6e0e3bc4d Added NodeGraphEditor.GetPortColor 2019-04-03 21:50:29 +02:00
Thor Brigsted
af0523db2d Fixed #124 - Errors on DynamicPortList with >10 items
Was using OrderBy(x => x.fieldName). The resulting order would then be 1, 10, 11, .. , 2, 3, 4, etc.
Fixed by parsing the indices as ints, and ordering by that value instead
2019-04-01 19:16:54 +02:00
Thor Brigsted
01d7f782e4 Fixed issues relating to InstancePortList 2019-03-04 19:04:00 +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
9875f8d4f0 Merge branch 'master' of git@github.com:Siccity/xNode.git 2019-02-17 02:00:26 +01:00
Thor Brigsted
3a8ae366f2 Fixed #103
Similar issue as #100

GetField was not returning private fields. The method now not only looks for private fields, but also fields inside inherited classes
2019-02-16 03:06:25 +01:00
Thor Brigsted
71defcbdd5 Implemented typeConstraint in InputAttribute 2019-02-16 02:36:42 +01:00
Thor Brigsted
c9a4a81c31 InstandePortLists draw element include children 2019-01-12 02:23:00 +01:00
Thor Brigsted
5ee63d3ee5 Fixed #96
InstancePortLists no longer need to point to a serialized property
2019-01-11 18:54:44 +01:00
Thor Brigsted
432ca09274 Removed debug info 2019-01-11 18:38:54 +01:00
Thor Brigsted
b08d706e0d Changed custom InstancePortList API.
See: NodeEditorGUILayout.InstancePortList
2019-01-10 18:15:16 +01:00
Thor Brigsted
96d73bcb81 Better error handling for InstancePortLists 2019-01-05 22:02:00 +01:00
Thor Brigsted
c321c276d1 Fixed formatting 2018-12-27 02:55:09 +01:00
Simon Rodriguez
3d1da00652 Caches attributes, generates no garbage after first fetch.
Cache gets reset on recompilation of code.
2018-12-21 14:54:12 +01:00
Simon Rodriguez
fe2b7a9684 Fix for [Space] attribute (#90)
* Fix for [Space] attribute.
Code is a bit messy.

* Exchanged EditorGUILayout.Space() to GUILayout.Space() that takes a parameter height, for custom space distances.

* Changed where implementation is added to not messy up the rest of the code.
2018-12-18 10:00:10 +01:00
Thor Brigsted
dc608a3d1b Added NodeEditorGUILayout.onCreateReorderableList action for reorderablelist customization 2018-11-01 00:46:38 +01:00
Thor Brigsted
b9bd67bd28 Cleanup
Removed unused code, added/fixed comments
2018-10-30 09:38:44 +01:00
Thor Brigsted
ba69380638 Fixed error on instanceportlists that aren't arrays 2018-10-29 21:20:22 +01:00
Thor Brigsted
bad05a6e64 InstancePortList custom PropertyHeight supported 2018-10-26 18:42:16 +02:00
Thor Brigsted
b186b7dd34 Finished reorderable instance port lists 2018-10-26 00:17:24 +02:00
Thor Brigsted
17ba6a880c Ugh, this isn't easy 2018-10-22 00:46:49 +02:00
Thor Brigsted
82627812d6 Reordering improved, still WIP 2018-10-19 10:12:35 +02:00
Thor Brigsted
4516293214 Implemented add, remove. Reordering WIP 2018-10-18 10:07:48 +02:00
Thor Brigsted
671481f3b1 Begun working on ReorderableLists 2018-10-14 19:04:13 +02:00
Simon Rodriguez
98edbf0c80 Added label before drawing InstancePortList 2018-09-22 11:09:08 +02:00
Thor Brigsted
7ee89ba79c Added instancePortList field to Input and Output attributes. 2018-09-19 23:17:08 +02:00
Simon Rodriguez
fc0f1983e0 Suggestion, better looking buttons for InstancePortList 2018-09-19 09:04:58 +02:00
Thor Brigsted
ff97cc4494 Switched Dict.ContainsKey out with Dict.TryGetValue for performance gain. 2018-09-09 18:25:41 +02:00
Thor Brigsted
f9e024198e Improved InstancePortList. It now takes a NodePort.IO parameter 2018-08-30 15:52:30 +02:00
Thor Brigsted
632ae09e09 Added AddPortField to NodeEditorGUILayout
Call this after any GUILayout/EditorGUILayout method to add a port to it
2018-07-21 22:09:15 +02:00