mirror of
https://github.com/Siccity/xNode.git
synced 2026-03-26 22:49:02 +08:00
!W OnRename
This commit is contained in:
parent
7a7c0ffdd0
commit
570e01de01
@ -57,7 +57,7 @@ namespace XNodeEditor {
|
|||||||
// serializedObject.Update(); must go at the start of an inspector gui, and
|
// serializedObject.Update(); must go at the start of an inspector gui, and
|
||||||
// serializedObject.ApplyModifiedProperties(); goes at the end.
|
// serializedObject.ApplyModifiedProperties(); goes at the end.
|
||||||
serializedObject.Update();
|
serializedObject.Update();
|
||||||
|
|
||||||
#if ODIN_INSPECTOR
|
#if ODIN_INSPECTOR
|
||||||
InspectorUtilities.BeginDrawPropertyTree(objectTree, true);
|
InspectorUtilities.BeginDrawPropertyTree(objectTree, true);
|
||||||
GUIHelper.PushLabelWidth(84);
|
GUIHelper.PushLabelWidth(84);
|
||||||
@ -76,7 +76,7 @@ namespace XNodeEditor {
|
|||||||
NodeEditorGUILayout.PropertyField(iterator, true);
|
NodeEditorGUILayout.PropertyField(iterator, true);
|
||||||
portNames.Add(iterator.name);
|
portNames.Add(iterator.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Deal with ports that are not drawn
|
//Deal with ports that are not drawn
|
||||||
foreach (var port in target.Ports)
|
foreach (var port in target.Ports)
|
||||||
{
|
{
|
||||||
@ -103,7 +103,7 @@ namespace XNodeEditor {
|
|||||||
serializedObject.ApplyModifiedProperties();
|
serializedObject.ApplyModifiedProperties();
|
||||||
|
|
||||||
#if ODIN_INSPECTOR
|
#if ODIN_INSPECTOR
|
||||||
// Call repaint so that the graph window elements respond properly to layout changes coming from Odin
|
// Call repaint so that the graph window elements respond properly to layout changes coming from Odin
|
||||||
if (GUIHelper.RepaintRequested) {
|
if (GUIHelper.RepaintRequested) {
|
||||||
GUIHelper.ClearRepaintRequest();
|
GUIHelper.ClearRepaintRequest();
|
||||||
window.Repaint();
|
window.Repaint();
|
||||||
@ -144,7 +144,7 @@ namespace XNodeEditor {
|
|||||||
public virtual GUIStyle GetBodyHighlightStyle() {
|
public virtual GUIStyle GetBodyHighlightStyle() {
|
||||||
return NodeEditorResources.styles.nodeHighlight;
|
return NodeEditorResources.styles.nodeHighlight;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> Add items for the context menu when right-clicking this node. Override to add custom menu items. </summary>
|
/// <summary> Add items for the context menu when right-clicking this node. Override to add custom menu items. </summary>
|
||||||
public virtual void AddContextMenuItems(GenericMenu menu) {
|
public virtual void AddContextMenuItems(GenericMenu menu) {
|
||||||
// Actions if only one node is selected
|
// Actions if only one node is selected
|
||||||
@ -173,6 +173,9 @@ namespace XNodeEditor {
|
|||||||
AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(target));
|
AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(target));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary> Called after this node's name has changed. </summary>
|
||||||
|
public virtual void OnRename() { }
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Class)]
|
[AttributeUsage(AttributeTargets.Class)]
|
||||||
public class CustomNodeEditorAttribute : Attribute,
|
public class CustomNodeEditorAttribute : Attribute,
|
||||||
XNodeEditor.Internal.NodeEditorBase<NodeEditor, NodeEditor.CustomNodeEditorAttribute, XNode.Node>.INodeEditorAttrib {
|
XNodeEditor.Internal.NodeEditorBase<NodeEditor, NodeEditor.CustomNodeEditorAttribute, XNode.Node>.INodeEditorAttrib {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user