Ejemplo n.º 1
0
        private void CreateSceneObject(string meshUniqueName)
        {
            string sObjName = string.Empty;

            for (int i = 0; ; i++)
            {
                string tryName = "NewSceneObject";
                if (i > 0)
                {
                    tryName = tryName + "_" + Convert.ToString(i);
                }
                if (!IGCore.SceneObjectExists(tryName))
                {
                    sObjName = tryName;
                    break;
                }
            }

            IGCore.CreateSceneObject(sObjName, meshUniqueName);

            GetSceneObjects();
            OutlinerItemModel newModel = null;

            foreach (object item in outlinerTreeView.Items)
            {
                OutlinerItemModel model = item as OutlinerItemModel;
                if (model.Name == sObjName)
                {
                    newModel = model;
                    break;
                }
            }
            if (newModel != null)
            {
                //TreeViewItem tvi = (TreeViewItem)outlinerTreeView.ItemContainerGenerator.ContainerFromItem(newModel);
                //tvi.Focus();
            }
            //mainWindow.GetSceneObjectProperties(sObjName);
        }
Ejemplo n.º 2
0
 public bool NameAvailable(string name)
 {
     return(!IGCore.SceneObjectExists(name));
 }