|
|
|
|
|
|
m_PreviewRenderHandle = previewManager.masterRenderData; |
|
|
|
m_PreviewRenderHandle.onPreviewChanged += OnPreviewChanged; |
|
|
|
|
|
|
|
m_PreviewMeshPicker.SetValueAndNotify(m_Graph.previewMesh); |
|
|
|
m_PreviewMeshPicker.SetValueAndNotify(m_Graph.previewData.mesh); |
|
|
|
|
|
|
|
foreach (var property in m_Graph.properties) |
|
|
|
m_PropertyItems.Add(new ShaderPropertyView(m_Graph, property)); |
|
|
|
|
|
|
m_PreviewScrollPosition.y = Mathf.Clamp(m_PreviewScrollPosition.y, -90f, 90f); |
|
|
|
Quaternion previewRotation = Quaternion.Euler(m_PreviewScrollPosition.y, 0, 0) * Quaternion.Euler(0, m_PreviewScrollPosition.x, 0); |
|
|
|
m_Graph.previewData.rotation = previewRotation; |
|
|
|
|
|
|
|
masterNode.onModified(masterNode, ModificationScope.Node); |
|
|
|
} |
|
|
|
|
|
|
|
void OnMouseScroll(float scrollDelta) |
|
|
|
|
|
|
|
|
|
|
masterNode.onModified(masterNode, ModificationScope.Node); |
|
|
|
} |
|
|
|
|
|
|
|
void OnAddProperty() |
|
|
|
|
|
|
|
|
|
|
masterNode.onModified(masterNode, ModificationScope.Node); |
|
|
|
|
|
|
|
if (m_Graph.previewMesh != changedMesh) |
|
|
|
if (m_Graph.previewData.mesh != changedMesh) |
|
|
|
m_Graph.previewMesh = changedMesh; |
|
|
|
m_Graph.previewData.mesh = changedMesh; |
|
|
|
} |
|
|
|
|
|
|
|
public void UpdateSelection(IEnumerable<INode> nodes) |
|
|
|