Beispiel #1
0
        private bool InspectLists()
        {
            var changes = false;

            "Img Metas".enter_List(ref imgMetas, ref _inspectedImgData, ref _inspectedList, 0).nl(ref changes);

            "Mat Metas".enter_List(ref matMetas, ref _inspectedMaterial, ref _inspectedList, 1).nl(ref changes);

            "Source Textures".enter_List_UObj(ref sourceTextures, ref _inspectedList, 2).nl(ref changes);

            "Masks".enter_List_UObj(ref masks, ref _inspectedList, 3).nl(ref changes);

            "Decals".enter_List(ref decals, ref _inspectedDecal, ref _inspectedList, 4).nl(ref changes);

            "Mesh Packaging solutions".enter_List(ref meshPackagingSolutions, ref _inspectedMeshPackSol, ref _inspectedList, 5).nl(ref changes);
            if (_inspectedList == 5)
            {
#if UNITY_EDITOR
                Object newProfile = null;

                if ("Drop New Profile Here:".edit(ref newProfile).nl())
                {
                    var mSol = new MeshPackagingProfile();
                    mSol.Decode(QcFile.Load.TryLoadAsTextAsset(newProfile));
                    meshPackagingSolutions.Add(mSol);
                }
#endif
            }

            return(changes);
        }
Beispiel #2
0
 public MeshConstructor(EditableMesh edMesh, MeshPackagingProfile solution, Mesh freshMesh)
 {
     profile     = solution;
     this.edMesh = edMesh;
     mesh        = freshMesh;
     if (!mesh)
     {
         mesh = new Mesh();
     }
 }
Beispiel #3
0
        public virtual bool Inspect()
        {
            var changed = false;

            #if UNITY_EDITOR
            UnityEngine.Object newProfile = null;

            if ("Drop New Profile Here:".edit(ref newProfile).nl(ref changed))
            {
                var mSol = new MeshPackagingProfile();
                mSol.Decode(QcFile.LoadUtils.TryLoadAsTextAsset(newProfile));

                PainterCamera.Data.meshPackagingSolutions.Add(mSol);
                PlaytimePainter.inspected.selectedMeshProfile = PainterCamera.Data.meshPackagingSolutions.Count - 1;
            }
            #endif

            "Profile Name: ".edit(80, ref name);

            #if UNITY_EDITOR
            var path = Path.Combine(PainterCamera.Data.meshesFolderName, FolderName);

            if (icon.Save.Click("Save To:" + path, 25).nl())
            {
                this.SaveToAssets(path, name);
                QcUnity.RefreshAssetDatabase();
                (name + " Saved to " + path).showNotificationIn3D_Views();
            }
            #endif

            foreach (var s in dtaLnks)
            {
                s.Inspect().nl(ref changed);
            }

            return(changed);
        }
Beispiel #4
0
        public VertexDataLink GetMySolution()
        {
            MeshPackagingProfile pf = VertexDataTypes.CurMeshDta.profile;

            return(pf.dtaLnks[myIndex]);
        }