|
|
|
|
|
|
|
|
|
|
ColorSpace m_ColorSpace; |
|
|
|
RenderPipelineAsset m_RenderPipelineAsset; |
|
|
|
bool m_FrameAllAfterLayout; |
|
|
|
|
|
|
|
GraphEditorView m_GraphEditorView; |
|
|
|
|
|
|
|
|
|
|
m_GraphEditorView.saveRequested += UpdateAsset; |
|
|
|
m_GraphEditorView.convertToSubgraphRequested += ToSubGraph; |
|
|
|
m_GraphEditorView.showInProjectRequested += PingAsset; |
|
|
|
m_GraphEditorView.RegisterCallback<GeometryChangedEvent>(OnGeometryChanged); |
|
|
|
this.GetRootVisualContainer().Add(graphEditorView); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
persistenceKey = selectedGuid, |
|
|
|
assetName = asset.name.Split('/').Last() |
|
|
|
}; |
|
|
|
m_FrameAllAfterLayout = true; |
|
|
|
graphEditorView.RegisterCallback<GeometryChangedEvent>(OnGeometryChanged); |
|
|
|
|
|
|
|
titleContent = new GUIContent(asset.name.Split('/').Last()); |
|
|
|
|
|
|
void OnGeometryChanged(GeometryChangedEvent evt) |
|
|
|
{ |
|
|
|
graphEditorView.UnregisterCallback<GeometryChangedEvent>(OnGeometryChanged); |
|
|
|
graphEditorView.graphView.FrameAll(); |
|
|
|
if (m_FrameAllAfterLayout) |
|
|
|
graphEditorView.graphView.FrameAll(); |
|
|
|
m_FrameAllAfterLayout = false; |
|
|
|
foreach (var node in m_GraphObject.graph.GetNodes<AbstractMaterialNode>()) |
|
|
|
node.Dirty(ModificationScope.Node); |
|
|
|
} |
|
|
|
} |
|
|
|
} |