diff --git a/com.unity.shadergraph/CHANGELOG.md b/com.unity.shadergraph/CHANGELOG.md index 6894efce5cf..3649d13b221 100644 --- a/com.unity.shadergraph/CHANGELOG.md +++ b/com.unity.shadergraph/CHANGELOG.md @@ -55,6 +55,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Changed "Create Node" action in ShaderGraph stack separator context menu to "Add Block Node" and added it to main stack context menu ### Fixed +- Fixed bug where it was not possible to switch to Graph Settings tab in Inspector if multiple nodes and an edge was selected [1357648] (https://fogbugz.unity3d.com/f/cases/1357648/) - Fixed an issue where fog node density was incorrectly calculated. - Fixed inspector property header styling - Added padding to the blackboard window to prevent overlapping of resize region and scrollbars interfering with user interaction diff --git a/com.unity.shadergraph/Editor/Drawing/Blackboard/SGBlackboardCategory.cs b/com.unity.shadergraph/Editor/Drawing/Blackboard/SGBlackboardCategory.cs index b4aeeb4db57..545f85969d8 100644 --- a/com.unity.shadergraph/Editor/Drawing/Blackboard/SGBlackboardCategory.cs +++ b/com.unity.shadergraph/Editor/Drawing/Blackboard/SGBlackboardCategory.cs @@ -690,15 +690,8 @@ public void AddToSelection(ISelectable selectable) return; } - if (selectable != this) - Inspector.InspectorView.forceNodeView = true; - var materialGraphView = m_ViewModel.parentView.GetFirstAncestorOfType(); materialGraphView?.AddToSelection(selectable); - - if (materialGraphView.selection.OfType().Any()) - // Turns off the inspector being forced to trigger so user can still use Graph Settings tab if they want, on category selection - Inspector.InspectorView.forceNodeView = false; } public void RemoveFromSelection(ISelectable selectable) diff --git a/com.unity.shadergraph/Editor/Drawing/Inspector/InspectorView.cs b/com.unity.shadergraph/Editor/Drawing/Inspector/InspectorView.cs index 486b4db03bd..02005a22d78 100644 --- a/com.unity.shadergraph/Editor/Drawing/Inspector/InspectorView.cs +++ b/com.unity.shadergraph/Editor/Drawing/Inspector/InspectorView.cs @@ -15,10 +15,14 @@ class InspectorView : GraphSubWindow const float k_InspectorUpdateInterval = 0.25f; const int k_InspectorElementLimit = 20; + bool m_GraphSettingsTabFocused = false; + int m_CurrentlyInspectedElementsCount = 0; readonly List m_PropertyDrawerList = new List(); + HashSet cachedInspectables = new(); + // There's persistent data that is stored in the graph settings property drawer that we need to hold onto between interactions IPropertyDrawer m_graphSettingsPropertyDrawer = new GraphDataPropertyDrawer(); public override string windowTitle => "Graph Inspector"; @@ -34,8 +38,6 @@ class InspectorView : GraphSubWindow Label m_MaxItemsMessageLabel; - internal static bool forceNodeView = true; - void RegisterPropertyDrawer(Type newPropertyDrawerType) { if (typeof(IPropertyDrawer).IsAssignableFrom(newPropertyDrawerType) == false) @@ -83,8 +85,8 @@ public InspectorView(InspectorViewModel viewModel) : base(viewModel) m_MaxItemsMessageLabel = m_GraphInspectorView.Q