//==================================================================================================================== private void OnGUI() { if (position != previousPosition) { OnWindowResized((int)(position.width - previousPosition.width), (int)(position.height - previousPosition.height)); previousPosition = position; } Rect fullRect = new Rect(0, 0, Screen.width, Screen.height); if (currentShaderAsset == null) { DrawMainMenu(); return; } if (Event.current.rawType == EventType.ValidateCommand && Event.current.commandName == "UndoRedoPerformed") { // } if (nodes != null) { for (int i = 0; i < nodes.Count; i++) { VS_Node n = nodes[i]; if (n != null) { //n.DrawConnections() } } } Rect pRect = new Rect(fullRect); pRect.height /= EditorGUIUtility.pixelsPerPoint; pRect.width /= EditorGUIUtility.pixelsPerPoint; pRect.width = separatorLeft.rect.x; VS_GUI.FillBackGround(pRect); DrawPreviewPanel(pRect); Rect previewPanelRect = pRect; separatorLeft.MinX = 320; separatorLeft.MaxX = (int)(fullRect.width / 2f - separatorLeft.rect.width); separatorLeft.Draw((int)pRect.y, (int)pRect.height); pRect.x = separatorLeft.rect.x + separatorLeft.rect.width; if (VS_Settings.showNodeSidebar) { pRect.width = separatorRight.rect.x - separatorLeft.rect.x - separatorLeft.rect.width; } else { pRect.width = Screen.width - separatorLeft.rect.x - separatorLeft.rect.width; } //Draw Debug Nodes //...................... //...................... //Draw NodeView.... //...................... //...................... Rect canvasRect = pRect.PadTop(TabOffset); nodeCanvas.Draw(canvasRect); // // 22 when not docked, 19 if docked if (VS_Settings.showNodeSidebar) { separatorRight.MinX = (int)(fullRect.width / EditorGUIUtility.pixelsPerPoint) - 150; separatorRight.MaxX = (int)(fullRect.width / EditorGUIUtility.pixelsPerPoint) - 32; separatorRight.Draw((int)pRect.y, (int)pRect.height); pRect.x += pRect.width + separatorRight.rect.width; pRect.width = (fullRect.width / EditorGUIUtility.pixelsPerPoint) - separatorRight.rect.x - separatorRight.rect.width; VS_GUI.FillBackGround(pRect); //nodeBrowser.OnLocalGUI( pRect ); } }
public VS_SetNodeSource(VS_Node node) { con = node.connectors[0]; }
public VS_NodePreview(VS_Node _node) { node = _node; }