diff --git a/Source/Editor/Windows/Assets/SkeletonMaskWindow.cs b/Source/Editor/Windows/Assets/SkeletonMaskWindow.cs index 3627ef70e..a5e3da327 100644 --- a/Source/Editor/Windows/Assets/SkeletonMaskWindow.cs +++ b/Source/Editor/Windows/Assets/SkeletonMaskWindow.cs @@ -7,6 +7,7 @@ using FlaxEditor.CustomEditors; using FlaxEditor.CustomEditors.Editors; using FlaxEditor.CustomEditors.Elements; using FlaxEditor.GUI; +using FlaxEditor.GUI.Tree; using FlaxEditor.Viewport.Cameras; using FlaxEditor.Viewport.Previews; using FlaxEngine; @@ -166,8 +167,25 @@ namespace FlaxEditor.Windows.Assets var proxy = (PropertiesProxy)Values[0]; int nodeIndex = (int)checkBox.Tag; proxy.NodesMask[nodeIndex] = checkBox.Checked; + if(Input.GetKey(KeyboardKeys.Shift)) + SetTreeChecked(checkBox.Parent as TreeNode, checkBox.Checked); proxy.Window.MarkAsEdited(); } + + private void SetTreeChecked(TreeNode tree, bool state) + { + foreach(var node in tree.Children) + { + if(node is TreeNode) + { + SetTreeChecked(node as TreeNode, state); + } + if(node is CheckBox) + { + (node as CheckBox).Checked = state; + } + } + } } }