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

59 Commits

Author SHA1 Message Date
guizix
556547b541
Enables Port Type Override
When Constructing a NodePort, check the PortTypeOverrideAttribute to change the ValueType of the Port.
2023-06-29 13:18:29 +08:00
Simon Rodriguez
a75f13e7bd in most cases the data is already set and with this if check we can skip a dictionary lookup 2022-11-06 10:16:26 +01:00
Simon Rodriguez
a077ca136b cache the AssemblyQualifiedName string, reduces number of allocations and garbage collection in projects with many nodes 2022-11-02 09:08:57 +01:00
Thor Brigsted
fa62765daa Revert "Merge pull request #353 from LupusInferni315/master"
This reverts commit 1b64a96d40a0b33b497259bcd680c73c3122c85b, reversing
changes made to 75078edd20c6e28d9350b5aacc2a118977262192.
2022-09-21 11:01:49 +02:00
Raistlin Wolfe
7473083b84
Update NodePort.cs 2022-09-12 18:25:14 -06:00
RomanZanevski
46076527f8
Fix OnRemoveConnection from calling side
If we use the original:
if (port != null && port.IsConnectedTo(this)) port.node.OnRemoveConnection(port);
we going to have always wrong condition, about "IsConnectedTo(this)" and port.node.OnRemoveConnection(port) just won't be called, cause we already have disconnected ports. So we need to do it exactly at the moment of disconnection.
2022-04-25 16:24:08 +02:00
Thor Brigsted
75ee5d47ff Minor bugfix 2021-02-05 13:33:33 +01: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
MYTNB
1fb94b2413
Fix Port Disconnect Bug (#289) 2020-08-13 13:08:58 +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
63c3ae2f7d Fixed TypeConstraint.Inherited, and added TypeConstraint.InheritedInverse (#205)
* Added TypeConstraint to check inheritance but inverted.

* Flipped output inherited type constraints, edited comments
2019-11-06 13:12:04 +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
Simon Rodriguez
6a629d159c Added type constraints to output port (#170) 2019-07-09 10:44:00 +01:00
Thor Brigsted
71defcbdd5 Implemented typeConstraint in InputAttribute 2019-02-16 02:36:42 +01:00
Thor Brigsted
0b008c77eb Fixed edge case where swapping connections connected to the same port would cause a "port is already connected" error 2018-10-26 00:31:53 +02:00
Thor Brigsted
b186b7dd34 Finished reorderable instance port lists 2018-10-26 00:17:24 +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
97ec4bbf42 Improved warning message 2018-05-12 14:40:23 +02:00
Thor Brigsted
3e68635735 Finished Reroutes 2018-04-01 21:42:44 +02:00
Thor Brigsted
34e195e33d Visual representation in DrawConnections 2018-04-01 02:15:47 +02:00
Thor Brigsted
2a951a3002 Fixed Connection returning null when non-nulls exist. 2018-02-09 14:29:18 +01:00
Thor Brigsted
1b2f94607e Fixed NullRefEx when trying to disconnect a null NodePort 2018-02-02 12:29:19 +01:00
Joram
477c5b16a0 added port setting 2018-01-03 18:35:02 +01:00
Thor Brigsted
0fa9695dc4 Refined NodePort.Disconnect 2017-12-26 00:56:02 +01:00
Thor Brigsted
11a9db199a Added nodeGraph.Copy(); 2017-12-25 01:35:11 +01:00
Thor Brigsted
2291531ceb Added Node.OnRemoveConnection 2017-12-03 23:23:00 +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
8eff75fa7f Bug fixes 2017-11-02 16:17:28 +01:00
Thor Kramer Brigsted
cfccc4f89a Made NodePort.type serializable - needed for instance ports 2017-11-02 16:12:26 +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 Brigsted
028c481a9d Made NodePort.node private with a getter 2017-11-02 01:49:17 +01:00
Thor Kramer Brigsted
eaeca48f69 Improved null handling 2017-10-30 11:38:36 +01:00
Thor Brigsted
0150a7bb81 Improved GetInputsByFieldName<T> usage. Added getvalue type checks 2017-10-28 19:03:21 +02:00
Thor Kramer Brigsted
4de58ad0db Added T GetInputByFieldName<T>(string fieldName, T fallback = default<T>();
Now retrieving input values is much easier.
As simple as
Material material = GetInputByFieldName("material", this.material);
2017-10-27 14:06:39 +02:00
Thor
49c12ec87e Added NodePort.GetInputSum 2017-10-20 12:34:49 +02:00
Thor
4fcaede3b0 NodePort.GetValue changes
Removed NodePort.GetValue
Added NodePort.GetOutputValue
Added NodePort.GetInputValue
Added NodePort.GetInputValue<T>
Added NodePort.GetInputValues
Added NodePort.GetInputValues<T>
Added NodePort.TryGetInputValue<T>
2017-10-20 11:41:16 +02:00
Thor Brigsted
cf3bde96d0 PropertyField: Better handling of null values 2017-10-15 18:42:58 +02:00
Thor Brigsted
bb15a8fdd3 Improved handling of invalid connections 2017-10-15 18:27:29 +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
bc5c060dee Improved broken connection cleanup. Example updates 2017-10-13 20:28:40 +02:00
Thor
899e5ae979 Fixed Clear all connections bug 2017-10-13 10:37:34 +02:00
Thor Brigsted
3dae0910dc Serialization now works correctly. Removal of nodes still broken 2017-10-13 00:08:33 +02:00
Thor Brigsted
8ce0d63903 NodeDataCache changed from ScriptableObject to static class.
Nodes still don't load properly, but we're getting there.
2017-10-12 00:18:40 +02:00
Thor Brigsted
76e8b70316 Initialization performance updates (wip) 2017-10-09 19:52:41 +02:00
Thor Brigsted
147424ca73 Added DisplayValue and GetValue 2017-10-09 00:29:40 +02:00
Thor Brigsted
9dd3e1db75 Fixed Output registering as an Input 2017-10-08 23:33:25 +02:00
Thor Brigsted
6a4c29410a Added VerifyConnections, Added GetPortByFieldName. 2017-10-08 02:00:33 +02:00
Thor Brigsted
698f02d716 Serialization now works. Node.cs is now a ScriptableObject. 2017-10-07 01:54:10 +02:00
Thor Brigsted
f8a0bb8f7c Started work on NodeGraphExample 2017-09-27 23:41:01 +02:00