public bool AutoSelectAvailableMaterial()
    {
        bool result = true;

        for (int i = 0; i < MaterialSelectors.Count; i++)
        {
            MaterialSelector materialSelector = MaterialSelectors[i];
            if (!materialSelector.AutoSelectAvailableMaterial())
            {
                result = false;
            }
        }
        return(result);
    }
Пример #2
0
        /// <summary>
        /// Based on the current tool mode, updates the overlay mode.
        /// </summary>
        private void UpdateViewMode()
        {
            var menu = ToolMenu.Instance.toolParameterMenu;

            if (optionState != null && menu != null)
            {
                var mode = menu.GetLastEnabledFilter();
                if (mode == SweepByTypeStrings.TOOL_KEY_FILTERED)
                {
                    // Filtered
                    if (typeSelect == null)
                    {
                        CreateSelector(menu);
                    }
                    typeSelect.AutoSelectAvailableMaterial();
                }
                else
                {
                    // Standard
                    DestroySelector();
                }
            }
        }