浏览代码

[mat graph]Fix subgraphnode always regenerating the graph + fix exception on port adaptor

/main
Tim Cooper 8 年前
当前提交
5cbe3cf4
共有 7 个文件被更改,包括 3 次插入77 次删除
  1. 41
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/DrawData/AnchorDrawData.cs
  2. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Runtime/SubGraph/SubGraphNode.cs
  3. 9
      MaterialGraphProject/Assets/NewUI/Editor/Demo/GraphElements.meta
  4. 9
      MaterialGraphProject/Assets/NewUI/Editor/Graph.meta
  5. 9
      MaterialGraphProject/Assets/NewUI/Editor/GraphElements.meta
  6. 9
      MaterialGraphProject/Assets/Plugins.meta

41
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/DrawData/AnchorDrawData.cs


{
internal static class MyNodeAdapters
{
internal static bool Adapt(this NodeAdapter value, PortSource<int> a, PortSource<int> b)
{
// run adapt code for int to int connections
return true;
}
internal static bool Adapt(this NodeAdapter value, PortSource<float> a, PortSource<float> b)
{
// run adapt code for float to float connections
return true;
}
internal static bool Adapt(this NodeAdapter value, PortSource<int> a, PortSource<float> b)
{
// run adapt code for int to float connections, perhaps by insertion a conversion node
return true;
}
internal static bool Adapt(this NodeAdapter value, PortSource<Vector3> a, PortSource<Vector3> b)
{
// run adapt code for vec3 to vec3 connections
return true;
}
internal static bool Adapt(this NodeAdapter value, PortSource<Color> a, PortSource<Color> b)
{
// run adapt code for Color to Color connections
return true;
}
internal static bool Adapt(this NodeAdapter value, PortSource<Vector3> a, PortSource<Color> b)
{
// run adapt code for vec3 to Color connections
return true;
}
internal static bool Adapt(this NodeAdapter value, PortSource<Color> a, PortSource<Vector3> b)
{
// run adapt code for Color to vec3 connections
return true;
}
internal static bool Adapt(this NodeAdapter value, PortSource<Vector4> a, PortSource<Vector4> b)
{
return true;

3
MaterialGraphProject/Assets/UnityShaderEditor/Runtime/SubGraph/SubGraphNode.cs


}
set
{
if (subGraphAsset == value)
return;
var helper = new SubGraphHelper();
helper.subGraph = value;
m_SerializedSubGraph = EditorJsonUtility.ToJson(helper, true);

9
MaterialGraphProject/Assets/NewUI/Editor/Demo/GraphElements.meta


fileFormatVersion: 2
guid: 0cabc6d3555773b46ac210aaf8eefae6
folderAsset: yes
timeCreated: 1475167728
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

9
MaterialGraphProject/Assets/NewUI/Editor/Graph.meta


fileFormatVersion: 2
guid: b72798efa4aa8574ca0cbdfa63df0b7a
folderAsset: yes
timeCreated: 1475177616
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

9
MaterialGraphProject/Assets/NewUI/Editor/GraphElements.meta


fileFormatVersion: 2
guid: ebb7c69d632722145a1f9d838e7fe6ef
folderAsset: yes
timeCreated: 1475161005
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

9
MaterialGraphProject/Assets/Plugins.meta


fileFormatVersion: 2
guid: 87aea87bc4e9b4189b78e8844f9e61f1
folderAsset: yes
timeCreated: 1478600290
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存