initial commit
This commit is contained in:
parent
6715289efe
commit
788c3389af
37645 changed files with 2526849 additions and 80 deletions
|
@ -0,0 +1,29 @@
|
|||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
sealed partial class GraphData : ISerializationCallbackReceiver
|
||||
{
|
||||
public static class GraphConcretization
|
||||
{
|
||||
public static void ConcretizeNode(AbstractMaterialNode node)
|
||||
{
|
||||
node.Concretize();
|
||||
}
|
||||
|
||||
public static void ConcretizeProperties(GraphData graph)
|
||||
{
|
||||
var propertyNodes = graph.GetNodes<PropertyNode>().Where(n => !graph.m_Properties.Any(p => p == n.property)).ToArray();
|
||||
foreach (var pNode in propertyNodes)
|
||||
graph.ReplacePropertyNodeWithConcreteNodeNoValidate(pNode);
|
||||
}
|
||||
|
||||
public static void ConcretizeGraph(GraphData graph)
|
||||
{
|
||||
ConcretizeProperties(graph);
|
||||
GraphDataUtils.ApplyActionLeafFirst(graph, ConcretizeNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue