diff --git a/Assets/FlashTools/Scripts/Internal/Editor/Postprocessors/SwfPostprocessor.cs b/Assets/FlashTools/Scripts/Internal/Editor/Postprocessors/SwfPostprocessor.cs index fe3123c..55918c6 100644 --- a/Assets/FlashTools/Scripts/Internal/Editor/Postprocessors/SwfPostprocessor.cs +++ b/Assets/FlashTools/Scripts/Internal/Editor/Postprocessors/SwfPostprocessor.cs @@ -116,6 +116,16 @@ namespace FlashTools.Internal { List parent_masks, SwfFrameData frame) { + var inst_filter_types = display_list.Instances.Values + .Where(p => p.Visible && p.FilterList.Filters.Count > 0) + .SelectMany(p => p.FilterList.Filters) + .Select(p => p.Type) + .Distinct(); + foreach ( var filter_type in inst_filter_types ) { + Debug.LogWarningFormat( + "[FlashTools] SwfSurfaceFilters. Unsupported filter type '{0}'", + filter_type); + } var self_masks = new List(); foreach ( var inst in display_list.Instances.Values.Where(p => p.Visible) ) { CheckSelfMasks(self_masks, inst.Depth, frame); diff --git a/Assets/FlashTools/Scripts/Internal/Editor/SwfTools/SwfContext.cs b/Assets/FlashTools/Scripts/Internal/Editor/SwfTools/SwfContext.cs index a444809..f1a6d29 100644 --- a/Assets/FlashTools/Scripts/Internal/Editor/SwfTools/SwfContext.cs +++ b/Assets/FlashTools/Scripts/Internal/Editor/SwfTools/SwfContext.cs @@ -83,6 +83,7 @@ namespace FlashTools.Internal.SwfTools { public bool Visible; public SwfMatrix Matrix; public SwfBlendMode BlendMode; + public SwfSurfaceFilters FilterList; public SwfColorTransform ColorTransform; } diff --git a/Assets/FlashTools/Scripts/Internal/Editor/SwfTools/SwfContextExecuter.cs b/Assets/FlashTools/Scripts/Internal/Editor/SwfTools/SwfContextExecuter.cs index d903b92..89e58f3 100644 --- a/Assets/FlashTools/Scripts/Internal/Editor/SwfTools/SwfContextExecuter.cs +++ b/Assets/FlashTools/Scripts/Internal/Editor/SwfTools/SwfContextExecuter.cs @@ -45,6 +45,7 @@ namespace FlashTools.Internal.SwfTools { new_inst.Visible = true; new_inst.Matrix = tag.Matrix; new_inst.BlendMode = SwfBlendMode.identity; + new_inst.FilterList = SwfSurfaceFilters.identity; new_inst.ColorTransform = tag.ColorTransform; dl.Instances.Add(new_inst.Depth, new_inst); } @@ -79,6 +80,7 @@ namespace FlashTools.Internal.SwfTools { new_inst.Visible = true; new_inst.Matrix = tag.HasMatrix ? tag.Matrix : (old_inst != null ? old_inst.Matrix : SwfMatrix.identity); new_inst.BlendMode = SwfBlendMode.identity; + new_inst.FilterList = SwfSurfaceFilters.identity; new_inst.ColorTransform = tag.HasColorTransform ? tag.ColorTransform : (old_inst != null ? old_inst.ColorTransform : SwfColorTransform.identity); dl.Instances.Add(new_inst.Depth, new_inst); } @@ -127,6 +129,7 @@ namespace FlashTools.Internal.SwfTools { new_inst.Visible = tag.HasVisible ? tag.Visible : (old_inst != null ? old_inst.Visible : true); new_inst.Matrix = tag.HasMatrix ? tag.Matrix : (old_inst != null ? old_inst.Matrix : SwfMatrix.identity); new_inst.BlendMode = tag.HasBlendMode ? tag.BlendMode : (old_inst != null ? old_inst.BlendMode : SwfBlendMode.identity); + new_inst.FilterList = tag.HasFilterList ? tag.SurfaceFilters : (old_inst != null ? old_inst.FilterList : SwfSurfaceFilters.identity); new_inst.ColorTransform = tag.HasColorTransform ? tag.ColorTransform : (old_inst != null ? old_inst.ColorTransform : SwfColorTransform.identity); dl.Instances.Add(new_inst.Depth, new_inst); } @@ -145,6 +148,9 @@ namespace FlashTools.Internal.SwfTools { if ( tag.HasBlendMode ) { inst.BlendMode = tag.BlendMode; } + if ( tag.HasFilterList ) { + inst.FilterList = tag.SurfaceFilters; + } if ( tag.HasColorTransform ) { inst.ColorTransform = tag.ColorTransform; } diff --git a/Assets/FlashTools/Scripts/Internal/Editor/SwfTools/SwfTypes/SwfBlendMode.cs b/Assets/FlashTools/Scripts/Internal/Editor/SwfTools/SwfTypes/SwfBlendMode.cs index 55d2607..b7a97ba 100644 --- a/Assets/FlashTools/Scripts/Internal/Editor/SwfTools/SwfTypes/SwfBlendMode.cs +++ b/Assets/FlashTools/Scripts/Internal/Editor/SwfTools/SwfTypes/SwfBlendMode.cs @@ -65,7 +65,7 @@ namespace FlashTools.Internal.SwfTools.SwfTypes { return new SwfBlendModeData(SwfBlendModeData.Types.Hardlight); default: Debug.LogWarningFormat( - "[FlashTools] SwfBlendMode. Unsupported blend mode {0}", + "[FlashTools] SwfBlendMode. Unsupported blend mode '{0}'", Value); return new SwfBlendModeData(SwfBlendModeData.Types.Normal); }