浏览代码

Work with new GraphView slot coloring

/main
Peter Bay Bastian 7 年前
当前提交
f615cb37
共有 2 个文件被更改,包括 20 次插入0 次删除
  1. 18
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/SlotValue.cs
  2. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialNodeView.cs

18
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/SlotValue.cs


return ChannelCount.Zero;
}
}
static readonly string[] k_ConcreteSlotValueTypeClassNames =
{
null,
"typeMatrix",
"typeMatrix",
"typeMatrix",
"typeTexture2D",
"typeFloat4",
"typeFloat3",
"typeFloat2",
"typeFloat1"
};
public static string ToClassName(this ConcreteSlotValueType type)
{
return k_ConcreteSlotValueTypeClassNames[(int)type];
}
}
}

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


port.capabilities &= ~Capabilities.Movable;
port.portName = slot.displayName;
port.userData = slot;
port.visualClass = slot.concreteValueType.ToClassName();
if (slot.isOutputSlot)
{

{
var slot = (MaterialSlot) anchor.userData;
anchor.portName = slot.displayName;
anchor.visualClass = slot.concreteValueType.ToClassName();
}
foreach (var attacher in m_Attachers)

正在加载...
取消
保存