From 98a8c4a94748761e64fbb2e482ef8d92b1f95098 Mon Sep 17 00:00:00 2001 From: bd_ Date: Sat, 16 Nov 2024 19:14:18 -0800 Subject: [PATCH] feat: allow multi-edit of "Is Default" when parameter names are empty --- Editor/Inspector/Menu/MenuItemGUI.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Editor/Inspector/Menu/MenuItemGUI.cs b/Editor/Inspector/Menu/MenuItemGUI.cs index 8f4ab313..a4468a5d 100644 --- a/Editor/Inspector/Menu/MenuItemGUI.cs +++ b/Editor/Inspector/Menu/MenuItemGUI.cs @@ -516,7 +516,12 @@ namespace nadena.dev.modular_avatar.core.editor // But, we do want to see if _any_ are default. var anyIsDefault = _prop_isDefault.hasMultipleDifferentValues || _prop_isDefault.boolValue; var mixedIsDefault = multipleSelections && anyIsDefault; - using (new EditorGUI.DisabledScope(multipleSelections || isDefaultByKnownParam != null)) + + var allAreAutoParams = !_parameterName.hasMultipleDifferentValues && + string.IsNullOrWhiteSpace(_parameterName.stringValue); + + using (new EditorGUI.DisabledScope((!allAreAutoParams && multipleSelections) || + isDefaultByKnownParam != null)) { EditorGUI.BeginChangeCheck(); DrawHorizontalToggleProp(_prop_isDefault, G("menuitem.prop.is_default"), mixedIsDefault,