Пример #1
0
        public static void VCToggleHiddenContext()
        {
            IEnumerable <string> assetPaths = GetAssetPathsOfSelected();

            bool bHidden = false;;
            bool bSet    = false;
            bool bEqual  = true;

            foreach (string strPath in assetPaths)
            {
                if (!bSet)
                {
                    bHidden = VCSettings.bHidden(strPath);
                }
                else if (bHidden != VCSettings.bHidden(strPath))
                {
                    bEqual = false;
                }
            }
            if (bEqual)
            {
                if (bHidden)
                {
                    VCSettings.removeHidden(assetPaths);
                }
                else
                {
                    VCSettings.addHidden(assetPaths);
                }
            }
        }
Пример #2
0
 public static void RequestStatus(string assetPath, VCSettings.EReflectionLevel reflectionLevel)
 {
     if (VCSettings.VCEnabled)
     {
         VersionControlStatus assetStatus = VCCommands.Instance.GetAssetStatus(assetPath);
         if (assetStatus.assetPath != null)
         {
             if (reflectionLevel == VCSettings.EReflectionLevel.Remote && assetStatus.reflectionLevel != VCReflectionLevel.Pending && assetStatus.reflectionLevel != VCReflectionLevel.Repository)
             {
                 VCCommands.Instance.RequestStatus(assetStatus.assetPath.Compose(), StatusLevel.Remote);
             }
             else if (reflectionLevel == VCSettings.EReflectionLevel.Local && assetStatus.reflectionLevel == VCReflectionLevel.None)
             {
                 VCCommands.Instance.RequestStatus(assetStatus.assetPath.Compose(), StatusLevel.Previous);
             }
         }
     }
 }