Esempio n. 1
0
 private void On_Tex_Name_Changed(ModelTexture texture, string oldName)
 {
     for (int i = 0; i < _boxes.Count; i++)
     {
         _boxes[i].ChangeTextureRef("#" + oldName, "#" + texture.Name);
     }
     _treeNode.UpdateTextureOptions();
 }
Esempio n. 2
0
        public void AddTexture(string name, string texPath)
        {
            ModelTexture tex = new ModelTexture(name, texPath, this);

            tex.NameChanged += new NameChangedEventHandler(On_Tex_Name_Changed);
            _textures.Add(tex);
            if (_treeNode != null)
            {
                _treeNode.AddTreeNodeTexture(tex.TreeNode);
                _treeNode.UpdateTextureOptions();
            }
        }
Esempio n. 3
0
        public void SetActiveTexture(string textureName)
        {
            ModelTexture tex = GetTexture(textureName);

            if (!tex.IsReference)
            {
                tex.SetActive();
            }
            else
            {
                SetActiveTexture(tex.Reference);
            }
            return;
        }