浏览代码

Fixes #198 - only dirty nodes were being used as starting point for PreviewMode propagation

/main
Peter Bay Bastian 7 年前
当前提交
a1cc908e
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 7
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/PreviewManager.cs

7
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/PreviewManager.cs


PropagateNodeSet(m_DirtyPreviews);
m_NodesWith3DPreview.Clear();
foreach (var index in m_DirtyPreviews)
foreach (var node in m_Graph.GetNodes<AbstractMaterialNode>())
var node = (AbstractMaterialNode)m_Graph.GetNodeFromTempId(m_Identifiers[index]);
if (node.previewMode == PreviewMode.Preview3D)
m_NodesWith3DPreview.Add(node.tempId.index);
}

void DestroyRenderData(PreviewRenderData renderData)
{
if (renderData.shaderData != null
&& renderData.shaderData.shader != null
&& renderData.shaderData.shader != null
if (renderData.shaderData != null && renderData.shaderData.node != null)
renderData.shaderData.node.onModified -= OnNodeModified;
}

正在加载...
取消
保存