initial commit
This commit is contained in:
parent
6715289efe
commit
788c3389af
37645 changed files with 2526849 additions and 80 deletions
|
@ -0,0 +1,26 @@
|
|||
using System.Linq;
|
||||
using UnityEditor.Graphing;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
readonly struct GraphDataReadOnly
|
||||
{
|
||||
private readonly GraphData m_Graph;
|
||||
|
||||
public GraphDataReadOnly(GraphData graph)
|
||||
{
|
||||
m_Graph = graph;
|
||||
}
|
||||
|
||||
private bool AnyConnectedControl<T>() where T : IControl
|
||||
{
|
||||
var matchingNodes = m_Graph.GetNodes<BlockNode>().Where(o => o.descriptor.control is T);
|
||||
return matchingNodes.SelectMany(o => o.GetInputSlots<MaterialSlot>()).Any(o => o.isConnected);
|
||||
}
|
||||
|
||||
public bool AnyVertexAnimationActive()
|
||||
{
|
||||
return AnyConnectedControl<PositionControl>();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue