Exemple #1
0
        public void SetTreeItemVisibility(TreeViewItemBase <BoneCache> item, bool visible, bool includeChildren)
        {
            var bone = item.customData;

            if (bone != null && bone.isVisible != visible)
            {
                using (m_Model.UndoScope(TextContent.visibilityChange))
                {
                    m_Model.SetVisibility(item.customData, visible);
                    if (includeChildren)
                    {
                        // toggle all children as well
                        SetChildrenVisibility(item, visible);
                    }
                }
            }
        }