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
Thor Brigsted
cd0a4ca64b
Fixed bug in NodeEditorGUILayout.InstancePortList
2018-07-19 00:01:11 +02:00
Thor Brigsted
ac9db2a0b0
Fixed drawing arrays inside InstancePortList
2018-07-12 00:21:24 +02:00
Thor Brigsted
12ddf51164
Fixed bug that ironically appeared in c202829c9da1a94496d0c864d79c1cf71cbf7e8f
...
Bug would cause ports drawn with InstancePortList to not appear at all
2018-06-24 23:20:29 +02:00
Thor Brigsted
a0d86c895e
Added convenience NodeEditorGUILayout.PortPair
2018-06-23 16:40:03 +02: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
dc9b11c5a3
Added NodeEditorGUILayout.InstancePortList.
...
Use it to draw lists of instance ports easily.
2018-06-10 21:16:18 +02:00
Thor Brigsted
941189a4d6
Started work on Reroute nodes
2018-03-31 19:01:36 +02:00
Thor Brigsted
682dccdd9d
Changed NodeEditorGUILayout labels to use dynamic output GUIStyle based on EditorStyles.label
...
This will make it easier to change node text color
Example:
[CustomNodeEditor(typeof(MyNode))]
public class MyNodeEditor : NodeEditor {
private static GUIStyle editorLabelStyle;
public override void OnBodyGUI() {
if (editorLabelStyle == null) editorLabelStyle = new GUIStyle(EditorStyles.label);
EditorStyles.label.normal.textColor = Color.green;
base.OnBodyGUI();
EditorStyles.label.normal = editorLabelStyle.normal;
}
}
2018-02-05 02:07:22 +01: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
Thor Brigsted
5f900c0b14
Removed references to previous project name
2017-12-31 01:22:18 +01:00
Thor
66de07e1a7
More strongly typed namespaces to prevent import conflicts
2017-12-18 10:37:02 +01:00
Thor Brigsted
d7e133a822
Defined namespaces across all scripts prevent conflicts.
2017-12-02 09:56:41 +01:00
Thor Kramer Brigsted
aabd2e4145
Added NodeGraphEditor.GetTypeColor for custom node-graph specific type colors
2017-11-28 10:49:24 +01:00
Thor Kramer Brigsted
215a3475ea
Small editor erformance gain. Removed PrettifyCamelCase.
...
Use ObjectNames.NicifyVariableName instead
2017-11-28 09:38:21 +01:00
Thor Brigsted
fe057a7be2
Added ShowBackingValue options for Input and Output
...
Added NodeEditorUtilities.GetAttrib<T>(Type classType, string fieldName, out T attribute)
2017-11-27 00:59:16 +01:00
Thor Brigsted
ad7d9360e5
More inclusive NodeEditorGUILayout
2017-11-16 01:59:46 +01:00
Thor Brigsted
5267ac1a30
Merge branch 'development'
2017-11-14 01:07:59 +01:00
Thor Brigsted
fc16f69710
Nodes can now define a unique color per type using [NodeColor]
2017-11-14 01:07:26 +01:00
Thor Kramer Brigsted
719171cef4
Improved NodeEditorGUILayout options
2017-11-09 22:03:28 +01:00
Thor Brigsted
dca06edd97
More NodeEditorGUILayout options
2017-11-09 02:12:55 +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
432ce05bb5
Fixed dynamic node width.
...
Fixed field widths.
2017-11-03 10:11:07 +01:00
Thor Kramer Brigsted
b70ba44c23
Added NodeEditorGUILayout.PortField for drawing ports without a serializable property
2017-11-02 16:18:03 +01:00
Thor Kramer Brigsted
8eff75fa7f
Bug fixes
2017-11-02 16:17:28 +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 Kramer Brigsted
ace1e8ccd8
PropertyField null check and default includeChildren value
2017-11-01 17:41:43 +01:00
Thor Kramer Brigsted
ab74f8fd36
OnBodyGUI() remake
...
Default OnBodyGUI now uses default PropertyFields as suppied by UnityEditor.
This means fields are drawn on nodes the same way as they are drawn in the inspector.
out portPosition has also been moved to a static field. It is set automatically using the NodeEditorGuiLayout methods.
Alternatively, you can alter it manually during your node GUI drawing.
2017-10-31 14:52:10 +01:00
Thor Kramer Brigsted
f335ecfbb5
Nodes now show unsupported value types as labels.
2017-10-31 11:25:49 +01:00
Thor Brigsted
cb3424d6eb
Fixed potential null errors
2017-10-29 21:16:23 +01:00
Thor Brigsted
b48f7d63b4
Null check
2017-10-28 19:11:13 +02:00
Thor Brigsted
38d45d0486
Fixed enum field inspector
2017-10-28 00:06:07 +02:00
Thor Brigsted
2dc7450661
Improved userfriendlyness of [Input] and [Output]
2017-10-20 23:01:38 +02:00
Thor
9dd784d21e
Improved handling of null object fields
2017-10-20 11:39:11 +02:00