private void DeleteFromBlacklist(string paths, object callback)
        {
            var assetPaths = paths.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);

            if (assetPaths.Length == 0)
            {
                return;
            }

            foreach (string path in assetPaths)
            {
                APCache.RemoveFromBlacklist(path);
            }

            APCache.CommitBlacklistChange();
        }
Exemplo n.º 2
0
        public static void AddToBlacklist()
        {
            List <APAsset> newBlacklist = new List <APAsset>();

            foreach (var item in Selection.objects)
            {
                var path = GetPathOfSelectedAssets(item);
                if (!APCache.ExistsInBlacklist(path))
                {
                    var asset = APResources.GetBlackListAPAsset(path);
                    APCache.AddToBlacklist(path, asset);
                    newBlacklist.Add(asset);
                }
            }

            AssetNotification.webCommunicationService.AddAssets(newBlacklist);
            APCache.CommitBlacklistChange();
        }
Exemplo n.º 3
0
        public static void RemoveBlacklist()
        {
            List <APAsset> deleteAssets = new List <APAsset>();

            foreach (var item in Selection.objects)
            {
                var path = GetPathOfSelectedAssets(item);
                if (APCache.ExistsInBlacklist(path))
                {
                    var asset = APResources.GetBlackListAPAsset(path);
                    APCache.RemoveFromBlacklist(path);
                    Utility.UpdateJsonInAsset(asset);
                    deleteAssets.Add(asset);
                }
            }

            AssetNotification.webCommunicationService.DeleteAssets(deleteAssets.ToArray().ToList());;
            APCache.CommitBlacklistChange();
        }