浏览代码

Add INodeModificationListener which allows control views to be notified of node change

/main
Peter Bay Bastian 7 年前
当前提交
406da125
共有 5 个文件被更改,包括 19 次插入2 次删除
  1. 1
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Interfaces/INode.cs
  2. 1
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Controls/IControlAttribute.cs
  3. 7
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialNodeView.cs
  4. 9
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/INodeModificationListener.cs
  5. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/INodeModificationListener.cs.meta

1
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Interfaces/INode.cs


}
public delegate void OnNodeModified(INode node, ModificationScope scope);
public delegate void OnNodeReplaced(INode previous, INode current);
public interface INode
{

1
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Controls/IControlAttribute.cs


using System.Reflection;
using UnityEngine.Experimental.UIElements;
using UnityEditor.ShaderGraph;
namespace UnityEditor.ShaderGraph.Drawing.Controls
{

7
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialNodeView.cs


}
UpdatePortInputVisibilities();
foreach (var control in m_ControlViews)
{
var listener = control as INodeModificationListener;
if (listener != null)
listener.OnNodeModified(scope);
}
}
void AddSlots(IEnumerable<MaterialSlot> slots)

9
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/INodeModificationListener.cs


using UnityEditor.Graphing;
namespace UnityEditor.ShaderGraph.Drawing
{
public interface INodeModificationListener
{
void OnNodeModified(ModificationScope scope);
}
}

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/INodeModificationListener.cs.meta


fileFormatVersion: 2
guid: 22f268830a014848b3a8bfdd5142a2d0
timeCreated: 1510751718
正在加载...
取消
保存