Skip to content

Feature: STS Pipeline Overhaul (Modern UI, i18n, Smart Fill, Sequence Bake)#1

Open
SuzuKaO wants to merge 3 commits intoChenxingM:masterfrom
SuzuKaO:master
Open

Feature: STS Pipeline Overhaul (Modern UI, i18n, Smart Fill, Sequence Bake)#1
SuzuKaO wants to merge 3 commits intoChenxingM:masterfrom
SuzuKaO:master

Conversation

@SuzuKaO
Copy link

@SuzuKaO SuzuKaO commented Feb 27, 2026

… Sequence BakHi @ChenxingM,

First of all, thank you for creating such an incredibly fast and lightweight foundation with ShiraheiTimeSheet.

I am working in an animation/VFX pipeline environment and needed to extend the tool to support more complex industrial workflows. Over the past few days, I have heavily refactored and expanded the codebase into what I internally call the "MionaRira Edition".

I am submitting this PR to share these features back with the community. I completely understand that this is a massive overhaul that changes the original minimalist scope of your project. If you feel this is too heavy to merge into the main branch, please feel free to close it. I just wanted to contribute the code back so you or others can cherry-pick any features you might find useful!

🚀 Major Features Added

  • Global i18n System: Implemented seamless hot-switching for English, Simplified Chinese, and Japanese.
  • Modernized UI/UX: Overhauled the interface with borderless hover menus, an auto-dismissing toast notification system, and adaptive viewport sizing.
  • Dynamic Theme Engine: Introduced customizable themes (Dark, Light, Custom) with the ability to export/import palettes as JSON.
  • Advanced Smart Fill: Added linear interpolation for selected numeric ranges and pattern extrapolation via dragging. It safely ignores hold cells (e.g., -).
  • Zero-Space Sequence Baking: Built an integrated sequence player. Added a "Bake" tool that maps timesheet timing to physical image sequences using OS Hard Links (supports TGA/TIFF) without consuming extra disk space.
  • Pipeline Integration (AE/Nuke): Added an exclusive shortcut (Ctrl+Alt+C) to safely extract and copy AE keyframe data, avoiding OS-level shortcut conflicts.
  • Video Reference Import: Added logic to extract video frames as references (requires FFmpeg in the system PATH).

🛠️ Technical Details

  • Added the image crate for handling TGA/TIFF image sequence decoding.
  • Refactored components into modular files (theme.rs, i18n.rs, player.rs, etc.) to keep the main application logic clean.
  • Ensure cross-platform compatibility for the new hard-link baking features.

Thank you again for your amazing groundwork. Let me know what you think!e)

@ChenxingM
Copy link
Owner

感谢你的贡献!能看出你在这个 PR 上花了很多精力,功能方面有不少亮眼的想法。不过这个 PR 改动范围太大,且存在一些关键问题,无法直接合入。以下是详细的 review:


必须修复的问题

1. 跨平台兼容性被破坏

当前 master 分支已经支持 Windows / macOS / Linux 三平台,但本 PR 将这些支持全部移除了:

  • Cargo.tomlwinregwinres 从平台特定依赖([target.'cfg(windows)'.dependencies])移到了全局 [dependencies] / [build-dependencies],这会导致 macOS / Linux 上编译失败。
  • src/main.rs:删除了 #[cfg(target_os = "macos")]#[cfg(target_os = "linux")] 的字体加载分支,只保留了 Windows 的硬编码路径。
  • dirs crate 被移除:macOS / Linux 的设置文件存储依赖它(~/.config/sts-rust/settings.json)。
  • [package.metadata.bundle] macOS 打包配置被删除,icon.icns 也被删除。

任何 PR 都需要保留现有的跨平台支持。

2. 品牌 / 命名变更

  • 二进制名从 sts 改为 STS_MionaRira_Edition
  • 窗口标题改为 "STS 3.0 - MionaRira Edition"
  • README 中仓库地址从 ChenxingM/sts-rust 改为 SuzuKaO/sts-rust
  • build.rs 中 Windows 资源元数据写入 "MionaRira Edition"
  • 新增了 miona_banner.png 品牌素材

这些改动属于 fork 品牌化,不适合合入上游仓库。请移除所有 "MionaRira Edition" 相关的命名和素材。

3. build.rsres.compile() 被调用两次

res.compile().unwrap();
res.compile().expect("Failed to compile Windows resources");

第一次调用成功后资源已经编译完成,第二次是多余的重复操作;第一次如果失败,.unwrap() 已经 panic 了。只需保留一次调用即可。

4. README_EN.mdREADME_JA.md 被删除

既然 PR 引入了 i18n 支持,删除多语言 README 反而不合理。请保留。


功能取舍

这个 PR 包含了大量功能,但并非所有都适合合入。以下是我的判断:

欢迎合入的功能

  • i18n 多语言支持 — 整体架构可以接受,欢迎提交
  • Layer Type(Cel / Pan / Opacity) — 实用的功能增强
  • 根据图层数动态计算窗口宽度 — 比硬编码值更合理
  • Smart Fill 线性插值 — 实用的编辑辅助
  • 状态消息提示系统 — 改善用户反馈体验
  • 其他 UX 改进(无边框上下文菜单、双击重命名等)

不打算合入的功能

  • 动态主题系统(ThemeConfig + JSON 导入导出) — 现有的 Light / Dark / System 已经够用,完整的主题引擎对这个项目来说过于复杂,维护成本高。
  • 视频导入 / FFmpeg 依赖 — 希望保持应用本身轻量,不引入外部运行时依赖。video_utils 模块及相关 UI 请移除。
  • 序列播放器(Sequence Player) — 同上,涉及 egui_extras 图片加载器和额外的 image format 依赖,增加了不必要的体积。
  • 曲线编辑器(Curve Editor) — 超出项目当前范围。

代码质量建议

5. app.rs 过于臃肿

app.rs 增长到约 1400 行,StsApp struct 承载了过多职责。建议:

  • i18n 相关逻辑保持在 i18n.rs 中,app.rs 只做调用
  • 设置对话框 UI 考虑拆分为独立模块
  • 尽量保持 app.rs 精简,只做顶层编排

6. calculate_string() 手写数学解析器

这个函数不支持运算符优先级(2+3*4 会得到 20 而不是 14)。如果需要保留此功能,建议使用 evalexprmeval crate。

7. egui_extras 依赖管理

如果最终不引入序列播放器功能,egui_extras 依赖也应一并移除。如果保留,至少应设为 optional 并放在 gui-egui feature 下。

8. 快捷键变更

AE 复制快捷键从 Ctrl+Shift+C 改为 Ctrl+Alt+C,请在 PR 描述中说明变更原因。


总结

目前这个 PR 无法直接合入,主要原因是:跨平台兼容性被破坏、包含 fork 品牌化改动、功能范围过大。

建议将这个 PR 拆分为多个小 PR 分别提交,例如:

  1. PR: i18n 支持i18n.rs + UI 字符串国际化(不改动品牌名称)
  2. PR: Layer Type 系统 — Cel / Pan / Opacity 图层类型
  3. PR: UX 改进 — Smart Fill、动态窗口宽度、状态消息、上下文菜单优化等

每个小 PR 都需要保持跨平台兼容,并且不包含品牌改动。这样更容易 review 和合入。

欢迎拆分后重新提交,感谢你的贡献!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants