diff --git a/SpineViewer/Controls/SpinePreviewer.cs b/SpineViewer/Controls/SpinePreviewer.cs index 5a7fc63..1bcb99f 100644 --- a/SpineViewer/Controls/SpinePreviewer.cs +++ b/SpineViewer/Controls/SpinePreviewer.cs @@ -54,32 +54,32 @@ namespace SpineViewer.Controls private class PreviewerProperty(SpinePreviewer previewer) { [TypeConverter(typeof(SizeConverter))] - [Category("导出"), DisplayName("分辨率")] + [Category("[0] 导出"), DisplayName("分辨率")] public Size Resolution { get => previewer.Resolution; set => previewer.Resolution = value; } [TypeConverter(typeof(PointFConverter))] - [Category("导出"), DisplayName("画面中心点")] + [Category("[0] 导出"), DisplayName("画面中心点")] public PointF Center { get => previewer.Center; set => previewer.Center = value; } - [Category("导出"), DisplayName("缩放")] + [Category("[0] 导出"), DisplayName("缩放")] public float Zoom { get => previewer.Zoom; set => previewer.Zoom = value; } - [Category("导出"), DisplayName("旋转")] + [Category("[0] 导出"), DisplayName("旋转")] public float Rotation { get => previewer.Rotation; set => previewer.Rotation = value; } - [Category("导出"), DisplayName("水平翻转")] + [Category("[0] 导出"), DisplayName("水平翻转")] public bool FlipX { get => previewer.FlipX; set => previewer.FlipX = value; } - [Category("导出"), DisplayName("垂直翻转")] + [Category("[0] 导出"), DisplayName("垂直翻转")] public bool FlipY { get => previewer.FlipY; set => previewer.FlipY = value; } - [Category("导出"), DisplayName("仅渲染选中")] + [Category("[0] 导出"), DisplayName("仅渲染选中")] public bool RenderSelectedOnly { get => previewer.RenderSelectedOnly; set => previewer.RenderSelectedOnly = value; } - [Category("预览"), DisplayName("显示坐标轴")] + [Category("[1] 预览"), DisplayName("显示坐标轴")] public bool ShowAxis { get => previewer.ShowAxis; set => previewer.ShowAxis = value; } - [Category("预览"), DisplayName("最大帧率")] + [Category("[1] 预览"), DisplayName("最大帧率")] public uint MaxFps { get => previewer.MaxFps; set => previewer.MaxFps = value; } } diff --git a/SpineViewer/Dialogs/ExportDialog.cs b/SpineViewer/Dialogs/ExportDialog.cs index 00858e1..05344f1 100644 --- a/SpineViewer/Dialogs/ExportDialog.cs +++ b/SpineViewer/Dialogs/ExportDialog.cs @@ -39,7 +39,7 @@ namespace SpineViewer.Dialogs PropertyInfo? labelProp = category.GetType().GetProperty("Label", BindingFlags.Instance | BindingFlags.Public); if (labelProp == null) continue; string? label = labelProp.GetValue(category) as string; - if (label != "[1] 导出") continue; + if (label != "[0] 导出") continue; // 获取该分组下的所有属性项 PropertyInfo? gridItemsProp = category.GetType().GetProperty("GridItems", BindingFlags.Instance | BindingFlags.Public); diff --git a/SpineViewer/Exporter/ExportArgs.cs b/SpineViewer/Exporter/ExportArgs.cs index 7772b88..f0acb6e 100644 --- a/SpineViewer/Exporter/ExportArgs.cs +++ b/SpineViewer/Exporter/ExportArgs.cs @@ -60,32 +60,32 @@ namespace SpineViewer.Exporter /// 输出文件夹 /// [Editor(typeof(FolderNameEditor), typeof(UITypeEditor))] - [Category("[1] 导出"), DisplayName("输出文件夹"), Description("逐个导出时可以留空,将逐个导出到模型自身所在目录")] + [Category("[0] 导出"), DisplayName("输出文件夹"), Description("逐个导出时可以留空,将逐个导出到模型自身所在目录")] public string? OutputDir { get; set; } = null; /// /// 导出单个 /// - [Category("[1] 导出"), DisplayName("导出单个"), Description("是否将模型在同一个画面上导出单个文件,否则逐个导出模型")] + [Category("[0] 导出"), DisplayName("导出单个"), Description("是否将模型在同一个画面上导出单个文件,否则逐个导出模型")] public bool ExportSingle { get; set; } = false; /// /// 画面分辨率 /// [TypeConverter(typeof(SizeConverter))] - [Category("[1] 导出"), DisplayName("分辨率"), Description("画面的宽高像素大小,请在预览画面参数面板进行调整")] + [Category("[0] 导出"), DisplayName("分辨率"), Description("画面的宽高像素大小,请在预览画面参数面板进行调整")] public Size Resolution { get; } /// /// 渲染视窗 /// - [Category("[1] 导出"), DisplayName("视图"), Description("画面的视图参数,请在预览画面参数面板进行调整")] + [Category("[0] 导出"), DisplayName("视图"), Description("画面的视图参数,请在预览画面参数面板进行调整")] public SFML.Graphics.View View { get; } /// /// 是否仅渲染选中 /// - [Category("[1] 导出"), DisplayName("仅渲染选中"), Description("是否仅导出选中的模型,请在预览画面参数面板进行调整")] + [Category("[0] 导出"), DisplayName("仅渲染选中"), Description("是否仅导出选中的模型,请在预览画面参数面板进行调整")] public bool RenderSelectedOnly { get; } /// diff --git a/SpineViewer/Exporter/Implementations/ExportArgs/FrameExportArgs.cs b/SpineViewer/Exporter/Implementations/ExportArgs/FrameExportArgs.cs index f4086da..e939faf 100644 --- a/SpineViewer/Exporter/Implementations/ExportArgs/FrameExportArgs.cs +++ b/SpineViewer/Exporter/Implementations/ExportArgs/FrameExportArgs.cs @@ -20,7 +20,7 @@ namespace SpineViewer.Exporter.Implementations.ExportArgs /// 单帧画面格式 /// [TypeConverter(typeof(ImageFormatConverter))] - [Category("[2] 单帧画面"), DisplayName("图像格式")] + [Category("[1] 单帧画面"), DisplayName("图像格式")] public ImageFormat ImageFormat { get => imageFormat; @@ -35,14 +35,14 @@ namespace SpineViewer.Exporter.Implementations.ExportArgs /// /// 文件名后缀 /// - [Category("[2] 单帧画面"), DisplayName("文件名后缀"), Description("与图像格式匹配的文件名后缀")] + [Category("[1] 单帧画面"), DisplayName("文件名后缀"), Description("与图像格式匹配的文件名后缀")] public string FileSuffix { get => imageFormat.GetSuffix(); } /// /// DPI /// [TypeConverter(typeof(SizeFConverter))] - [Category("[2] 单帧画面"), DisplayName("DPI"), Description("导出图像的每英寸像素数,用于调整图像的物理尺寸")] + [Category("[1] 单帧画面"), DisplayName("DPI"), Description("导出图像的每英寸像素数,用于调整图像的物理尺寸")] public SizeF DPI { get => dpi; diff --git a/SpineViewer/Exporter/Implementations/ExportArgs/FrameSequenceExportArgs.cs b/SpineViewer/Exporter/Implementations/ExportArgs/FrameSequenceExportArgs.cs index 43c0175..8f7208c 100644 --- a/SpineViewer/Exporter/Implementations/ExportArgs/FrameSequenceExportArgs.cs +++ b/SpineViewer/Exporter/Implementations/ExportArgs/FrameSequenceExportArgs.cs @@ -20,7 +20,7 @@ namespace SpineViewer.Exporter.Implementations.ExportArgs /// 文件名后缀 /// [TypeConverter(typeof(SFMLImageFileSuffixConverter))] - [Category("[3] 帧序列参数"), DisplayName("文件名后缀"), Description("帧文件的后缀,同时决定帧图像格式")] + [Category("[2] 帧序列参数"), DisplayName("文件名后缀"), Description("帧文件的后缀,同时决定帧图像格式")] public string FileSuffix { get; set; } = ".png"; } } diff --git a/SpineViewer/Exporter/Implementations/ExportArgs/GifExportArgs.cs b/SpineViewer/Exporter/Implementations/ExportArgs/GifExportArgs.cs index f6c52ff..7daaf39 100644 --- a/SpineViewer/Exporter/Implementations/ExportArgs/GifExportArgs.cs +++ b/SpineViewer/Exporter/Implementations/ExportArgs/GifExportArgs.cs @@ -22,14 +22,14 @@ namespace SpineViewer.Exporter.Implementations.ExportArgs /// /// 调色板最大颜色数量 /// - [Category("[3] GIF 参数"), DisplayName("调色板最大颜色数量"), Description("设置调色板使用的最大颜色数量, 越多则色彩保留程度越高")] + [Category("[2] GIF 参数"), DisplayName("调色板最大颜色数量"), Description("设置调色板使用的最大颜色数量, 越多则色彩保留程度越高")] public uint MaxColors { get => maxColors; set => maxColors = Math.Clamp(value, 2, 256); } private uint maxColors = 256; /// /// 透明度阈值 /// - [Category("[3] GIF 参数"), DisplayName("透明度阈值"), Description("小于该值的像素点会被认为是透明像素")] + [Category("[2] GIF 参数"), DisplayName("透明度阈值"), Description("小于该值的像素点会被认为是透明像素")] public byte AlphaThreshold { get => alphaThreshold; set => alphaThreshold = value; } private byte alphaThreshold = 128; diff --git a/SpineViewer/Exporter/Implementations/ExportArgs/VideoExportArgs.cs b/SpineViewer/Exporter/Implementations/ExportArgs/VideoExportArgs.cs index 752872a..5b9c6cb 100644 --- a/SpineViewer/Exporter/Implementations/ExportArgs/VideoExportArgs.cs +++ b/SpineViewer/Exporter/Implementations/ExportArgs/VideoExportArgs.cs @@ -17,7 +17,7 @@ namespace SpineViewer.Exporter.Implementations.ExportArgs /// /// 导出时长 /// - [Category("[2] 视频参数"), DisplayName("时长"), Description("可以从模型列表查看动画时长, 如果小于 0, 则在逐个导出时每个模型使用各自的当前动画时长")] + [Category("[1] 视频参数"), DisplayName("时长"), Description("可以从模型列表查看动画时长, 如果小于 0, 则在逐个导出时每个模型使用各自的当前动画时长")] public float Duration { get => duration; @@ -28,7 +28,7 @@ namespace SpineViewer.Exporter.Implementations.ExportArgs /// /// 帧率 /// - [Category("[2] 视频参数"), DisplayName("帧率"), Description("每秒画面数")] + [Category("[1] 视频参数"), DisplayName("帧率"), Description("每秒画面数")] public float FPS { get; set; } = 60; public override string? Validate() diff --git a/SpineViewer/Spine/Spine.cs b/SpineViewer/Spine/Spine.cs index 2ebb64a..fd3d132 100644 --- a/SpineViewer/Spine/Spine.cs +++ b/SpineViewer/Spine/Spine.cs @@ -223,37 +223,37 @@ namespace SpineViewer.Spine /// 获取所属版本 /// [TypeConverter(typeof(VersionConverter))] - [Category("基本信息"), DisplayName("运行时版本")] + [Category("[0] 基本信息"), DisplayName("运行时版本")] public Version Version { get; } /// /// 资源所在完整目录 /// - [Category("基本信息"), DisplayName("资源目录")] + [Category("[0] 基本信息"), DisplayName("资源目录")] public string AssetsDir { get; } /// /// skel 文件完整路径 /// - [Category("基本信息"), DisplayName("skel文件路径")] + [Category("[0] 基本信息"), DisplayName("skel文件路径")] public string SkelPath { get; } /// /// atlas 文件完整路径 /// - [Category("基本信息"), DisplayName("atlas文件路径")] + [Category("[0] 基本信息"), DisplayName("atlas文件路径")] public string AtlasPath { get; } /// /// 名称 /// - [Category("基本信息"), DisplayName("名称")] + [Category("[0] 基本信息"), DisplayName("名称")] public string Name { get; } /// /// 获取所属文件版本 /// - [Category("基本信息"), DisplayName("文件版本")] + [Category("[0] 基本信息"), DisplayName("文件版本")] public abstract string FileVersion { get; } #endregion @@ -263,26 +263,26 @@ namespace SpineViewer.Spine /// /// 缩放比例 /// - [Category("变换"), DisplayName("缩放比例")] + [Category("[1] 变换"), DisplayName("缩放比例")] public abstract float Scale { get; set; } /// /// 位置 /// [TypeConverter(typeof(PointFConverter))] - [Category("变换"), DisplayName("位置")] + [Category("[1] 变换"), DisplayName("位置")] public abstract PointF Position { get; set; } /// /// 水平翻转 /// - [Category("变换"), DisplayName("水平翻转")] + [Category("[1] 变换"), DisplayName("水平翻转")] public abstract bool FlipX { get; set; } /// /// 垂直翻转 /// - [Category("变换"), DisplayName("垂直翻转")] + [Category("[1] 变换"), DisplayName("垂直翻转")] public abstract bool FlipY { get; set; } #endregion @@ -292,9 +292,15 @@ namespace SpineViewer.Spine /// /// 是否使用预乘Alpha /// - [Category("渲染"), DisplayName("预乘Alpha通道")] + [Category("[3] 渲染"), DisplayName("预乘Alpha通道")] public bool UsePremultipliedAlpha { get; set; } = true; + /// + /// 是否被隐藏, 被隐藏的模型将仅仅在列表显示, 不参与其他行为 + /// + [Category("[3] 渲染"), DisplayName("是否隐藏")] + public bool IsHidden { get; set; } = false; + #endregion #region 属性 | 动画 @@ -310,13 +316,13 @@ namespace SpineViewer.Spine /// 当前动画名称, 如果设置的动画不存在则忽略 /// [TypeConverter(typeof(AnimationConverter))] - [Category("动画"), DisplayName("当前动画")] + [Category("[2] 动画"), DisplayName("当前动画")] public abstract string CurrentAnimation { get; set; } /// /// 当前动画时长 /// - [Category("动画"), DisplayName("当前动画时长")] + [Category("[2] 动画"), DisplayName("当前动画时长")] public float CurrentAnimationDuration { get => GetAnimationDuration(CurrentAnimation); } /// @@ -330,7 +336,7 @@ namespace SpineViewer.Spine /// 当前皮肤名称, 如果设置的皮肤不存在则忽略 /// [TypeConverter(typeof(SkinConverter))] - [Category("动画"), DisplayName("当前皮肤")] + [Category("[2] 动画"), DisplayName("当前皮肤")] public abstract string CurrentSkin { get; set; } #endregion @@ -431,13 +437,13 @@ namespace SpineViewer.Spine /// /// 显示包围盒 /// - [Category("调试"), DisplayName("显示包围盒")] + [Category("[4] 调试"), DisplayName("显示包围盒")] public bool DebugBounds { get; set; } = true; /// /// 显示骨骼 /// - [Category("调试"), DisplayName("显示骨骼(TODO)")] + [Category("[4] 调试"), DisplayName("显示骨骼(TODO)")] public bool DebugBones { get; set; } = false; #region SFML.Graphics.Drawable 接口实现