Esempio n. 1
0
        public void GetMeshOverrideMaterials()
        {
            //model = new PropertiesModel_Mesh();
            //model.SetParent(this);
            MaterialPanel.Children.Clear();
            int    submeshCount    = IGCore.GetMeshSubmeshCount(model.MeshUniqueName);
            IntPtr submeshNamesPtr = IGCore.GetMeshSubmeshNames(model.MeshUniqueName);// TODO : Manually free memory.
            var    submeshNameList = GetAllStrings(submeshNamesPtr, submeshCount);

            for (var i = 0; i < submeshCount; i++)
            {
                var newPathLoader = new PathLoader();
                newPathLoader.Init();
                newPathLoader.Id = submeshNameList[i];
                newPathLoader.model.LabelText          = submeshNameList[i];
                newPathLoader.model.MaterialUniqueName = Marshal.PtrToStringUni(IGCore.GetSceneObjectOverrideMaterial(sObjectName, submeshNameList[i]));
                newPathLoader.parent = this;
                MaterialPanel.Children.Add(newPathLoader);
                //pathLoaders.Add(newPathLoader);
            }
        }