Beispiel #1
0
        private void AddEvent(AssetProcessEvent e)
        {
            Assert.IsTrue(m_enabled);

            m_events.Add(e);

            if (e.Kind == AssetProcessEvent.EventKind.Error)
            {
                ++m_errorEventCount;

                if (MeetFilterCondition(e))
                {
                    m_filteredEvents.Add(e);
                    ++m_filteredErrorEventCount;
                }
            }
            if (e.Kind != AssetProcessEvent.EventKind.Error)
            {
                ++m_infoEventCount;

                if (MeetFilterCondition(e))
                {
                    m_filteredEvents.Add(e);
                    ++m_filteredInfoEventCount;
                }
            }

            if (onAssetProcessEvent != null)
            {
                onAssetProcessEvent(e);
            }
            SetRecordDirty();
        }
Beispiel #2
0
        private void AddEvent(AssetProcessEvent e)
        {
            m_events.Add(e);

            if (e.Kind == AssetProcessEvent.EventKind.Error)
            {
                ++m_errorEventCount;

                if (m_includeError)
                {
                    m_filteredEvents.Add(e);
                }
            }
            if (e.Kind != AssetProcessEvent.EventKind.Error)
            {
                ++m_infoEventCount;

                if (m_includeInfo)
                {
                    m_filteredEvents.Add(e);
                }
            }

            if (onAssetProcessEvent != null)
            {
                onAssetProcessEvent(e);
            }
            SetRecordDirty();
        }
        public static AssetProcessEvent CreateModifyEvent(string assetGuid, string graphGuid, Model.NodeData n)
        {
            var ev = new AssetProcessEvent();

            ev.Init(EventKind.Modify, assetGuid, graphGuid, n.Id, n.Name, string.Empty, string.Empty);
            return(ev);
        }
        public static AssetProcessEvent CreateErrorEvent(NodeException e, string graphGuid)
        {
            var ev      = new AssetProcessEvent();
            var assetId = (e.Asset == null) ? null : e.Asset.assetDatabaseId;

            ev.Init(EventKind.Error, assetId, graphGuid, e.Node.Id, e.Node.Name, e.Reason, e.HowToFix);
            return(ev);
        }
        public static AssetProcessEvent CreateModifyEvent(string assetGuid, string graphGuid, Model.NodeData n)
        {
            var ev        = new AssetProcessEvent();
            var path      = AssetDatabase.GUIDToAssetPath(assetGuid);
            var assetName = Path.GetFileName(path);

            assetName = (assetName == null) ? string.Empty : assetName;
            ev.Init(EventKind.Modify, assetName, assetGuid, graphGuid, n.Id, n.Name, string.Empty, string.Empty);
            return(ev);
        }
Beispiel #6
0
        public void LogError(NodeException e)
        {
            AssetGraphController gc = AssetGraphPostprocessor.Postprocessor.GetCurrentGraphController();

            if (gc == null)
            {
                throw new AssetGraphException("Error event attempt to log but no graph is in stack.");
            }

            var newEvent = AssetProcessEvent.CreateErrorEvent(e, gc.TargetGraph.GetGraphGuid());

            AddEvent(newEvent);
        }
Beispiel #7
0
        public void LogModify(string assetGuid)
        {
            AssetGraphController gc = AssetGraphPostprocessor.Postprocessor.GetCurrentGraphController();

            if (gc == null)
            {
                throw new AssetGraphException("Modify event attempt to log but no graph is in stack.");
            }

            var newEvent = AssetProcessEvent.CreateModifyEvent(assetGuid, gc.TargetGraph.GetGraphGuid(), gc.CurrentNode);

            AddEvent(newEvent);
        }
Beispiel #8
0
        private bool MeetFilterCondition(AssetProcessEvent e)
        {
            var meetKindFilter =
                (m_includeError && e.Kind == AssetProcessEvent.EventKind.Error) ||
                (m_includeInfo && e.Kind != AssetProcessEvent.EventKind.Error);

            if (string.IsNullOrEmpty(m_filterKeyword))
            {
                return(meetKindFilter);
            }

            bool keymatch = true;

            foreach (var token in m_filterKeywordTokens)
            {
                if (string.IsNullOrEmpty(token))
                {
                    continue;
                }
                keymatch &= e.AssetName.IndexOf(token) >= 0;
            }
            return(meetKindFilter && keymatch);
        }
 public void OnNewAssetProcessEvent(AssetProcessEvent e)
 {
     m_logViewController.OnNewAssetProcessEvent(e);
     Repaint();
 }
 public AssetProcessEventListTreeItem(AssetProcessEvent e) : base(e.GetHashCode(), 0, string.Empty)
 {
     m_event = e;
 }
 public void OnNewAssetProcessEvent(AssetProcessEvent e)
 {
     Reload();
 }
Beispiel #12
0
 public void EventSelectionChanged(AssetProcessEvent e)
 {
     m_selectedEvent = e;
 }
Beispiel #13
0
 public void OnNewAssetProcessEvent(AssetProcessEvent e)
 {
     m_assetLogListTree.OnNewAssetProcessEvent(e);
 }