예제 #1
0
        public void TreeViewItemRename(IList <TreeViewItem> rows, int itemID, string newName)
        {
            var item = rows.FirstOrDefault(x => x.id == itemID) as TreeViewItemBase <BoneCache>;

            if (item == null)
            {
                return;
            }

            item.displayName = newName;
            if (item.customData != null && item.customData.name != newName)
            {
                using (m_Model.UndoScope(TextContent.boneName))
                {
                    m_Model.SetName(item.customData, newName);
                    m_SkinningEvents.boneNameChanged.Invoke(item.customData);
                }
            }
        }