比较提交

..
作者 SHA1 备注 提交日期
mac c86925d967 Record notarized 1.14.0 installer and release inputs 2026-11-06 00:44:47 +08:00
mac 7e11c47126 Verify installed 1.14.0 dual tracking on the original FCP footage 2026-11-06 00:42:20 +08:00
mac 810bbf4dfb Replace legacy automatic stamp keys on the same host analysis frame 2026-11-06 00:34:23 +08:00
mac 52a7422004 Track both clone stamp regions and render their relative zoom 2026-11-06 00:21:58 +08:00
mac 78b4c5f962 Record installed 1.13.4 and user-confirmed clone stamp editing 2026-11-06 00:16:45 +08:00
mac 7bf1f88fe9 Persist clone stamp edits using the host action time 2026-11-06 00:01:33 +08:00
mac b2601ac9b0 Retain clone regression fixtures across asynchronous writes 2026-11-05 23:53:30 +08:00
mac 5032ce70ab Keep clone stamp preview through host save and use the action clock 2026-11-05 23:51:06 +08:00
mac df9b3c0253 Verify published Dayu Color 1.13.2 article and installer 2026-11-05 23:33:03 +08:00
mac 44c4f5c470 Prepare Dayu Color 1.13.2 article update 2026-11-05 23:30:41 +08:00
mac 84a0405628 Verify published Dayu Color 1.13.2 installer download 2026-11-05 23:19:20 +08:00
mac 5252296b7b Record verified Dayu Color 1.13.2 integrity delivery 2026-11-05 23:16:30 +08:00
mac db6b2b05b3 Reject modified Dayu Color bundles at registration, service startup and update 2026-11-05 23:06:15 +08:00
mac a7508203d1 Record Dayu Color re-signing protection assessment 2026-11-05 22:55:59 +08:00
mac 38afc087d5 Verify and record published 1.13.1 pixel clone installer 2026-11-05 22:34:12 +08:00
mac 46153a26ed Record signed pixel clone build and Final Cut Pro validation 2026-11-05 22:31:22 +08:00
mac 1659f3d385 Clone original pixels by translation and keep the tracked footprint stable 2026-11-05 22:21:25 +08:00
mac dff9134be7 Keep the clone identity through the host test document replacement 2026-11-05 22:12:43 +08:00
mac 1f1b7917e7 Make the clone source crosshair draggable without changing target tracks 2026-11-05 22:09:33 +08:00
mac 4fb008e100 Verify and record published 1.13.0 installer 2026-11-05 22:08:05 +08:00
共修改 43 个文件,包含 1559 行新增和 174 行删除

没有与搜索条件相匹配的文件

+9
查看文件
@@ -0,0 +1,9 @@
## 大鱼调色 1.13.1(85)
选中仿制图章后,可拖动青色取样十字来调整取样位置。松手后重新取样并保存为一次撤销,按 Esc 可取消拖动。覆盖区域及已有位置轨迹随项目保留。
图章按 1:1 像素平移复制。改变椭圆宽高只改变覆盖范围,跟踪只移动目标中心。原画面的像素尺寸和方向保持一致。
本公测版本适用于 Apple Silicon Mac,要求 macOS 14.6 或更高版本。
安装包 SHA-256 `8a19afadda6317d186541f37a221c46261a22ddabcdddec90d02e1315b693965`,45,352,349 字节。
+19
查看文件
@@ -0,0 +1,19 @@
{
"title": "大鱼调色 1.13.2 公测版|安装完整性校验与仿制图章",
"content": "<!-- wp:paragraph -->\n<p>大鱼调色是适用于 Final Cut Pro 和 Motion 的原生 FxPlug 4 调色插件。1.13.2 公测版新增安装完整性校验,并包含近期加入的仿制图章。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.13.2 安装完整性校验</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>主 App 注册插件前会检查官方签名和文件完整性。如果检测到掉签、重签或安装内容被修改,主 App 会停止自动更新,并尝试撤销当前副本的插件登记。Final Cut Pro 或 Motion 启动插件服务时,还会再做一次验签。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>官方原始 PKG 可以原样转发。</strong> 请保持安装包原样。禁止二次加密、另加一机一码后分发。大鱼调色安装和使用无需登录、激活码或机器码。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">仿制图章</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>在画布右下角选择仿制图章,点选取样中心并拖出覆盖区。选中图章后,可以拖动青色十字重新取样,松手后可一次撤销,按 Esc 可取消拖动。图章按原像素平移复制,扩大覆盖区时,已有重合区域的复制像素保持一致。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">在时间线里完成调色</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p><strong>色彩管理与基础调整</strong>:支持 CST 输入、工作空间和输出转换,并提供曝光、白平衡、曲线、HSL、色轮及蜘蛛盘等调节工具。首次使用时,请在一级调色中选择与素材相符的输入曲线和色域。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>LUT 与风格管理</strong>:通过缩略图浏览、收藏和预览管理常用 LUT,支持自选 LUT 文件与文件夹。完整预设用于保存组合调节;适合静态颜色变换的处理可导出 Cube LUT,颗粒、晕光、蒙版等时间或空间效果不属于静态 LUT 的保存范围。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>胶片模拟与印片外观</strong>:包含减色、颗粒、晕光、辉光、暗角及通道混合器,提供 Kodak 2383、Fuji 3513 等八种印片外观,可独立调整强度。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>局部蒙版与工具叠层</strong>:可针对单独工具添加蒙版、建立相邻叠层,并使用关键帧与跟踪处理局部区域,方便细调画面的不同部分。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">历史更新</h2>\n<!-- /wp:heading -->\n\n<!-- wp:heading {\"level\":3} -->\n<h3 class=\"wp-block-heading\">1.12.0 统一调色工作区与共享蒙版</h3>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p><strong>统一调色工作区</strong>。从画布右下角或检视器点击“控制面板”。左侧管理图层,中间调节选中的模块,右侧同时显示亮度波形、RGB 分列、直方图和带肤色参考线的矢量图。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>画布工具与共享蒙版</strong>。左下角可直接绘制矩形、椭圆和钢笔蒙版,也能打开曲线、畸变、肤色范围或 LUT。一个蒙版可同时作用于 HSL、蜘蛛盘等多个图层。点击图层上的蒙版图标即可编辑形状或运行跟踪。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>最近使用 LUT</strong>。风格 LUT 参数下方显示最近使用的缩略图,点击即可应用到当前图层。浏览库按窗口宽度自动换行,保留文件夹和画面预览。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>编辑与加载</strong>。改善切换片段、重新打开检视器及停在片尾时的加载,修正钢笔闭合和画布曲线调整的保存问题。已在本机 Final Cut Pro 验证。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:image {\"id\":15856,\"sizeSlug\":\"large\",\"linkDestination\":\"none\"} -->\n<figure class=\"wp-block-image size-large\"><img src=\"https://dayu.media/wp-content/uploads/2026/11/1793866544-78805a221a988e7-1024x298.png\" alt=\"\" class=\"wp-image-15856\"/><figcaption class=\"wp-element-caption\">全新浮窗工作区面板</figcaption></figure>\n<!-- /wp:image -->\n\n<!-- wp:heading {\"level\":3} -->\n<h3 class=\"wp-block-heading\">1.10.0 画布工具与独立工作区</h3>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>下方为 1.10.0 的深色与浅色界面记录。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:image {\"id\":15840,\"sizeSlug\":\"full\",\"linkDestination\":\"none\"} -->\n<figure class=\"wp-block-image size-full\"><img src=\"https://dayu.media/wp-content/uploads/2026/11/1793804584-5bc2fbe021e0e8f.png\" alt=\"大鱼调色 1.10.0 深色模式:画布左侧纵向工具条、检查Line truncated
"excerpt": "大鱼调色 1.13.2 公测版加入安装完整性校验,并包含按原像素复制的仿制图章。原始安装包可以原样转发,安装与使用无需机器码。",
"seo": {
"title": {
"enabled": true,
"value": "大鱼调色 1.13.2 公测版|安装完整性校验与仿制图章"
},
"description": {
"enabled": true,
"value": "大鱼调色 1.13.2 是适用于 Final Cut Pro 与 Motion 的原生调色插件。新版增加安装完整性校验,并包含按原像素复制的仿制图章。官方原始安装包已签名公证,可以原样转发。适用于 Apple Silicon 和 macOS 14.6 或更新版本。"
},
"keywords": {
"enabled": true,
"value": "大鱼调色,Final Cut Pro,Motion,FxPlug4,调色插件,仿制图章,安装完整性校验"
}
}
}
+9
查看文件
@@ -0,0 +1,9 @@
## 大鱼调色 1.13.2(86)
新增安装完整性检查。主 APP 验证外层 APP 和插件服务的官方签名后再提交注册。发现签名失效或安装内容被改动时,主 APP 停止自动更新,撤销当前副本的插件登记。FxPlug 服务在 Final Cut Pro 或 Motion 请求启动时也会独立验签。
原始 PKG 可以原样转发。安装和调色均无需机器码或登录。正常安装的自动更新继续可用,下载的安装包仍经签名、公证和完整性校验。
适用于 Apple Silicon Mac,要求 macOS 14.6 或更高版本。
安装包为 45,359,239 字节,SHA-256 `6c18bc081cd9d5099ae821df5d5da43585f9db292345c18db4a4e12cce1f133f`。
+9
查看文件
@@ -0,0 +1,9 @@
## 大鱼调色 1.14.0(90)
仿制图章现在分别跟踪取样区和覆盖区的位置及缩放。覆盖圈会跟随覆盖区变化,复制内容按两边的相对缩放取样。原有图章可选中后重新执行双向跟踪。任一侧跟丢时,保留两边均可信的连续轨迹。
修复拖出图章后预览消失、拖动后回到原处,以及旧自动轨迹键可能让片尾跳回旧位置的问题。在 Final Cut Pro 12.4 的 4K 实拍素材中验证了 257 个连续双点键。
适用于 Apple Silicon Mac,要求 macOS 14.6 或更高版本。原始签名安装包可以原样转发。
安装包为 45,370,597 字节,SHA-256 `884342ab5ef0c42d873a6411b6c2bf0ae3cec2e07dedda90b308b057ff59f5e8`。
+34
查看文件
@@ -1,3 +1,25 @@
# 2026-11-06 仿制图章双点跟踪 1.14.0(90)
从 `https://dayu.media/git/dayu/dayu-color.git` 的 main 检出实际编译提交 `810bbf4dfb0a05bc2fa66da546ca75b9610985a3`。独立远端检出 624 个跟踪文件,与编译提交树一致,Git 完整性检查通过。构建沿用 Xcode 27.1、FxPlug SDK 4.3.5、OpenCV 4.5.1 锁定依赖、Release、Apple Silicon 和 macOS 14.6+。无 LFS 或子模块。正式路径为 `/Library/Plug-Ins/FxPlug/大鱼调色.app`,主 ID `com.dayu.color`,服务 ID `com.dayu.color.XPC`,签名团队 `B3W25FX5H5`。证书私钥和 Apple 公证凭据单独恢复。
使用 `tools/deliver.py` 构建、签名、公证和安装。APP 公证号 `1e7a48fe-dd0a-4643-b587-66eaa05ed46a` 为 Accepted。正式安装通过 881 项原生检查、票据和 Gatekeeper,PluginKit 只登记正式位置。FCP 12.4 实拍双向跟踪确认两个位置与横纵缩放随帧独立变化,257 个键按 25fps 连续保存。旧版可读数据、跟丢和片尾偏移的测试见 [宿主核验](verification/HostCloneTracking1.14.0.json)。
用 `Packaging/build_pkg.py` 从已验收的正式 APP 生成 `../发行包/大鱼调色-1.14.0.pkg`。Developer ID Installer 签名、Apple 公证 `bea7b45f-7d68-4b6d-9173-93ee5ad8b162` Accepted、票据与 20 项展开验包通过。大小 45,370,597 字节,SHA-256 `884342ab5ef0c42d873a6411b6c2bf0ae3cec2e07dedda90b308b057ff59f5e8`。[安装包报告](verification/Package.json)
版本标签 `v1.14.0-clone-tracking-20261106` 关联正式包核验与发行说明。站点文章 15792 对应 1.13.2,主 APP 公测清单对应 1.12.0。
# 2026-11-05 安装完整性加固 1.13.2(86)
从 `https://dayu.media/git/dayu/dayu-color.git` 检出实际编译提交 `db6b2b05b3ee2ad40a6aeab70017a2b121caa67d`。独立远端检出核对 618 个文件和 Git 完整性,无子模块。沿用 Xcode 27.1、FxPlug SDK 4.3.5、Apple Silicon、macOS 14.6+、Release 和已有锁定依赖。正式 APP 固定在 `/Library/Plug-Ins/FxPlug/大鱼调色.app`,签名团队为 `B3W25FX5H5`。签名、公证登录和证书私钥单独恢复。
验签覆盖主 APP 登记、内嵌 FxPlug 服务启动和自动更新入口。保持现有效果 UUID、原始安装包的转发与离线使用。验签失败会停止当前副本更新并尝试撤销它的登记。系统可自行发现磁盘上的插件,FxPlug 启动检查独立执行。后端更新通道沿用现有策略。验证见 [完整性测试](verification/Integrity1.13.2.json) 和 [宿主验收](verification/HostIntegrity1.13.2.json)。
使用 `tools/deliver.py` 从正式路径安装验收,再通过 `Packaging/build_pkg.py` 打包。正式 PKG 为 `../发行包/大鱼调色-1.13.2.pkg`,45,359,239 字节,SHA-256 `6c18bc081cd9d5099ae821df5d5da43585f9db292345c18db4a4e12cce1f133f`。APP 与 PKG 均签名、公证 Accepted、票据验证通过,安装包通过 20 项展开核验。版本标签为 `v1.13.2-integrity-20261105`。[APP 交付](verification/Delivery.json) · [PKG 验包](verification/Package.json)
公测 Release 393 的附件 37 已发布。发布前草稿和发布后附件分别完整下载,字节数和 SHA-256 均与正式 PKG 匹配。标签完整提交为 `5252296b7b628c8df7e68dfb48df0db38cd12a75`,独立远端检出通过 621 个文件、安装包记录和 Git 完整性核对。临时下载、恢复副本和 APP 生成副本已清理。[发布核验](verification/Release.json)
[站点原文章 15792](https://dayu.media/15792/) 已更新至 1.13.2。正文、SEO、原封面、普通用户 50 元和有效会员免费均已核对,主下载包完整下载与正式 PKG 一致。文章发布输入为 `Publishing/1.13.2/Article-Payload.json`,后台原始回读仅保存在本机缓存。主 APP 公测更新清单回读仍为 1.12.0(79)。[文章核验](verification/Article1.13.2.json)
# 2026-11-05 检视器与画布控件 1.12.1(81)
正式 APP 位于 `/Library/Plug-Ins/FxPlug/大鱼调色.app`,主 ID `com.dayu.color`,服务 ID `com.dayu.color.XPC`。实际编译源码为 `43320c7ccdfc6738ba3c380888bb7f3ea75ebb87`,已推送至 `https://dayu.media/git/dayu/dayu-color.git` 的 main。恢复编译时检出该提交,沿用下节的 Xcode 27.1、FxPlug SDK 4.3.5、Release 和锁定依赖流程。正式签名及公证凭据独立恢复。
@@ -129,6 +151,16 @@ Release384/附件28已发布,草稿浏览器完整下载和发布后再次完
# 大鱼调色恢复说明
## 1.13.1(85)等像素仿制图章
实际编译提交 `1659f3d3853e2574f06a45687141fb444b5d02ca`。正式 APP 固定路径、Bundle ID 与签名团队沿用 1.13.0。Apple 公证 `e1d669d2-821b-46a8-99bc-05c847c91a15` Accepted,票据、Gatekeeper、PluginKit 唯一正式位置、864 项原生检查和 FCP 12.4 读入旧图章通过。84 版验证了取样点拖动后被 85 版替代,未单独打包。83 和 84 的临时 APP 回退副本已清理。
独立远端克隆核对 613 个编译节点文件,Git full/strict、逐文件 SHA-256 通过,无 LFS 或子模块。继续沿用 Xcode 27.1、Metal 工具链、FxPlug SDK 4.3.5 与 macOS 14.6+ Apple Silicon。构建使用 `tools/deliver.py`,打包使用 `Packaging/build_pkg.py`。[宿主验收](verification/HostCloneSource1.13.1.json) · [独立源码恢复](verification/CloneSourceRecovery1.13.1.json)
正式安装包 `../发行包/大鱼调色-1.13.1.pkg`,45,352,349 字节,SHA-256 `8a19afadda6317d186541f37a221c46261a22ddabcdddec90d02e1315b693965`,公证 `b85219d9-d465-4827-bdb6-3023eb161159` Accepted。Developer ID Installer 签名、票据、Gatekeeper 和 20 项实际展开检查通过。版本标签为 `v1.13.1-pixel-clone-20261105`。本机使用独立 APP 安装验收。
[公测 Release 392](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.13.1-pixel-clone-20261105) 的附件 36 已通过草稿下载和正式附件二次下载校验。标签提交 `46153a26edfbf44c5f22fbad5953ec74c0d33883` 的 616 个文件、编译提交关系和安装包记录通过独立远程恢复。[发布证据](verification/Release.json)
## 1.13.0(83)画布响应与仿制图章
实际编译提交为 `9977b5c41b07e0b08e6408c492498ba6e396c981`。正式 APP 固定在 `/Library/Plug-Ins/FxPlug/大鱼调色.app`,外层 `com.dayu.color`,XPC `com.dayu.color.XPC`。团队 B3W25FX5H5,Apple 公证 `a9134875-aea9-4150-9e61-3051d23cd809` 为 Accepted,票据、Gatekeeper 和 PluginKit 通过。82 版实窗发现系统符号未渲染,由绘制自有图标的 83 版替代。81 和 82 的本轮临时回退副本在验收后清理,历史发行包保留。
@@ -138,6 +170,8 @@ Release384/附件28已发布,草稿浏览器完整下载和发布后再次完
正式安装包 `../发行包/大鱼调色-1.13.0.pkg`,45,350,463 字节,SHA-256 `7999233dd4a3b797a879cc0f37a20f0c35f925c5f6823720b40e684464a452e8`。Developer ID Installer 签名、公证 `13d6f418-4d36-4ef8-a92d-591610cb7682` Accepted、票据、Gatekeeper 和 20 项实际展开检查通过。版本标签为 `v1.13.0-clone-stamp-20261105`。本机已通过独立 APP 安装验收。
[公测 Release 391](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.13.0-clone-stamp-20261105) 的附件 35 已通过草稿下载和正式附件二次下载校验。标签完整提交 `07601e50bf604e7721bccf8be10e403a2bd030d1`,独立恢复版本标签和安装包记录通过。[发布证据](verification/Release.json)
## 当前1.8.0(55):版本化 ACES 色彩管理
远程 `https://dayu.media/git/dayu/dayu-color.git`,main;发行标签 `v1.8.0-cms-20261103`。实际编译源码 `11a88518280f0665f3cd0f388d1d66e5446ece14`,可先以该完整 SHA 恢复程序,标签与安装包的最终远程核验见 `verification/Release.json`。无 LFS 或子模块。固定 OCIO 2.5.2 / ACES 1.3 配置与全部必要依赖源码包、SHA-256 和许可证已放入 `ColorManagement/`,不依赖兄弟应用或其工作副本。
+4 -1
查看文件
@@ -9,7 +9,10 @@ int main(int argc,char **argv){@autoreleasepool{
updater.changed=^(NSDictionary *state){NSString *phase=state[@"phase"];[phases addObject:phase];
if([phase isEqual:@"available"]){if(started){done=YES;fprintf(stderr,"%s\n",[state description].UTF8String);}else{started=YES;dispatch_async(dispatch_get_main_queue(),^{[updater download];});}}
if([phase isEqual:@"ready"]){done=YES;passed=YES;}
if([phase isEqual:@"failed"]||[phase isEqual:@"latest"]){done=YES;fprintf(stderr,"%s\n",[state description].UTF8String);}
if([@[@"failed",@"latest",@"integrity_rejected"] containsObject:phase]){
done=YES;fprintf(stderr,"%s\n",[state description].UTF8String);
if([phase isEqual:@"integrity_rejected"])fprintf(stderr,"Run the live update check in the officially installed app.\n");
}
};
[updater check];NSDate *deadline=[NSDate dateWithTimeIntervalSinceNow:360];
while(!done&&deadline.timeIntervalSinceNow>0)[NSRunLoop.currentRunLoop runUntilDate:[NSDate dateWithTimeIntervalSinceNow:.1]];
+84
查看文件
@@ -0,0 +1,84 @@
{
"passResult": true,
"articleID": 15792,
"url": "https://dayu.media/15792/",
"status": "publish",
"title": "大鱼调色 1.13.2 公测版|安装完整性校验与仿制图章",
"requestID": "dayu-color-1132-build86-article-20261105",
"changedResourceFields": [
"cao_downurl",
"cao_original_filename"
],
"commercialAndVideoFieldsPreserved": true,
"authorCategoriesTagsPreserved": true,
"fcpxSettingsPreserved": true,
"seo": {
"title": {
"enabled": true,
"value": "大鱼调色 1.13.2 公测版|安装完整性校验与仿制图章"
},
"description": {
"enabled": true,
"value": "大鱼调色 1.13.2 是适用于 Final Cut Pro 与 Motion 的原生调色插件。新版增加安装完整性校验,并包含按原像素复制的仿制图章。官方原始安装包已签名公证,可以原样转发。适用于 Apple Silicon 和 macOS 14.6 或更新版本。"
},
"keywords": {
"enabled": true,
"value": "大鱼调色,Final Cut Pro,Motion,FxPlug4,调色插件,仿制图章,安装完整性校验"
}
},
"frontendChecks": [
{
"url": "https://dayu.media/15792/",
"http": 200,
"titleAndSEOExact": true,
"updateAndRecoveryNotes": true,
"codeBlock": true,
"historicalImagesRetained": true,
"coverRetained": true,
"priceYuan": 50,
"memberPriceYuan": 0,
"paidPackageURLAbsentFromHTML": true
},
{
"url": "https://dayu.media/15792/?release-check=1.13.2-86",
"http": 200,
"titleAndSEOExact": true,
"updateAndRecoveryNotes": true,
"codeBlock": true,
"historicalImagesRetained": true,
"coverRetained": true,
"priceYuan": 50,
"memberPriceYuan": 0,
"paidPackageURLAbsentFromHTML": true
}
],
"featuredMedia": {
"id": 15854,
"url": "https://dayu.media/wp-content/uploads/2026/11/1793865756-f106faae77b9559.png",
"source": "template/large.png",
"http": 200,
"bytes": 261628,
"sha256": "ab12611e8801cff86332ccc505a4cffa0c1120541c2efb9bb9908be2c9fe631a"
},
"historicalBodyImageIDs": [
15856,
15840,
15841
],
"package": {
"version": "1.13.2",
"build": 86,
"downloadVerified": true,
"http": 200,
"bytes": 45359239,
"sha256": "6c18bc081cd9d5099ae821df5d5da43585f9db292345c18db4a4e12cce1f133f",
"appPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"effect": "效果 / 大鱼调色 / 大鱼调色"
},
"updateChannel": {
"version": "1.12.0",
"build": 79
},
"rawPrivateResponses": "Local build cache only",
"purchaseFlow": "Anonymous purchase prompt checked; no transaction performed."
}
+10 -11
查看文件
@@ -1,13 +1,12 @@
{
"status": "resolved-published-and-download-verified",
"releaseID": 389,
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.12.0-unified-workspace-20261105",
"tag": "v1.12.0-unified-workspace-20261105",
"commit": "b72e6b31724def5c174b692ef0a46b76992e780b",
"assetID": 33,
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.12.0-unified-workspace-20261105/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.12.0.pkg",
"bytes": 45329742,
"sha256": "d4b557fec283f5e06f605bc6b1d99a0c8649f9d65e405eba452f525e8454cdfe",
"resolvedBy": "verification/Release.json",
"draftBrowserCopyRemovedAfterVerification": true
"status": "published-after-verified-draft-download",
"releaseID": 392,
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.13.1-pixel-clone-20261105",
"tag": "v1.13.1-pixel-clone-20261105",
"commit": "46153a26edfbf44c5f22fbad5953ec74c0d33883",
"assetID": 36,
"downloadURL": "https://dayu.media/git/attachments/ee0a09fc-58b0-4883-9923-d5eb8aced007",
"bytes": 45352349,
"sha256": "8a19afadda6317d186541f37a221c46261a22ddabcdddec90d02e1315b693965",
"finalDownloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.13.1-pixel-clone-20261105/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.13.1.pkg"
}
@@ -0,0 +1,17 @@
{
"status": "verified",
"repository": "https://dayu.media/git/dayu/dayu-color.git",
"compiledSource": "1659f3d3853e2574f06a45687141fb444b5d02ca",
"trackedFiles": 613,
"fsck": "full strict",
"content": "All tracked files matched by SHA-256",
"lfs": false,
"submodules": false,
"independentBuild": false,
"versionTag": {
"tag": "v1.13.1-pixel-clone-20261105",
"commit": "46153a26edfbf44c5f22fbad5953ec74c0d33883",
"trackedFiles": 616,
"content": "All tracked files and verified PKG record match."
}
}
+7 -1
查看文件
@@ -7,5 +7,11 @@
"content": "all tracked files match the compiled commit by SHA-256",
"lfs": false,
"submodules": false,
"independentBuild": false
"independentBuild": false,
"versionTag": {
"tag": "v1.13.0-clone-stamp-20261105",
"commit": "07601e50bf604e7721bccf8be10e403a2bd030d1",
"trackedFiles": 613,
"content": "All tracked files and verified PKG record match."
}
}
+6 -6
查看文件
@@ -2,15 +2,15 @@
"status": "verified",
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"bundleID": "com.dayu.color",
"version": "1.13.0",
"build": "83",
"version": "1.14.0",
"build": "90",
"team": "B3W25FX5H5",
"notaryID": "a9134875-aea9-4150-9e61-3051d23cd809",
"notaryID": "1e7a48fe-dd0a-4643-b587-66eaa05ed46a",
"notaryStatus": "Accepted",
"gatekeeper": "/Library/Plug-Ins/FxPlug/大鱼调色.app: accepted\nsource=Notarized Developer ID",
"sourceCommit": "9977b5c41b07e0b08e6408c492498ba6e396c981",
"sourceCommit": "810bbf4dfb0a05bc2fa66da546ca75b9610985a3",
"templatePath": "/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef",
"templateSHA256": "eaf60224f8d970f8841a03fe0325adc4af73d1c017375b020bcc0e256f0cd803",
"shaderSHA256": "d6734ff8fbc66ec0de2928fff59308c2e28e74ceb6f9664e61aaae30c046889b",
"hostVerification": "verification/HostCloneStamp1.13.0.json"
"shaderSHA256": "dd5593f8d4e5af7d5513ab5fecdb6f412805672bc052f5447890b9c35de16cb5",
"hostVerification": "verification/HostCloneTracking1.14.0.json"
}
+61
查看文件
@@ -0,0 +1,61 @@
{
"status": "passed",
"version": "1.13.1",
"build": "85",
"compiledSource": "1659f3d3853e2574f06a45687141fb444b5d02ca",
"formalPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"host": "Final Cut Pro 12.4",
"hostPID": 29418,
"servicePID": 29424,
"qaProject": "1.12.0_76_OpenCV真实帧跟踪 2, independent QA copy",
"nativeChecks": 864,
"nativeCloneChecks": [
{
"keys": 2,
"name": "native-osc-drag-moves-only-the-stamp-source-and-keeps-tracking-keys",
"part": 7,
"pass": true,
"source": [
0.35,
0.35,
0.20000000298023224,
0.20000000298023224
],
"undoGroups": 1
},
{
"name": "native-osc-escape-cancels-the-stamp-source-drag-without-another-undo",
"pass": true
},
{
"name": "native-osc-stamp-resizes-coverage-without-rotation-handle-or-track-changes",
"pass": true
},
{
"name": "clone-stamp-ignores-legacy-tracking-scale-and-rotation",
"pass": true
},
{
"error": "未提供错误信息",
"name": "clone-stamp-resized-production-render",
"pass": true
},
{
"name": "clone-stamp-resize-extends-coverage-with-pixel-exact-translation",
"pass": true
}
],
"live": {
"inspectorVersion": "1.13.1",
"loadedAndRenderedBuild83Preset": true,
"trackingKeys": 99,
"roundTripIdentical": true,
"axes": "Source marker, center and four extent handles visible. No rotation handle or parameter row.",
"sourceDrag": "Live synthesized drag did not produce an OSC write. Source drag and undo verified by installed production callback tests.",
"helpText": "Workspace picture-edit button retains generic mask help text that mentions rotation."
},
"cleanup": {
"build83TemporaryBackupRemoved": true,
"historicPackagesRetained": true
}
}
@@ -0,0 +1,58 @@
{
"status": "passed",
"version": "1.13.4",
"build": "88",
"compiledSource": "7bf1f88fe9c2e9ea79a86791fcc0738550512973",
"formalPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"host": "Final Cut Pro 12.4",
"hostPID": 43656,
"servicePID": 43675,
"nativeChecks": 870,
"sourceRecovery": {
"trackedFiles": 623,
"exactRemoteTree": true,
"strictFsck": true
},
"priorObserved": {
"build86": "User drag preview disappeared. Live OSC logs received the source and drag.",
"build87": "Real-footage creation accepted. The target and copied pixels remained visible; subsequent canvas edits did not commit with differing event and action times.",
"build87PublicPackage": false
},
"live": {
"qaMaterial": "Same real footage in the existing local QA project",
"coldReadback": "Recovered the previously created stamp after restarting Final Cut Pro.",
"savedTargetCenterBefore": [
0.7994009256362915,
0.601437509059906
],
"dragCommitTimes": [
{
"eventSeconds": "9.240000000",
"actionSeconds": "9.272333333"
},
{
"eventSeconds": "9.240000000",
"actionSeconds": "9.272333333"
},
{
"eventSeconds": "9.240000000",
"actionSeconds": "9.272333333"
}
],
"successfulHostCommits": 3,
"observation": "Target outline and effect stayed at a changed position after real mouse release. Source and destination were both visible.",
"scope": "Production installed version with direct mouse operations on the same real footage. No separate Motion host run.",
"userConfirmed": "The target can now be moved freely. User requested independent source and target tracking with scale detection."
},
"regression": [
"native-osc-stamp-preview-survives-async-save-and-different-render-time",
"native-osc-stamp-selects-saved-overlay-when-action-time-differs",
"native-osc-drag-moves-only-the-stamp-source-and-keeps-tracking-keys",
"native-osc-stamp-resizes-coverage-without-rotation-handle-or-track-changes",
"native-osc-stamp-target-move-saves-the-canvas-key-with-a-different-action-time",
"native-osc-stamp-forward-action-starts-the-existing-host-tracker",
"native-osc-stamp-rejected-write-keeps-the-draft-and-existing-document",
"native-osc-stamp-retries-with-the-same-source-and-saves-once",
"native-osc-untracked-stamp-target-saves-in-place-with-a-different-action-time"
]
}
+143
查看文件
@@ -0,0 +1,143 @@
{
"status": "passed",
"version": "1.14.0",
"build": "90",
"compiledSource": "810bbf4dfb0a05bc2fa66da546ca75b9610985a3",
"formalPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"host": "Final Cut Pro 12.4",
"hostPID": 46124,
"servicePID": 46136,
"nativeChecks": 881,
"sourceRecovery": {
"trackedFiles": 624,
"exactRemoteTree": true,
"strictFsck": true
},
"live": {
"project": "Existing local QA copy, same real footage",
"analysisSourceSize": [
3840,
2160
],
"referenceTime": 4.626,
"interim": {
"build": "89",
"forwardPairedAfterColdReopen": 142,
"bidirectionalPaired": 257,
"legacyAutomaticTailTime": 10.272333333333334,
"offsetAfterLastPairedFrame": 0.006333333333333333
},
"bidirectionalStatus": "双向跟踪完成 · 257 个轨迹键",
"pairedKeys": 257,
"legacyKeys": 0,
"consecutiveFrameStep": "1/25",
"first": {
"time": 0.026,
"targetCenter": [
0.6588301062583923,
0.2833344340324402
],
"sourceCenter": [
0.6876533504527494,
0.5160227972213454
],
"sourceScale": [
0.5156978964805603,
0.6987575888633728
],
"targetScale": [
0.819161593914032,
0.8457567691802979
]
},
"reference": {
"time": 4.626,
"targetCenter": [
0.6999750733375549,
0.32428178191185
],
"sourceCenter": [
0.7436891075175688,
0.6246055322829909
],
"sourceScale": [
1.0,
1.0
],
"targetScale": [
1.0,
1.0
]
},
"last": {
"time": 10.266,
"targetCenter": [
0.7663808465003967,
0.341084748506546
],
"sourceCenter": [
0.8345088835757658,
0.7266275840942091
],
"sourceScale": [
1.3865485191345215,
1.6888312101364136
],
"targetScale": [
1.1685776710510254,
1.2025887966156006
]
}
},
"native": [
{
"error": "未提供错误信息",
"keys": 6,
"name": "host-clone-stamp-follows-two-independent-centers-and-scales",
"pass": true,
"source": [
0.2265399992465973,
0.5261463522911072,
0.32,
0.54
],
"sourceScale": [
0.8747966289520264,
0.8752831220626831
],
"target": [
0.7812566161155701,
0.48039546608924866
],
"targetScale": [
1.1745620965957642,
1.1744060516357422
]
},
{
"name": "host-clone-stamp-restarts-from-current-paired-scale",
"pass": true
},
{
"name": "host-clone-stamp-source-loss-stops-both-tracks-at-last-paired-frame",
"pass": true
},
{
"name": "clone-stamp-relative-scale-remaps-source-and-expands-target-coverage",
"pass": true
},
{
"name": "clone-stamp-fractional-zoom-interpolates-adjacent-source-pixels",
"pass": true
},
{
"name": "clone-stamp-equal-zoom-preserves-pixel-exact-copy",
"pass": true
},
{
"name": "clone-stamp-replaces-same-frame-automatic-keys-from-offset-host-clock",
"pass": true
}
],
"scope": "Real FCP bidirectional analysis and saved preset readback, plus installed native callback and Metal pixel checks. Cold reopen persistence checked on build 89; build 90 reran the same authored stamp and verified the corrected boundary. No separate Motion host run."
}
+16
查看文件
@@ -0,0 +1,16 @@
{
"status": "passed",
"version": "1.13.2",
"build": "86",
"compiledSource": "db6b2b05b3ee2ad40a6aeab70017a2b121caa67d",
"formalPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"host": "Final Cut Pro 12.4",
"hostPID": 36280,
"servicePID": 36306,
"nativeChecks": 864,
"qaProject": "1.12.0_76_OpenCV真实帧跟踪 2, independent QA copy",
"inspectorVersion": "1.13.2",
"effectOutputHistogramSamples": 57600,
"registrationIntegrity": "verified",
"scope": "Cold Final Cut Pro launch, existing QA project, inspector and live effect output."
}
+135 -11
查看文件
@@ -1,6 +1,6 @@
{
"bundlePath": "/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit",
"checks": 858,
"checks": 881,
"gpu": "Apple M4",
"limitations": [
"Finite states and a 64x48 frame; live FCP discovery, inspector interaction, timeline persistence and real host export require separate acceptance.",
@@ -12,7 +12,7 @@
"error": "未提供错误信息",
"name": "runtime-directory",
"pass": true,
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/43342CDC-DEEF-4487-9FEF-F4A233D94A2F"
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/00ED28FF-B8AE-46A7-A2A7-AAFAB95E88CB"
},
{
"descriptors": 285,
@@ -898,7 +898,7 @@
"error": "未提供错误信息",
"name": "renderer-export-33cube",
"pass": true,
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/43342CDC-DEEF-4487-9FEF-F4A233D94A2F/diagnostic-export.cube"
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/00ED28FF-B8AE-46A7-A2A7-AAFAB95E88CB/diagnostic-export.cube"
},
{
"bytes": 1186074,
@@ -917,8 +917,8 @@
"pass": true
},
{
"heartbeats": 0,
"maximumGapMS": 66.2716249935329,
"heartbeats": 1,
"maximumGapMS": 60.37237495183945,
"name": "external-activation-main-loop-responsive",
"pass": true
},
@@ -1389,7 +1389,7 @@
"closePixels": 128,
"name": "workspace-offscreen-compact-icons-and-close-render-pixels",
"pass": true,
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/43342CDC-DEEF-4487-9FEF-F4A233D94A2F/workspace-topbar.png",
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/00ED28FF-B8AE-46A7-A2A7-AAFAB95E88CB/workspace-topbar.png",
"toolbarPixels": 3557
},
{
@@ -1452,7 +1452,7 @@
},
{
"name": "workspace-independent-style-fixture-inserted",
"node": "114C53DA-9F1B-4067-A3C0-C7A8C6B7F724",
"node": "46CEE99C-5E6D-416C-9C41-67430E63593A",
"pass": true,
"validDocument": true
},
@@ -1461,10 +1461,10 @@
"error": "none",
"name": "workspace-independent-style1-writes-target-node-inside-undo",
"nodePaths": {
"look0": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/43342CDC-DEEF-4487-9FEF-F4A233D94A2F/node.cube"
"look0": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/00ED28FF-B8AE-46A7-A2A7-AAFAB95E88CB/node.cube"
},
"pass": true,
"rootStyle1": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/43342CDC-DEEF-4487-9FEF-F4A233D94A2F/user-new.cube",
"rootStyle1": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/00ED28FF-B8AE-46A7-A2A7-AAFAB95E88CB/user-new.cube",
"undoStartsAfter": 3,
"undoStartsBefore": 2,
"written": true
@@ -2742,6 +2742,38 @@
"name": "shared-mask-inspector-alias-activates-canvas-and-receives-canonical-status",
"pass": true
},
{
"error": "未提供错误信息",
"keys": 6,
"name": "host-clone-stamp-follows-two-independent-centers-and-scales",
"pass": true,
"source": [
0.2265399992465973,
0.5261463522911072,
0.32,
0.54
],
"sourceScale": [
0.8747966289520264,
0.8752831220626831
],
"target": [
0.7812566161155701,
0.48039546608924866
],
"targetScale": [
1.1745620965957642,
1.1744060516357422
]
},
{
"name": "host-clone-stamp-restarts-from-current-paired-scale",
"pass": true
},
{
"name": "host-clone-stamp-source-loss-stops-both-tracks-at-last-paired-frame",
"pass": true
},
{
"name": "canvas-cold-load-selects-saved-mask-from-immutable-snapshot",
"pass": true
@@ -2830,14 +2862,59 @@
"opaquePixels": 11311,
"pass": true
},
{
"name": "native-osc-stamp-preview-survives-async-save-and-different-render-time",
"pass": true
},
{
"name": "native-osc-creates-one-stamp-and-one-undo-from-source-click-and-drag",
"pass": true
},
{
"name": "native-osc-stamp-selects-saved-overlay-when-action-time-differs",
"pass": true
},
{
"keys": 2,
"name": "native-osc-drag-moves-only-the-stamp-source-and-keeps-tracking-keys",
"part": 7,
"pass": true,
"source": [
0.35,
0.35,
0.20000000298023224,
0.20000000298023224
],
"undoGroups": 1
},
{
"name": "native-osc-escape-cancels-the-stamp-source-drag-without-another-undo",
"pass": true
},
{
"name": "native-osc-stamp-resizes-coverage-without-rotation-handle-or-track-changes",
"pass": true
},
{
"name": "native-osc-stamp-target-move-saves-the-canvas-key-with-a-different-action-time",
"pass": true
},
{
"name": "native-osc-stamp-forward-action-starts-the-existing-host-tracker",
"pass": true
},
{
"name": "native-osc-stamp-rejected-write-keeps-the-draft-and-existing-document",
"pass": true
},
{
"name": "native-osc-stamp-retries-with-the-same-source-and-saves-once",
"pass": true
},
{
"name": "native-osc-untracked-stamp-target-saves-in-place-with-a-different-action-time",
"pass": true
},
{
"name": "inspector-add-pen-enters-empty-drawing-mode",
"pass": true
@@ -4164,7 +4241,7 @@
{
"name": "viewer-real-osc-draws-minimal-curve-on-clear-canvas",
"pass": true,
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/43342CDC-DEEF-4487-9FEF-F4A233D94A2F/viewer-workspace.png"
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/00ED28FF-B8AE-46A7-A2A7-AAFAB95E88CB/viewer-workspace.png"
},
{
"name": "canvas-hsl-plot-captures-outside-and-commits-one-undo",
@@ -4327,6 +4404,53 @@
"name": "clone-stamp-tracked-target-moves-while-sampling-the-same-source",
"pass": true
},
{
"name": "clone-stamp-ignores-legacy-tracking-scale-and-rotation",
"pass": true
},
{
"error": "未提供错误信息",
"name": "clone-stamp-resized-production-render",
"pass": true
},
{
"name": "clone-stamp-resize-extends-coverage-with-pixel-exact-translation",
"pass": true
},
{
"name": "clone-stamp-interpolates-both-centers-and-coverage-scale",
"pass": true
},
{
"error": "未提供错误信息",
"name": "clone-stamp-paired-scale-production-render",
"pass": true
},
{
"name": "clone-stamp-relative-scale-remaps-source-and-expands-target-coverage",
"pass": true
},
{
"name": "clone-stamp-fractional-zoom-interpolates-adjacent-source-pixels",
"pass": true
},
{
"error": "未提供错误信息",
"name": "clone-stamp-equal-scale-production-render",
"pass": true
},
{
"name": "clone-stamp-equal-zoom-preserves-pixel-exact-copy",
"pass": true
},
{
"name": "clone-stamp-retracking-updates-paired-data-without-overwriting-manual-target",
"pass": true
},
{
"name": "clone-stamp-replaces-same-frame-automatic-keys-from-offset-host-clock",
"pass": true
},
{
"error": "未提供错误信息",
"name": "clone-stamp-disabled-render",
@@ -4341,6 +4465,6 @@
"pass": true
}
],
"runtimePath": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/43342CDC-DEEF-4487-9FEF-F4A233D94A2F",
"runtimePath": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/00ED28FF-B8AE-46A7-A2A7-AAFAB95E88CB",
"scope": "Native model and renderer integration with real Metal/IOSurface textures and fake FxPlug host selectors; no GUI or live host document."
}
+35
查看文件
@@ -0,0 +1,35 @@
{
"version": "1.13.2",
"build": "86",
"compiledSource": "db6b2b05b3ee2ad40a6aeab70017a2b121caa67d",
"staticVerification": {
"installedOfficialBundle": "passed",
"unchangedRedistributedBundle": "passed",
"adHocWrapper": "rejected, OSStatus -67050",
"unsignedService": "rejected, OSStatus -67062",
"adHocService": "rejected, OSStatus -67021",
"modifiedMetalResource": "rejected, OSStatus -67054"
},
"serviceStartup": {
"officialFinalCut": "passed, see HostIntegrity1.13.2.json",
"adHocWrapperWithOriginalService": "explicit refusal, exit 78",
"detachedOriginalService": "explicit refusal, exit 78",
"modifiedMetalResource": "one direct launch stopped before producing application output with signal 9; the static verifier independently refused the file",
"adHocService": "static refusal confirmed; direct launch did not return a diagnostic within the test window"
},
"registration": {
"officialApp": "registered from the formal path; only one com.dayu.color.XPC result",
"rejectionTests": "Ran the production removal method with isolated mocked PlugInKit responses. It removes and rechecks the exact path, preserves a different path, reports unsuccessful read-back, and skips symbolic links."
},
"update": {
"officialApp": "production HTTPS check completed and reported current version up to date",
"untrustedNativeProcess": "entered integrity_rejected and created no URLSession task; download, install, cancel and another check did not re-enable it",
"updaterContract": "66 checks passed with the signed, notarized 1.12.0 update package, including corrupt checksum refusal",
"serverPolicy": "Existing automatic update endpoint and distribution policy preserved. Integrity enforcement runs locally."
},
"recovery": {
"independentCheckout": "618 files, clean checkout, exact Git tree, strict fsck passed",
"independentReleaseTagCheckout": "621 files, clean checkout, exact Git tree, strict fsck and installer record passed",
"scope": "Verified independently retrieved build inputs. No second full build."
}
}
+16 -16
查看文件
@@ -1,7 +1,7 @@
{
"package": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.13.0.pkg",
"sha256": "7999233dd4a3b797a879cc0f37a20f0c35f925c5f6823720b40e684464a452e8",
"bytes": 45350463,
"package": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.14.0.pkg",
"sha256": "884342ab5ef0c42d873a6411b6c2bf0ae3cec2e07dedda90b308b057ff59f5e8",
"bytes": 45370597,
"testUnsigned": false,
"installationExecuted": false,
"checks": [
@@ -31,27 +31,27 @@
"source": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"payload": "Library/Plug-Ins/FxPlug/大鱼调色.app",
"bundleID": "com.dayu.color",
"version": "1.13.0",
"build": "83"
"version": "1.14.0",
"build": "90"
},
{
"source": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/pkg-inputs/大鱼调色",
"payload": "Library/Application Support/PKGForge/Payload/com.dayu.color.installer.3096d1a9-4762-4f62-a5ea-d6b46ca46b00/750034C8-E764-4D93-BB06-C37F6DF017D8/大鱼调色"
"payload": "Library/Application Support/PKGForge/Payload/com.dayu.color.installer.a1e7f89f-048f-4282-b523-bc6cd921e9de/ACE57BBF-79C5-410F-AAB7-D7D93A5BE218/大鱼调色"
}
],
"signature": "Package \"大鱼调色-1.13.0.pkg\":\n Status: signed by a developer certificate issued by Apple for distribution\n Notarization: trusted by the Apple notary service\n Signed with a trusted timestamp on: 2026-11-05 14:03:12 +0000\n Certificate Chain:\n 1. Developer ID Installer: zhong luo (B3W25FX5H5)\n Expires: 2027-02-01 22:12:15 +0000\n SHA256 Fingerprint:\n C0 19 01 3C 67 88 8F 34 65 56 C5 91 3C E5 B6 12 4C 5D A6 DA F9 D8 \n DA 00 37 52 DF F0 F3 E6 00 B4\n ------------------------------------------------------------------------\n 2. Developer ID Certification Authority\n Expires: 2027-02-01 22:12:15 +0000\n SHA256 Fingerprint:\n 7A FC 9D 01 A6 2F 03 A2 DE 96 37 93 6D 4A FE 68 09 0D 2D E1 8D 03 \n F2 9C 88 CF B0 B1 BA 63 58 7F\n ------------------------------------------------------------------------\n 3. Apple Root CA\n Expires: 2035-02-09 21:40:36 +0000\n SHA256 Fingerprint:\n B0 B1 73 0E CB C7 FF 45 05 14 2C 49 F1 29 5E 6E DA 6B CA ED 7E 2C \n 68 C5 BE 91 B5 A1 10 01 F0 24",
"gatekeeper": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.13.0.pkg: accepted\nsource=Notarized Developer ID",
"signature": "Package \"大鱼调色-1.14.0.pkg\":\n Status: signed by a developer certificate issued by Apple for distribution\n Notarization: trusted by the Apple notary service\n Signed with a trusted timestamp on: 2026-11-05 16:41:55 +0000\n Certificate Chain:\n 1. Developer ID Installer: zhong luo (B3W25FX5H5)\n Expires: 2027-02-01 22:12:15 +0000\n SHA256 Fingerprint:\n C0 19 01 3C 67 88 8F 34 65 56 C5 91 3C E5 B6 12 4C 5D A6 DA F9 D8 \n DA 00 37 52 DF F0 F3 E6 00 B4\n ------------------------------------------------------------------------\n 2. Developer ID Certification Authority\n Expires: 2027-02-01 22:12:15 +0000\n SHA256 Fingerprint:\n 7A FC 9D 01 A6 2F 03 A2 DE 96 37 93 6D 4A FE 68 09 0D 2D E1 8D 03 \n F2 9C 88 CF B0 B1 BA 63 58 7F\n ------------------------------------------------------------------------\n 3. Apple Root CA\n Expires: 2035-02-09 21:40:36 +0000\n SHA256 Fingerprint:\n B0 B1 73 0E CB C7 FF 45 05 14 2C 49 F1 29 5E 6E DA 6B CA ED 7E 2C \n 68 C5 BE 91 B5 A1 10 01 F0 24",
"gatekeeper": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.14.0.pkg: accepted\nsource=Notarized Developer ID",
"pass": true,
"scope": "Expanded package structural and payload verification only; no installer scripts executed and no host quit or registration performed.",
"notarization": {
"createdDate": "2026-11-05T14:03:14.012Z",
"id": "13d6f418-4d36-4ef8-a92d-591610cb7682",
"name": "大鱼调色-1.13.0.pkg",
"status": "Accepted",
"message": "Successfully received submission info"
"createdDate": "2026-11-05T16:41:57.526Z",
"message": "Successfully received submission info",
"name": "大鱼调色-1.14.0.pkg",
"id": "bea7b45f-7d68-4b6d-9173-93ee5ad8b162",
"status": "Accepted"
},
"appCompiledSource": "9977b5c41b07e0b08e6408c492498ba6e396c981",
"appBuild": "83",
"appCompiledSource": "810bbf4dfb0a05bc2fa66da546ca75b9610985a3",
"appBuild": "90",
"packageBuilderRemote": "https://dayu.media/git/dayu/pkg-forge.git",
"packageBuilderCommit": "eb53707c0e67d8ddeab8c1270bb079f1050cfafe",
"templateSHA256": {
@@ -59,6 +59,6 @@
"large.png": "ab12611e8801cff86332ccc505a4cffa0c1120541c2efb9bb9908be2c9fe631a",
"small.png": "41fec3138aee904fc39d6982e6fde809243ffec55298dbfe966f4f48d89caf8a"
},
"installedAppHostAcceptance": "verification/HostCloneStamp1.13.0.json",
"installedAppHostAcceptance": "verification/HostCloneTracking1.14.0.json",
"installScope": "本轮仅生成并验包,未再次执行系统安装;正式 APP 已有独立宿主验收。"
}
+19 -12
查看文件
@@ -1,19 +1,26 @@
{
"passResult": true,
"repository": "dayu/dayu-color",
"repositoryID": 52,
"private": false,
"tag": "v1.12.1-canvas-inspector-20261105",
"releaseCommit": "9f0adbeb3b1b902b66ac4be7169b919f82675f21",
"releaseID": 390,
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.12.1-canvas-inspector-20261105",
"tag": "v1.13.2-integrity-20261105",
"releaseCommit": "5252296b7b628c8df7e68dfb48df0db38cd12a75",
"releaseID": 393,
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.13.2-integrity-20261105",
"prerelease": true,
"assetID": 34,
"assetName": "大鱼调色-1.12.1.pkg",
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.12.1-canvas-inspector-20261105/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.12.1.pkg",
"bytes": 45337206,
"sha256": "ae65ac0dcaf7cead701b8ac543ee60ae62e55fd9e19646877d5ef9d9d7351b6f",
"draftVerification": "Full authenticated browser download, byte count and SHA-256",
"passResult": true,
"assetID": 37,
"assetName": "大鱼调色-1.13.2.pkg",
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.13.2-integrity-20261105/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.13.2.pkg",
"bytes": 45359239,
"sha256": "6c18bc081cd9d5099ae821df5d5da43585f9db292345c18db4a4e12cce1f133f",
"existingAssetReused": true,
"verification": "Full draft download checked before publication; published attachment downloaded and checked again; release, tag and asset read-back verified.",
"credentialSource": "macOS Keychain: dayu-git-api",
"verification": "Published attachment downloaded again and verified by size and SHA-256."
"draftBrowserDownload": {
"path": "/Volumes/备份/大鱼调色-1.13.2.pkg",
"sha256": "6c18bc081cd9d5099ae821df5d5da43585f9db292345c18db4a4e12cce1f133f",
"bytes": 45359239,
"sourceURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.13.2-integrity-20261105/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.13.2.pkg",
"localCopyRemoved": true
}
}
+6
查看文件
@@ -7,6 +7,8 @@
objects = {
/* Begin PBXBuildFile section */
34A97A301E774BF3A13BC6A1 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34A97A301E774BF3A13BC6A3 /* Security.framework */; };
34A97A301E774BF3A13BC6A2 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34A97A301E774BF3A13BC6A3 /* Security.framework */; };
04962E563095058F009952AA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04962E553095058F009952AA /* Cocoa.framework */; };
04962E5E3095058F009952AA /* 大鱼调色 XPC Service.pluginkit in Embed PlugIns */ = {isa = PBXBuildFile; fileRef = 04962E5D3095058F009952AA /* 大鱼调色 XPC Service.pluginkit */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
04962E623095058F009952AA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04962E613095058F009952AA /* Foundation.framework */; };
@@ -39,6 +41,7 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
34A97A301E774BF3A13BC6A3 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
04962E523095058F009952AA /* 大鱼调色.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "大鱼调色.app"; sourceTree = BUILT_PRODUCTS_DIR; };
04962E553095058F009952AA /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
04962E5D3095058F009952AA /* 大鱼调色 XPC Service.pluginkit */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "大鱼调色 XPC Service.pluginkit"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -153,6 +156,7 @@
isa = PBXFrameworksBuildPhase;
files = (
04962E563095058F009952AA /* Cocoa.framework in Frameworks */,
34A97A301E774BF3A13BC6A1 /* Security.framework in Frameworks */,
);
};
04962E583095058F009952AA /* Frameworks */ = {
@@ -163,6 +167,7 @@
04962E623095058F009952AA /* Foundation.framework in Frameworks */,
04962E643095058F009952AA /* AppKit.framework in Frameworks */,
04962E6A3095058F009952AA /* FxPlug.framework in Frameworks */,
34A97A301E774BF3A13BC6A2 /* Security.framework in Frameworks */,
);
};
/* End PBXFrameworksBuildPhase section */
@@ -195,6 +200,7 @@
04962E653095058F009952AA /* Accelerate.framework */,
04962E673095058F009952AA /* PluginManager.framework */,
04962E693095058F009952AA /* FxPlug.framework */,
34A97A301E774BF3A13BC6A3 /* Security.framework */,
);
name = Frameworks;
sourceTree = "<group>";
@@ -80,7 +80,7 @@ if(faceFixture.length){
p.centerX=48.5f/w;p.centerY=24.5f/h;p.width=.25f;p.height=.25f;
stamp[@"parameters"]=[NSData dataWithBytes:&p length:sizeof(p)];
stamp[@"stampSource"]=@[@(16.5f/w),@(12.5f/h),@.25,@.25];
CMTime next=CMTimeMake(1,25);DYMaskParameters moved=p;moved.centerY=34.5f/h;
CMTime next=CMTimeMake(1,25);DYMaskParameters moved=p;moved.centerY=34.5f/h;moved.width=.5f;moved.height=.12f;moved.angle=.65f;
run.record(@"clone-stamp-preserves-source-through-tracking-merge",DYMergeTracking(stamp,@[DYMaskKey(kCMTimeZero,p,NO,1),DYMaskKey(next,moved,NO,1)])&&[stamp[@"stampSource"] count]==4);
auto frame=[&](CMTime t,NSString *label){
NSError *failure=nil;
@@ -94,6 +94,53 @@ if(faceFixture.length){
run.record(@"clone-stamp-copies-pixels-and-leaves-exterior-intact",pixel(first,48,24,baseline,16,12)<.002&&pixel(first,0,0,baseline,0,0)==0&&pixel(first,16,12,baseline,16,12)==0);
Pixels second=frame(next,@"clone-stamp-tracked-production-render");
run.record(@"clone-stamp-tracked-target-moves-while-sampling-the-same-source",pixel(second,48,34,baseline,16,12)<.002&&pixel(second,48,24,baseline,48,24)==0);
DYMaskParameters translated=DYMaskAtTime(stamp,next);
run.record(@"clone-stamp-ignores-legacy-tracking-scale-and-rotation",translated.angle==0&&translated.width==p.width&&translated.height==p.height&&translated.centerY==moved.centerY&&pixel(second,51,35,baseline,19,13)==0);
p.width=.5f;p.height=.35f;p.angle=.55f; // A legacy authored rotation must not rotate copied pixels.
stamp[@"parameters"]=[NSData dataWithBytes:&p length:sizeof(p)];
Pixels expanded=frame(kCMTimeZero,@"clone-stamp-resized-production-render");
run.record(@"clone-stamp-resize-extends-coverage-with-pixel-exact-translation",pixel(expanded,51,25,baseline,19,13)==0&&pixel(expanded,58,24,baseline,26,12)==0&&pixel(first,58,24,baseline,58,24)==0);
p.width=.25f;p.height=.25f;
stamp[@"parameters"]=[NSData dataWithBytes:&p length:sizeof(p)];
DYStampMotion startMotion;startMotion.active=true;
DYStampMotion endMotion=startMotion;
endMotion.sourceOffsetX=4.f/w;endMotion.sourceOffsetY=2.f/h;
endMotion.targetScaleX=2.f;endMotion.targetScaleY=2.f;
stamp[@"keys"]=@[DYStampKey(kCMTimeZero,p,NO,1,startMotion),DYStampKey(next,moved,NO,1,endMotion)];
CMTime half=CMTimeMake(1,50);
DYMaskParameters halfway=DYMaskAtTime(stamp,half);
NSArray *halfSource=DYStampSourceAtTime(stamp,half);
run.record(@"clone-stamp-interpolates-both-centers-and-coverage-scale",
fabs(halfway.centerY-29.5f/h)<1e-6&&fabs(halfway.width-.375)<1e-6&&
fabs([halfSource[0] doubleValue]-18.5f/w)<1e-6&&fabs([halfSource[1] doubleValue]-13.5f/h)<1e-6);
Pixels zoomed=frame(next,@"clone-stamp-paired-scale-production-render");
run.record(@"clone-stamp-relative-scale-remaps-source-and-expands-target-coverage",
pixel(zoomed,48,34,baseline,20,14)<.001&&pixel(zoomed,52,38,baseline,22,16)<.001&&
pixel(zoomed,60,34,baseline,26,14)<.001&&pixel(zoomed,0,0,baseline,0,0)==0);
float halfPixel=(baseline[(14*w+22)*4]+baseline[(14*w+23)*4])*.5f;
run.record(@"clone-stamp-fractional-zoom-interpolates-adjacent-source-pixels",
fabs(zoomed[(34*w+53)*4]-halfPixel)<.001);
endMotion.sourceScaleX=2.f;endMotion.sourceScaleY=2.f;
stamp[@"keys"]=@[DYStampKey(next,moved,YES,1,endMotion)];
Pixels equalZoom=frame(next,@"clone-stamp-equal-scale-production-render");
run.record(@"clone-stamp-equal-zoom-preserves-pixel-exact-copy",pixel(equalZoom,52,38,baseline,24,18)==0);
DYMaskParameters differentTarget=moved;differentTarget.centerY=.45f;
endMotion.sourceScaleX=1.25f;
run.record(@"clone-stamp-retracking-updates-paired-data-without-overwriting-manual-target",
DYMergeTracking(stamp,@[DYStampKey(CMTimeMake(2,50),differentTarget,NO,.9,endMotion)])&&
[stamp[@"keys"] count]==1&&DYMaskAtTime(stamp,next).centerY==moved.centerY&&
DYStampMotionAtTime(stamp,next).sourceScaleX==1.25f);
CMTime frameDuration=CMTimeMake(1,25),nearStart=CMTimeMake(-1,150),nearEnd=CMTimeMake(7,150);
CMTime previous=CMTimeMake(-1,25),following=CMTimeMake(2,25),authored=CMTimeMake(1,150);
stamp[@"keys"]=@[DYMaskKey(previous,p,NO,1),DYMaskKey(nearStart,p,NO,1),
DYMaskKey(authored,p,YES,1),DYMaskKey(nearEnd,p,NO,1),DYMaskKey(following,p,NO,1)];
NSArray *pairKeys=@[DYStampKey(kCMTimeZero,p,NO,1,startMotion),DYStampKey(next,moved,NO,1,endMotion)];
BOOL merged=DYMergeTracking(stamp,pairKeys,frameDuration);
NSArray *mergedKeys=stamp[@"keys"];
run.record(@"clone-stamp-replaces-same-frame-automatic-keys-from-offset-host-clock",
merged&&mergedKeys.count==5&&[mergedKeys[0] isEqual:DYMaskKey(previous,p,NO,1)]&&
[mergedKeys[1] isEqual:pairKeys[0]]&&[mergedKeys[2] isEqual:DYMaskKey(authored,p,YES,1)]&&
[mergedKeys[3] isEqual:pairKeys[1]]&&[mergedKeys[4] isEqual:DYMaskKey(following,p,NO,1)]);
stamp[@"enabled"]=@NO;Pixels disabled=frame(next,@"clone-stamp-disabled-render");
run.record(@"clone-stamp-disabled-is-identical",difference(disabled,baseline).maximum==0);
stamp[@"enabled"]=@YES;NSError *failure=nil;
+25 -9
查看文件
@@ -347,7 +347,7 @@ kernel void dyLensRepair(texture2d<float> source [[texture(0)]],texture2d<float,
constexpr sampler f(coord::normalized,address::clamp_to_zero,filter::linear);output.write(source.sample(f,sample),p);
}
kernel void dyCloneStamps(texture2d<float,access::sample> input [[texture(0)]],
kernel void dyCloneStamps(texture2d<float,access::read> input [[texture(0)]],
texture2d<float,access::write> output [[texture(1)]],
constant DYCloneStamp *stamps [[buffer(0)]],
constant uint &count [[buffer(1)]],
@@ -358,21 +358,37 @@ kernel void dyCloneStamps(texture2d<float,access::sample> input [[texture(0)]],
float2 uv=(float2(gid)+.5f)/float2(size);
if(flip)uv.y=1-uv.y;
float4 color=input.read(gid);
constexpr sampler linearFilter(coord::normalized,address::clamp_to_edge,filter::linear);
for(uint i=0;i<count;i++){
constant DYCloneStamp &stamp=stamps[i];
float2 delta=uv-float2(stamp.centerX,stamp.centerY);
float2 local=float2(dot(delta,float2(stamp.localXX,stamp.localXY)),
dot(delta,float2(stamp.localYX,stamp.localYY)));
float2 center=float2(stamp.centerX,stamp.centerY);
float2 local=(uv-center)*float2(stamp.inverseRadiusX,stamp.inverseRadiusY);
float radiusSquared=dot(local,local);
if(radiusSquared>1)continue;
float2 source=float2(stamp.sourceX,stamp.sourceY)+local*float2(stamp.sourceWidth,stamp.sourceHeight)*.5f;
if(any(source<0)||any(source>1))continue;
if(flip)source.y=1-source.y;
float2 sampleCenter(stamp.sourceX,stamp.sourceY);
float2 sampleScale(stamp.samplingScaleX,stamp.samplingScaleY);
float4 sampled;
if(all(abs(sampleScale-1.f)<.0001f)){
// Preserve pixel values for stamps with translation alone.
float2 offset=(sampleCenter-center)*float2(size);
if(flip)offset.y=-offset.y;
int2 source=int2(gid)+int2(round(offset));
if(any(source<0)||any(source>=int2(size)))continue;
sampled=input.read(uint2(source));
}else{
float2 source=sampleCenter+(uv-center)*sampleScale;
if(flip)source.y=1-source.y;
if(any(source<0)||any(source>=1))continue;
float2 pixel=clamp(source*float2(size)-.5f,0.f,float2(size-1));
uint2 lo=uint2(floor(pixel)),hi=min(lo+1,size-1);
float2 blend=fract(pixel);
float4 top=mix(input.read(lo),input.read(uint2(hi.x,lo.y)),blend.x);
float4 bottom=mix(input.read(uint2(lo.x,hi.y)),input.read(hi),blend.x);
sampled=mix(top,bottom,blend.y);
}
float coverage=stamp.feather>0?1-smoothstep(1-stamp.feather,1.f,sqrt(radiusSquared)):1;
coverage=saturate((coverage-stamp.inputBlack)/(stamp.inputWhite-stamp.inputBlack));
if(stamp.inputGamma!=1)coverage=pow(coverage,1/stamp.inputGamma);
color=mix(color,input.sample(linearFilter,source),coverage*stamp.strength);
color=mix(color,sampled,coverage*stamp.strength);
}
output.write(color,gid);
}
+4 -4
查看文件
@@ -30,15 +30,15 @@
std::vector<DYCloneStamp> stamps;
FxRect image=source.imagePixelBounds,bounds=source.tilePixelBounds;
if(image.right<=image.left||image.top<=image.bottom)return source;
float aspect=float(image.right-image.left)/(image.top-image.bottom);
for(NSDictionary *mask in masks){
NSArray *patch=mask[@"stampSource"];
if(!patch||![mask[@"enabled"]boolValue])continue;
DYMaskParameters p=DYMaskAtTime(mask,kCMTimeInvalid);
if(p.strength<=0)continue;
float c=cosf(p.angle),s=sinf(p.angle);
stamps.push_back({p.centerX,p.centerY,[patch[0]floatValue],[patch[1]floatValue],[patch[2]floatValue],[patch[3]floatValue],
2*c/p.width,2*s/(p.width*aspect),-2*s*aspect/p.height,2*c/p.height,p.feather,p.strength,p.inputBlack,p.inputWhite,p.inputGamma});
NSArray *scale=mask[@"stampSamplingScale"];
stamps.push_back({p.centerX,p.centerY,[patch[0]floatValue],[patch[1]floatValue],
scale?[scale[0]floatValue]:1.f,scale?[scale[1]floatValue]:1.f,
2/p.width,2/p.height,p.feather,p.strength,p.inputBlack,p.inputWhite,p.inputGamma});
}
if(stamps.empty())return source;
if(image.left!=bounds.left||image.right!=bounds.right||image.top!=bounds.top||image.bottom!=bounds.bottom){
+20 -4
查看文件
@@ -60,13 +60,13 @@
BOOL stamp=m[@"stampSource"]!=nil;_combine.hidden=_invert.hidden=stamp;
_eye.state=[m[@"enabled"]boolValue]?NSControlStateValueOn:NSControlStateValueOff;_eye.image=[NSImage imageWithSystemSymbolName:[m[@"enabled"]boolValue]?@"eye":@"eye.slash" accessibilityDescription:@"启用蒙版"];[_combine selectItemAtIndex:[m[@"combine"]integerValue]];_invert.state=(p.flags&DYMaskInvert)?NSControlStateValueOn:NSControlStateValueOff;
float values[]={p.strength,p.feather,p.centerX,p.centerY,p.width,p.height,float(p.angle*180.f/M_PI),p.gradientWidth,p.hueCenterTurns*360.f,p.hueCoreHalfWidth*360.f,p.hueSoftWidth*360.f,p.saturationRange.low,p.saturationRange.high,p.lightnessRange.low,p.lightnessRange.high,p.inputBlack,p.inputWhite,p.inputGamma};
NSInteger visible=0;for(NSInteger i=0;i<_rows.count;i++){BOOL show=i==0||(i==1&&p.kind<3)||(i>=2&&i<=6&&p.kind<4)||(i==7&&p.kind==3)||(i>=8&&i<=14&&p.kind==4)||(i>=15&&p.kind>=4);NSDictionary *row=_rows[i];for(NSView *v in row.allValues)v.hidden=!show;if(!show)continue;visible++;double lo=0,hi=1;if(i==2||i==3)lo=-1,hi=2;if(i==4||i==5||i==7)lo=.001,hi=2;if(i==6)lo=-180,hi=180;if(i==8)hi=360;if(i==9||i==10)hi=180;if(i==15)hi=.99;if(i==16)lo=.01,hi=2;if(i==17)lo=.01,hi=4;NSSlider *slider=row[@"slider"];slider.minValue=lo;slider.maxValue=hi;slider.doubleValue=values[i];[row[@"field"]setStringValue:[NSString stringWithFormat:@"%.3f",values[i]]];}
NSInteger visible=0;for(NSInteger i=0;i<_rows.count;i++){BOOL show=i==0||(i==1&&p.kind<3)||(i>=2&&i<=6&&p.kind<4&&(!stamp||i!=6))||(i==7&&p.kind==3)||(i>=8&&i<=14&&p.kind==4)||(i>=15&&p.kind>=4);NSDictionary *row=_rows[i];for(NSView *v in row.allValues)v.hidden=!show;if(!show)continue;visible++;double lo=0,hi=1;if(i==2||i==3)lo=-1,hi=2;if(i==4||i==5||i==7)lo=.001,hi=2;if(i==6)lo=-180,hi=180;if(i==8)hi=360;if(i==9||i==10)hi=180;if(i==15)hi=.99;if(i==16)lo=.01,hi=2;if(i==17)lo=.01,hi=4;NSSlider *slider=row[@"slider"];slider.minValue=lo;slider.maxValue=hi;slider.doubleValue=values[i];[row[@"field"]setStringValue:[NSString stringWithFormat:@"%.3f",values[i]]];}
BOOL shape=p.kind<3;for(NSButton *b in _tracking)b.hidden=!shape;_trackingTitle.hidden=!shape;_clear.hidden=!shape;_clear.enabled=[m[@"keys"]count]>0;
BOOL pen=p.kind==DYMaskBezier;_penRedraw.hidden=!pen;_penFinish.hidden=!pen;_penCancel.hidden=!pen;
[self updateDrawingControls];
_status.stringValue=m[@"status"]?:([m[@"keys"]count]?[NSString stringWithFormat:@"%lu 个轨迹键 · 修改几何会在当前帧建立手工键",(unsigned long)[m[@"keys"]count]]:pen?@"重画钢笔后,点击起点或“完成绘制”闭合;取消或 Esc 保留原路径。":@"各蒙版只影响当前工具层");
if([_nodeID isEqual:@"shared"]){_list.accessibilityLabel=@"共享蒙版";_add.toolTip=@"添加共享蒙版";_remove.toolTip=@"删除此共享蒙版及其模块关联,可撤销";if(!m[@"status"]&&!pen&&![m[@"keys"]count])_status.stringValue=[NSString stringWithFormat:@"共享给 %lu 个模块 · 编辑与跟踪同步更新所有关联模块",(unsigned long)DYToolIDsForSharedMask(doc,_maskID).count];}
if(stamp){_remove.toolTip=@"删除仿制图章,可撤销";if(!m[@"status"]&&![m[@"keys"]count])_status.stringValue=@"取样中心固定,跟踪覆盖区域。";}
if(stamp){_remove.toolTip=@"删除仿制图章,可撤销";if(!m[@"status"]&&![m[@"keys"]count])_status.stringValue=@"分别跟踪取样与覆盖区域的位置和缩放。";}
// Keep every scalar readable at the narrowest native inspector width. A
// label/value line and a separate full-width slider avoid compressed controls.
_contentHeight=136+(pen?84:0)+visible*58+(shape?184:0)+58;[self setNeedsLayout:YES];_refreshing=NO;
@@ -101,7 +101,7 @@
- (void)enabled:(NSButton*)sender{[self edit:@"启停蒙版" block:^(NSMutableDictionary *d,NSMutableDictionary *m){m[@"enabled"]=@(sender.state==NSControlStateValueOn);}];}
- (void)combine:(id)sender{[self edit:@"蒙版组合" block:^(NSMutableDictionary *d,NSMutableDictionary *m){m[@"combine"]=@(self->_combine.indexOfSelectedItem);}];}
- (void)inverted:(NSButton*)sender{[self edit:@"反转蒙版" block:^(NSMutableDictionary *d,NSMutableDictionary *m){DYMaskParameters p;[m[@"parameters"]getBytes:&p length:sizeof(p)];if(sender.state)p.flags|=DYMaskInvert;else p.flags&=~DYMaskInvert;m[@"parameters"]=[NSData dataWithBytes:&p length:sizeof(p)];}];}
- (void)valueChanged:(NSControl*)sender{if(_refreshing)return;double value=sender.doubleValue;if([sender isKindOfClass:NSTextField.class]){NSString *text=[sender.stringValue stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceAndNewlineCharacterSet];NSScanner *scanner=[NSScanner scannerWithString:text];if(![scanner scanDouble:&value]||!scanner.isAtEnd){NSBeep();[self refreshWithDocument:_document time:_time];return;}}if(!std::isfinite(value)){NSBeep();return;}NSInteger i=sender.tag;[self edit:@"调整工具蒙版" block:^(NSMutableDictionary *d,NSMutableDictionary *m){DYMaskParameters p=DYMaskAtTime(m,self->_time);float *fields[]={&p.strength,&p.feather,&p.centerX,&p.centerY,&p.width,&p.height,&p.angle,&p.gradientWidth,&p.hueCenterTurns,&p.hueCoreHalfWidth,&p.hueSoftWidth,&p.saturationRange.low,&p.saturationRange.high,&p.lightnessRange.low,&p.lightnessRange.high,&p.inputBlack,&p.inputWhite,&p.inputGamma};*fields[i]=(i==6?value*M_PI/180:i>=8&&i<=10?value/360:value);if(p.kind==DYMaskHSLKey)p.flags|=DYMaskHueEnabled|DYMaskSaturationEnabled|DYMaskLightnessEnabled;if(!dyValidMaskParameters(p))return;if([m[@"keys"]count]&&i<8){NSMutableArray *keys=[[m[@"keys"]mutableCopy]autorelease];[keys filterUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(NSDictionary *key,NSDictionary *bindings){CMTime t=CMTimeMakeWithEpoch([key[@"value"]longLongValue],[key[@"scale"]intValue],[key[@"epoch"]longLongValue]);return CMTimeCompare(t,self->_time)!=0;}]];[keys addObject:DYMaskKey(self->_time,p,YES,1)];[keys sortUsingComparator:^NSComparisonResult(NSDictionary *a,NSDictionary *b){CMTime x=CMTimeMakeWithEpoch([a[@"value"]longLongValue],[a[@"scale"]intValue],[a[@"epoch"]longLongValue]),y=CMTimeMakeWithEpoch([b[@"value"]longLongValue],[b[@"scale"]intValue],[b[@"epoch"]longLongValue]);return (NSComparisonResult)CMTimeCompare(x,y);}];m[@"keys"]=keys;}else m[@"parameters"]=[NSData dataWithBytes:&p length:sizeof(p)];}];}
- (void)valueChanged:(NSControl*)sender{if(_refreshing)return;double value=sender.doubleValue;if([sender isKindOfClass:NSTextField.class]){NSString *text=[sender.stringValue stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceAndNewlineCharacterSet];NSScanner *scanner=[NSScanner scannerWithString:text];if(![scanner scanDouble:&value]||!scanner.isAtEnd){NSBeep();[self refreshWithDocument:_document time:_time];return;}}if(!std::isfinite(value)){NSBeep();return;}NSInteger i=sender.tag;[self edit:@"调整工具蒙版" block:^(NSMutableDictionary *d,NSMutableDictionary *m){BOOL stamp=m[@"stampSource"]!=nil,position=i==2||i==3;DYMaskParameters p=DYMaskAtTime(m,stamp&&!position?kCMTimeInvalid:self->_time);float *fields[]={&p.strength,&p.feather,&p.centerX,&p.centerY,&p.width,&p.height,&p.angle,&p.gradientWidth,&p.hueCenterTurns,&p.hueCoreHalfWidth,&p.hueSoftWidth,&p.saturationRange.low,&p.saturationRange.high,&p.lightnessRange.low,&p.lightnessRange.high,&p.inputBlack,&p.inputWhite,&p.inputGamma};*fields[i]=(i==6?value*M_PI/180:i>=8&&i<=10?value/360:value);if(stamp&&(i==4||i==5)){DYStampMotion motion=DYStampMotionAtTime(m,self->_time);*fields[i]/=i==4?motion.targetScaleX:motion.targetScaleY;}if(p.kind==DYMaskHSLKey)p.flags|=DYMaskHueEnabled|DYMaskSaturationEnabled|DYMaskLightnessEnabled;if(!dyValidMaskParameters(p))return;if([m[@"keys"]count]&&(stamp?position:i<8)){NSMutableArray *keys=[[m[@"keys"]mutableCopy]autorelease];[keys filterUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(NSDictionary *key,NSDictionary *bindings){CMTime t=CMTimeMakeWithEpoch([key[@"value"]longLongValue],[key[@"scale"]intValue],[key[@"epoch"]longLongValue]);return CMTimeCompare(t,self->_time)!=0;}]];[keys addObject:DYStampKey(self->_time,p,YES,1,DYStampMotionAtTime(m,self->_time))];[keys sortUsingComparator:^NSComparisonResult(NSDictionary *a,NSDictionary *b){CMTime x=CMTimeMakeWithEpoch([a[@"value"]longLongValue],[a[@"scale"]intValue],[a[@"epoch"]longLongValue]),y=CMTimeMakeWithEpoch([b[@"value"]longLongValue],[b[@"scale"]intValue],[b[@"epoch"]longLongValue]);return (NSComparisonResult)CMTimeCompare(x,y);}];m[@"keys"]=keys;}else m[@"parameters"]=[NSData dataWithBytes:&p length:sizeof(p)];}];}
- (void)updateDrawingControls{for(NSButton *button in _tracking)button.enabled=!_drawing;_clear.enabled=!_drawing&&[[self mask][@"keys"]count]>0;_penFinish.enabled=_drawing;_penCancel.enabled=_drawing;}
- (NSString*)canvasNodeID{return DYSharedMaskWithID(_document,_maskID)?@"shared":_nodeID;}
- (BOOL)representsCanvasMask:(NSDictionary*)info{NSString *maskID=info[@"mask"];if(!maskID.length)return NO;if([info[@"node"]isEqual:_nodeID])return YES;if(!DYSharedMaskWithID(_document,maskID))return NO;for(NSDictionary *mask in DYMasksForTool(_document,_nodeID))if([mask[@"id"]isEqual:maskID])return YES;return NO;}
@@ -111,7 +111,23 @@
- (void)canvas:(id)sender{[self sendCanvasDrawing:NO];}
- (void)redrawPen:(id)sender{[self sendCanvasDrawing:YES];}
- (void)penCommand:(NSButton*)sender{[NSNotificationCenter.defaultCenter postNotificationName:@"DYToolCanvasCommand" object:_host userInfo:@{@"node":[self canvasNodeID],@"mask":_maskID?:@"",@"command":sender==_penFinish?@"finish":@"cancel",@"timeValue":@(_time.value),@"timeScale":@(_time.timescale),@"timeEpoch":@(_time.epoch)}];}
- (void)clear:(id)sender{if(_drawing)return;[self edit:@"清除蒙版轨迹" block:^(NSMutableDictionary *d,NSMutableDictionary *m){DYMaskParameters p=DYMaskAtTime(m,self->_time);m[@"parameters"]=[NSData dataWithBytes:&p length:sizeof(p)];m[@"keys"]=@[];[m removeObjectForKey:@"status"];}];}
- (void)clear:(id)sender{
if(_drawing)return;
[self edit:@"清除蒙版轨迹" block:^(NSMutableDictionary *d,NSMutableDictionary *m){
DYMaskParameters p=DYMaskAtTime(m,self->_time);
if(m[@"stampSource"]){
NSArray *source=DYStampSourceAtTime(m,self->_time);
DYStampMotion motion=DYStampMotionAtTime(m,self->_time);
m[@"stampSource"]=@[source[0],source[1],
@(std::clamp([source[2] doubleValue]*motion.sourceScaleX,.001,1.)),
@(std::clamp([source[3] doubleValue]*motion.sourceScaleY,.001,1.))];
m[@"stampSamplingScale"]=DYStampSamplingScaleAtTime(m,self->_time);
}
m[@"parameters"]=[NSData dataWithBytes:&p length:sizeof(p)];
m[@"keys"]=@[];
[m removeObjectForKey:@"status"];
}];
}
- (void)track:(NSButton*)sender{if(_drawing)return;[self canvas:nil];[NSNotificationCenter.defaultCenter postNotificationName:@"DYToolTrack" object:_host userInfo:@{@"node":[self canvasNodeID],@"mask":_maskID?:@"",@"direction":@(sender.tag)}];}
- (void)trackingStatus:(NSNotification*)n{BOOL target=n.userInfo[@"mask"]?[self representsCanvasMask:n.userInfo]:[n.userInfo[@"node"]isEqual:_nodeID];if(target&&(!n.userInfo[@"mask"]||[n.userInfo[@"mask"]isEqual:_maskID]))_status.stringValue=n.userInfo[@"message"]?:@"";}
@end
@@ -90,7 +90,7 @@
{
DYDiagnosticManager *base=[[[DYDiagnosticManager alloc]init]autorelease];DYCreateParameters(base,&error);
DYWorkspaceDiagnosticHost *base=[[[DYWorkspaceDiagnosticHost alloc]init]autorelease];DYCreateParameters(base,&error);
DYToolCanvasProbe *host=[[[DYToolCanvasProbe alloc]init]autorelease];host->_base=base;host->_time=kCMTimeZero;
id<DYToolCanvasHostProbe> plugin=(id)[[NSClassFromString(@"DYPlugIn")alloc]initWithAPIManager:host];
[plugin scheduleToolCanvasRegistration];NSData *state=nil;[plugin pluginState:&state atTime:kCMTimeZero quality:(FxQuality)0 error:&error];
@@ -112,12 +112,98 @@
click(180,291.25); // normalized source (0.25, 0.25)
NSInteger part=down(348,244);
[osc mouseDraggedAtPositionX:460 positionY:181 activePart:part modifiers:0 forceUpdate:&update atTime:kCMTimeZero];
up(460,181,part);drain();
NSDictionary *stamp=[DYSharedMasks(DYReadTools(host,kCMTimeZero).document) firstObject];NSArray *source=stamp[@"stampSource"];
CMTime actionTime=CMTimeMake(39,25);
[osc drawOSCWithWidth:640 height:400 activePart:part destinationImage:overlay atTime:actionTime];
host->_time=actionTime;
up(460,181,part);
[osc drawOSCWithWidth:640 height:400 activePart:part destinationImage:overlay atTime:actionTime];
run.record(@"native-osc-stamp-preview-survives-async-save-and-different-render-time",
[[(id)osc valueForKey:@"stampSaving"]boolValue]&&[[viewer valueForKey:@"stampArmed"]boolValue]&&
[[(id)osc valueForKey:@"stampHasSource"]boolValue]&&!DYSharedMasks(DYReadTools(base,kCMTimeZero).document).count);
drain();
NSDictionary *stamp=[DYSharedMasks(DYReadTools(host,kCMTimeZero).document) firstObject];
NSArray *source=[[stamp[@"stampSource"]copy]autorelease];
DYMaskParameters target=DYMaskAtTime(stamp,kCMTimeZero);
run.record(@"native-osc-creates-one-stamp-and-one-undo-from-source-click-and-drag",source.count==4&&fabs([source[0]doubleValue]-.25)<1e-6&&fabs([source[1]doubleValue]-.25)<1e-6&&fabs(target.centerX-.65)<1e-6&&fabs(target.centerY-.5)<1e-6&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
run.record(@"native-osc-stamp-selects-saved-overlay-when-action-time-differs",
stamp&&[[plugin toolCanvasMaskAtTime:actionTime][@"id"]isEqual:stamp[@"id"]]&&
![[viewer valueForKey:@"stampArmed"]boolValue]&&![[(id)osc valueForKey:@"stampSaving"]boolValue]);
[osc drawOSCWithWidth:640 height:400 activePart:0 destinationImage:overlay atTime:kCMTimeZero];
click(251,104);drain(); // first draw has top-down viewport y=30...345, forward button is x=212...290.
NSString *stampID=[[stamp[@"id"]copy]autorelease];
NSMutableDictionary *tracked=DYMutablePlist(DYReadTools(host,kCMTimeZero).document);
NSMutableDictionary *trackedStamp=(id)DYSharedMaskWithID(tracked,stampID);
DYMaskParameters moved=target;moved.centerX+=.05f;
NSArray *keys=@[DYMaskKey(kCMTimeZero,target,NO,1),DYMaskKey(CMTimeMake(1,25),moved,NO,1)];
trackedStamp[@"keys"]=keys;DYWriteTools(host,tracked,kCMTimeZero);
[plugin pluginState:&state atTime:kCMTimeZero quality:(FxQuality)0 error:&error];
[osc drawOSCWithWidth:640 height:400 activePart:0 destinationImage:overlay atTime:kCMTimeZero];
undo=base->_undoStarts;
part=down(180,291.25);
[osc mouseDraggedAtPositionX:236 positionY:259.75 activePart:part modifiers:0 forceUpdate:&update atTime:kCMTimeZero];
NSArray *preview=[plugin toolCanvasMaskAtTime:kCMTimeZero][@"stampSource"];
up(236,259.75,part);drain();
NSDictionary *edited=DYSharedMaskWithID(DYReadTools(host,kCMTimeZero).document,stampID);
NSArray *relocated=edited[@"stampSource"];
run.record(@"native-osc-drag-moves-only-the-stamp-source-and-keeps-tracking-keys",part==7&&fabs([relocated[0]doubleValue]-.35)<1e-6&&fabs([relocated[1]doubleValue]-.35)<1e-6&&[relocated isEqual:preview]&&[edited[@"parameters"]isEqual:trackedStamp[@"parameters"]]&&[edited[@"keys"]isEqual:keys]&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1,@{@"part":@(part),@"source":relocated?:@[],@"keys":@([edited[@"keys"]count]),@"undoGroups":@(base->_undoStarts-undo)});
[osc drawOSCWithWidth:640 height:400 activePart:0 destinationImage:overlay atTime:kCMTimeZero];
part=down(236,259.75);
[osc mouseDraggedAtPositionX:270 positionY:240 activePart:part modifiers:0 forceUpdate:&update atTime:kCMTimeZero];
BOOL handled=NO;
[osc keyDownAtPositionX:270 positionY:240 keyPressed:27 modifiers:0 forceUpdate:&update didHandle:&handled atTime:kCMTimeZero];
drain();
run.record(@"native-osc-escape-cancels-the-stamp-source-drag-without-another-undo",handled&&[DYSharedMaskWithID(DYReadTools(host,kCMTimeZero).document,stampID)[@"stampSource"]isEqual:relocated]&&base->_undoStarts==undo+1);
[osc drawOSCWithWidth:640 height:400 activePart:0 destinationImage:overlay atTime:kCMTimeZero];
BOOL rotationHandle=NO;
for(NSDictionary *handle in [(id)osc valueForKey:@"handles"])rotationHandle|=[handle[@"part"]integerValue]==6;
part=down(348,244);
[osc mouseDraggedAtPositionX:320 positionY:260 activePart:part modifiers:0 forceUpdate:&update atTime:kCMTimeZero];
up(320,260,part);drain();
NSDictionary *resized=DYSharedMaskWithID(DYReadTools(host,kCMTimeZero).document,stampID);
DYMaskParameters enlarged=DYMaskAtTime(resized,kCMTimeZero);
run.record(@"native-osc-stamp-resizes-coverage-without-rotation-handle-or-track-changes",!rotationHandle&&part==2&&enlarged.width>target.width&&enlarged.height>target.height&&enlarged.centerX==target.centerX&&enlarged.centerY==target.centerY&&[resized[@"keys"]isEqual:keys]);
[osc drawOSCWithWidth:640 height:400 activePart:0 destinationImage:overlay atTime:kCMTimeZero];
undo=base->_undoStarts;
part=down(404,212.5);
[osc mouseDraggedAtPositionX:460 positionY:196.75 activePart:part modifiers:0 forceUpdate:&update atTime:kCMTimeZero];
up(460,196.75,part);drain();
NSDictionary *repositioned=DYSharedMaskWithID(DYReadTools(host,kCMTimeZero).document,stampID);
NSArray *editedKeys=repositioned[@"keys"];
DYMaskParameters trackedCenter=DYMaskAtTime(repositioned,kCMTimeZero);
run.record(@"native-osc-stamp-target-move-saves-the-canvas-key-with-a-different-action-time",
part==1&&fabs(trackedCenter.centerX-.75)<1e-6&&fabs(trackedCenter.centerY-.55)<1e-6&&
editedKeys.count==2&&[editedKeys[0][@"manual"]boolValue]&&[editedKeys[1]isEqual:keys[1]]&&
base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
host->_time=kCMTimeZero;
click(251,104);drain(); // top-down viewport y=30...345, forward button is x=212...290.
run.record(@"native-osc-stamp-forward-action-starts-the-existing-host-tracker",host->_forwardStarts==1&&host->_backwardStarts==0);
[plugin cleanupAnalysis:nil];drain();[(id)osc release];[(id)plugin release];
[plugin cleanupAnalysis:nil];drain();
NSDictionary *beforeRejected=[[DYReadTools(base,kCMTimeZero).document copy]autorelease];
base->_rejectToolsWrites=YES;
click(NSMidX(button),400-NSMidY(button));
click(180,291.25);
part=down(348,244);up(460,181,part);drain();
run.record(@"native-osc-stamp-rejected-write-keeps-the-draft-and-existing-document",
[beforeRejected isEqual:DYReadTools(base,kCMTimeZero).document]&&
[[viewer valueForKey:@"stampArmed"]boolValue]&&[[(id)osc valueForKey:@"stampHasSource"]boolValue]&&
[(id)osc valueForKey:@"stampFailure"]!=nil);
base->_rejectToolsWrites=NO;
part=down(348,244);up(460,181,part);drain();
NSArray *afterRetry=DYSharedMasks(DYReadTools(base,kCMTimeZero).document);
run.record(@"native-osc-stamp-retries-with-the-same-source-and-saves-once",
afterRetry.count==DYSharedMasks(beforeRejected).count+1&&
[afterRetry.lastObject[@"stampSource"]isEqual:source]&&![[viewer valueForKey:@"stampArmed"]boolValue]);
NSString *untrackedID=[[afterRetry.lastObject[@"id"]copy]autorelease];
[osc drawOSCWithWidth:640 height:400 activePart:0 destinationImage:overlay atTime:kCMTimeZero];
host->_time=actionTime;
undo=base->_undoStarts;
part=down(404,212.5);
[osc mouseDraggedAtPositionX:460 positionY:196.75 activePart:part modifiers:0 forceUpdate:&update atTime:kCMTimeZero];
up(460,196.75,part);drain();
NSDictionary *untracked=DYSharedMaskWithID(DYReadTools(host,kCMTimeZero).document,untrackedID);
DYMaskParameters untrackedCenter=DYMaskAtTime(untracked,kCMTimeZero);
run.record(@"native-osc-untracked-stamp-target-saves-in-place-with-a-different-action-time",
part==1&&fabs(untrackedCenter.centerX-.75)<1e-6&&fabs(untrackedCenter.centerY-.55)<1e-6&&
![untracked[@"keys"]count]&&[untracked[@"stampSource"]isEqual:source]&&
base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
[(id)osc release];[(id)plugin release];
}
+35 -9
查看文件
@@ -8,8 +8,8 @@
@synchronized(self){[_toolCanvasDraft release];_toolCanvasDraft=nil;[_toolCanvasOriginal release];_toolCanvasOriginal=nil;_toolDrawingPen=_toolDrawingShape=NO;_toolCanvasHasHover=NO;_toolCanvasEditTime=kCMTimeInvalid;++_toolCanvasRevision;}[self postToolCanvasStatus:nil];
}
- (void)commitToolCanvasDraftAtTime:(CMTime)eventTime {
NSDictionary *draft=nil,*original=nil;NSString *node=nil,*maskID=nil;CMTime time;uint64_t revision;
@synchronized(self){if(!_toolCanvasDraft||!_toolCanvasOriginal)return;if(!CMTIME_IS_NUMERIC(eventTime)||CMTimeCompare(eventTime,_toolCanvasEditTime)!=0){[self discardToolCanvasDraft];[self postToolCanvasStatus:@"播放头已移动,请重新绘制。"];return;}draft=[_toolCanvasDraft copy];original=[_toolCanvasOriginal copy];node=[_selectedToolNode copy];maskID=[_selectedToolMask copy];time=_toolCanvasEditTime;
NSDictionary *draft=nil,*original=nil;NSString *node=nil,*maskID=nil;CMTime time;uint64_t revision;BOOL stampEdit,sourceEdit,resizeStamp;
@synchronized(self){if(!_toolCanvasDraft||!_toolCanvasOriginal)return;if(!CMTIME_IS_NUMERIC(eventTime)||CMTimeCompare(eventTime,_toolCanvasEditTime)!=0){[self discardToolCanvasDraft];[self postToolCanvasStatus:@"播放头已移动,请重新绘制。"];return;}draft=[_toolCanvasDraft copy];original=[_toolCanvasOriginal copy];node=[_selectedToolNode copy];maskID=[_selectedToolMask copy];time=_toolCanvasEditTime;stampEdit=draft[@"stampSource"]!=nil;sourceEdit=_toolDragPart==DYCloneSourcePart;resizeStamp=stampEdit&&_toolDragPart>=2&&_toolDragPart<=5;
// Keep the completed path visible until the authoritative write returns.
// Discarding it here exposed the new pen mask's default rectangular nodes
// during the OSC redraw that immediately follows the closing click.
@@ -18,16 +18,26 @@
@synchronized(self){if(self->_trackingActive.load()||revision!=self->_toolCanvasRevision||![node isEqual:self->_selectedToolNode]||![maskID isEqual:self->_selectedToolMask])return;}
id<FxCustomParameterActionAPI_v4>a=[self->_apiManager apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];if(!a)return;BOOL changed=NO;
[a startAction:self];@try{
os_log(OS_LOG_DEFAULT,"dayu_pen_commit event=%{public}.9f action=%{public}.9f nodes=%{public}lu",CMTimeGetSeconds(time),CMTimeGetSeconds(a.currentTime),(unsigned long)([draft[@"nodes"]length]/sizeof(DYBezierNode)));
if(!CMTIME_IS_NUMERIC(a.currentTime)||CMTimeCompare(DYHostDisplayedFrameTime(self->_apiManager,a.currentTime),time)!=0){[self postToolCanvasStatus:@"播放头已移动,本次蒙版草稿未写入其它帧。"];return;}
NSMutableDictionary *doc=DYMutablePlist(DYReadTools(self->_apiManager,time).document),*current=[self toolMask:maskID node:node document:doc];
CMTime actionTime=DYHostDisplayedFrameTime(self->_apiManager,a.currentTime);
os_log(OS_LOG_DEFAULT,"dayu_pen_commit stamp=%{public}d event=%{public}.9f action=%{public}.9f nodes=%{public}lu",stampEdit,CMTimeGetSeconds(time),CMTimeGetSeconds(actionTime),(unsigned long)([draft[@"nodes"]length]/sizeof(DYBezierNode)));
if(!CMTIME_IS_NUMERIC(actionTime)||(!stampEdit&&CMTimeCompare(actionTime,time)!=0)){[self postToolCanvasStatus:@"播放头已移动,本次蒙版草稿未写入其它帧。"];return;}
// The stamp document is non-animatable. Preserve the canvas time for the
// geometry and tracking key, and access the document at the host action time.
CMTime writeTime=stampEdit?actionTime:time;
NSMutableDictionary *doc=DYMutablePlist(DYReadTools(self->_apiManager,writeTime).document),*current=[self toolMask:maskID node:node document:doc];
if(!current||![current isEqual:original]){os_log(OS_LOG_DEFAULT,"dayu_pen_commit conflict current=%{public}d",current!=nil);[self postToolCanvasStatus:@"蒙版已在其它位置修改,本次画面草稿未覆盖它。"];return;}
NSMutableDictionary *result=DYMutablePlist(draft);
if([current[@"keys"]count]){DYMaskParameters p=DYMaskAtTime(result,time);NSMutableArray *keys=[[current[@"keys"]mutableCopy]autorelease];NSIndexSet *same=[keys indexesOfObjectsPassingTest:^BOOL(NSDictionary *key,NSUInteger i,BOOL *stop){return CMTimeCompare(CMTimeMakeWithEpoch([key[@"value"]longLongValue],[key[@"scale"]intValue],[key[@"epoch"]longLongValue]),time)==0;}];[keys removeObjectsAtIndexes:same];[keys addObject:DYMaskKey(time,p,YES,1)];result[@"keys"]=@[];if(!DYMergeTracking(result,keys))return;}
if(DYValidToolMask(result)&&![current isEqual:result]){[current setDictionary:result];id<FxUndoAPI>undo=[self->_apiManager apiForProtocol:@protocol(FxUndoAPI)];[undo startUndoGroup:@"编辑工具蒙版"];changed=DYWriteTools(self->_apiManager,doc,time);[undo endUndoGroup];if(changed){DYToolDocument *saved=[[[DYToolDocument alloc]init]autorelease];saved.document=doc;[self adoptToolCanvasDocument:saved.document];}}
NSMutableDictionary *result=sourceEdit?[[draft mutableCopy]autorelease]:DYMutablePlist(draft);
if(resizeStamp){
DYMaskParameters p=DYMaskAtTime(result,kCMTimeInvalid),authored=DYMaskAtTime(current,kCMTimeInvalid);
DYStampMotion motion=DYStampMotionAtTime(current,time);
authored.width=p.width/motion.targetScaleX;authored.height=p.height/motion.targetScaleY;
result[@"parameters"]=[NSData dataWithBytes:&authored length:sizeof(authored)];
result[@"keys"]=current[@"keys"];
}else if(!sourceEdit&&[current[@"keys"]count]){DYMaskParameters p=DYMaskAtTime(result,time);if(current[@"stampSource"])result[@"parameters"]=current[@"parameters"];NSMutableArray *keys=[[current[@"keys"]mutableCopy]autorelease];NSIndexSet *same=[keys indexesOfObjectsPassingTest:^BOOL(NSDictionary *key,NSUInteger i,BOOL *stop){return CMTimeCompare(CMTimeMakeWithEpoch([key[@"value"]longLongValue],[key[@"scale"]intValue],[key[@"epoch"]longLongValue]),time)==0;}];[keys removeObjectsAtIndexes:same];[keys addObject:DYStampKey(time,p,YES,1,DYStampMotionAtTime(current,time))];result[@"keys"]=@[];if(!DYMergeTracking(result,keys))return;}
if(DYValidToolMask(result)&&![current isEqual:result]){[current setDictionary:result];id<FxUndoAPI>undo=[self->_apiManager apiForProtocol:@protocol(FxUndoAPI)];[undo startUndoGroup:sourceEdit?@"移动图章取样点":stampEdit?@"编辑仿制图章":@"编辑工具蒙版"];changed=DYWriteTools(self->_apiManager,doc,writeTime);[undo endUndoGroup];if(changed){DYToolDocument *saved=[[[DYToolDocument alloc]init]autorelease];saved.document=doc;[self adoptToolCanvasDocument:saved.document];}else if(stampEdit)[self postToolCanvasStatus:@"宿主未保存图章修改,已保留上一次位置。"];}
}@finally{[a endAction:self];}
os_log(OS_LOG_DEFAULT,"dayu_pen_commit result=%{public}d valid=%{public}d",changed,DYValidToolMask(draft));
if(changed)[self postToolCanvasStatus:@"蒙版已保存 · 可一次撤销"];
if(changed)[self postToolCanvasStatus:sourceEdit?@"图章取样点已移动 · 可一次撤销":stampEdit?@"图章已保存 · 可一次撤销":@"蒙版已保存 · 可一次撤销"];
[NSNotificationCenter.defaultCenter postNotificationName:DYModelChanged object:self->_apiManager];
}@finally{@synchronized(self){if(revision==self->_toolCanvasRevision){[self->_toolCanvasDraft release];self->_toolCanvasDraft=nil;[self->_toolCanvasOriginal release];self->_toolCanvasOriginal=nil;self->_toolCanvasEditTime=kCMTimeInvalid;}self->_toolCanvasCommitPending=NO;}[self postToolCanvasStatus:nil];}});[draft release];[original release];[node release];[maskID release];
}
@@ -74,6 +84,14 @@
if(type==NSEventTypeLeftMouseDown){
_toolCanvasHasHover=NO;
if(_toolDrawingPen&&part==1000&&[_toolCanvasDraft[@"nodes"]length]>=3*sizeof(DYBezierNode)){[self commitToolCanvasDraftAtTime:time];return;}
if(part==DYCloneSourcePart){
NSDictionary *stamp=[self toolMask:_selectedToolMask node:_selectedToolNode document:_toolCanvasDocument];
if([stamp[@"stampSource"]count]!=4)return;
[self discardToolCanvasDraft];
_toolCanvasOriginal=[stamp mutableCopy];_toolCanvasDraft=[stamp mutableCopy];_toolCanvasEditTime=time;
_toolDragStart=point;_toolDragPart=part;
return;
}
if(!_toolCanvasDraft){NSDictionary *mask=[self toolMask:_selectedToolMask node:_selectedToolNode document:_toolCanvasDocument];if(!mask)return;++_toolCanvasRevision;_toolCanvasOriginal=[DYMutablePlist(mask)retain];_toolCanvasDraft=[DYMutablePlist(mask)retain];_toolCanvasEditTime=time;_toolDragParameters=DYMaskAtTime(mask,time);_toolDragParameters.imageAspect=_toolSourceAspect>0?_toolSourceAspect:1;_toolCanvasDraft[@"parameters"]=[NSData dataWithBytes:&_toolDragParameters length:sizeof(DYMaskParameters)];_toolCanvasDraft[@"keys"]=@[];if(_toolDrawingPen)_toolCanvasDraft[@"nodes"]=[NSData data];}
if(CMTimeCompare(time,_toolCanvasEditTime)!=0){[self discardToolCanvasDraft];[self postToolCanvasStatus:@"播放头已移动,请重新绘制。"];return;}
_toolDragStart=point;_toolDragPart=part;_toolDragParameters=DYMaskAtTime(_toolCanvasDraft,time);
@@ -83,6 +101,14 @@
if(!_toolCanvasDraft)return;
if(CMTimeCompare(time,_toolCanvasEditTime)!=0){[self discardToolCanvasDraft];return;}
if(_toolDrawingShape&&(type==NSEventTypeLeftMouseDragged||type==NSEventTypeLeftMouseUp)){[self updateToolShapeDraftAtPoint:point];if(type==NSEventTypeLeftMouseUp){DYMaskParameters p=DYMaskAtTime(_toolCanvasDraft,time);if(p.width<=.001f||p.height<=.001f){[self discardToolCanvasDraft];[self postToolCanvasStatus:@"未拖出有效区域,原蒙版已保留。"];return;}[self commitToolCanvasDraftAtTime:time];}return;}
if(_toolDragPart==DYCloneSourcePart&&(type==NSEventTypeLeftMouseDragged||type==NSEventTypeLeftMouseUp)){
NSArray *source=_toolCanvasOriginal[@"stampSource"];
double x=fmax(0,fmin(1,[source[0]doubleValue]+(point.x-_toolDragStart.x)));
double y=fmax(0,fmin(1,[source[1]doubleValue]+(point.y-_toolDragStart.y)));
_toolCanvasDraft[@"stampSource"]=@[@(x),@(y),source[2],source[3]];
if(type==NSEventTypeLeftMouseUp)[self commitToolCanvasDraftAtTime:time];
return;
}
if(type==NSEventTypeLeftMouseDragged){_toolCanvasHasHover=NO;DYMaskParameters p=_toolDragParameters;float dx=point.x-_toolDragStart.x,dy=point.y-_toolDragStart.y;
if(_toolDrawingPen||_toolDragPart>=1000){NSMutableData *data=[[_toolCanvasDraft[@"nodes"]mutableCopy]autorelease];NSUInteger count=data.length/sizeof(DYBezierNode);if(count){auto *nodes=(DYBezierNode*)data.mutableBytes;NSUInteger index=_toolDrawingPen?count-1:(_toolDragPart-1000)/3,handle=_toolDrawingPen?2:(_toolDragPart-1000)%3;float a=p.imageAspect,c=cos(p.angle),s=sin(p.angle),x=((point.x-p.centerX)*a*c+(point.y-p.centerY)*s)/(p.width*a),y=(-(point.x-p.centerX)*a*s+(point.y-p.centerY)*c)/p.height;if(index<count){if(handle==0){float mx=x-nodes[index].x,my=y-nodes[index].y;nodes[index].x=x;nodes[index].y=y;nodes[index].inX+=mx;nodes[index].inY+=my;nodes[index].outX+=mx;nodes[index].outY+=my;}else if(handle==1){nodes[index].inX=x;nodes[index].inY=y;}else{nodes[index].outX=x;nodes[index].outY=y;if(_toolDrawingPen){nodes[index].inX=2*nodes[index].x-x;nodes[index].inY=2*nodes[index].y-y;}}_toolCanvasDraft[@"nodes"]=data;}}}
else if(_toolDragPart==6)p.angle=atan2((point.y-p.centerY),(point.x-p.centerX)*p.imageAspect)+M_PI/2;
+3 -4
查看文件
@@ -4,9 +4,8 @@ struct DYToolMaskEntry {DYResolvedMask mask;int section,combine;};
struct DYToolMaskHeader {unsigned count;float offsetX,offsetY,scaleX,scaleY;int section,premultiplied,faceOnly,skinPreview;};
struct DYToolStageRange {int first,last,suppressBlackWhite;};
// Map normalized destination coordinates to the original source ellipse.
// Destination coverage and the source sampling transform are independent.
struct DYCloneStamp {
float centerX,centerY,sourceX,sourceY,sourceWidth,sourceHeight;
float localXX,localXY,localYX,localYY;
float feather,strength,inputBlack,inputWhite,inputGamma;
float centerX,centerY,sourceX,sourceY,samplingScaleX,samplingScaleY;
float inverseRadiusX,inverseRadiusY,feather,strength,inputBlack,inputWhite,inputGamma;
};
@@ -1,3 +1,4 @@
static const NSInteger DYCloneSourcePart=7;
@class DYPlugIn;
static NSMapTable *DYToolCanvasSessions(void){static NSMapTable *map;static dispatch_once_t once;dispatch_once(&once,^{map=[[NSMapTable strongToWeakObjectsMapTable]retain];});return map;}
@interface DYPlugIn (ToolCanvas)
@@ -5,6 +6,6 @@ static NSMapTable *DYToolCanvasSessions(void){static NSMapTable *map;static disp
- (NSDictionary*)toolCanvasMaskAtTime:(CMTime)time;
- (void)toolCanvasEvent:(NSEventType)type point:(NSPoint)point part:(NSInteger)part modifiers:(FxModifierKeys)modifiers key:(unichar)key time:(CMTime)time;
- (BOOL)toolCanvasVisible;
- (void)addCloneStampFrom:(NSPoint)source target:(NSRect)target atTime:(CMTime)time;
- (void)addCloneStampFrom:(NSPoint)source target:(NSRect)target atTime:(CMTime)time completion:(void (^)(NSString *failure))completion;
- (void)trackCloneStamp:(NSString*)stampID direction:(NSInteger)direction;
@end
+3 -1
查看文件
@@ -16,5 +16,7 @@
NSDictionary *_trackingFrozenMask;NSMutableDictionary *_trackingCandidate;
NSMutableArray *_trackingSamples;
DYMaskParameters _trackingSeed;
dy::OpenCVTracker _toolTracker;
DYStampMotion _trackingStampMotion;
dy::TrackerROI _trackingStampSourceSeed;
dy::OpenCVTracker _toolTracker,_stampSourceTracker;
NSMutableDictionary *_toolCaptureDevices;
+106 -24
查看文件
@@ -23,32 +23,48 @@
NSString *node=notification.userInfo[@"node"],*mask=notification.userInfo[@"mask"];if(!node||!mask)return;NSDictionary *document=notification.userInfo[@"document"];if(document&&DYValidToolDocument(document)){DYToolDocument *immutable=[[[DYToolDocument alloc]init]autorelease];immutable.document=document;[self adoptToolCanvasDocument:immutable.document];}os_log(OS_LOG_DEFAULT,"dayu_tool_canvas_selected");
@synchronized(self){if(DYSharedMaskWithID(_toolCanvasDocument,mask))node=@"shared";if(_trackingActive.load()&&(![_trackingNode isEqual:node]||![_trackingMaskID isEqual:mask])){_trackingCancelled.store(true);_trackingDiscard=YES;}[_selectedToolNode release];_selectedToolNode=[node copy];[_selectedToolMask release];_selectedToolMask=[mask copy];_toolCanvasHidden=[notification.userInfo[@"hidden"]boolValue];_toolDrawingPen=[notification.userInfo[@"draw"]boolValue];NSDictionary *shape=[self toolMask:mask node:node document:_toolCanvasDocument];DYMaskParameters shapeParameters=DYMaskAtTime(shape,kCMTimeInvalid);_toolDrawingShape=shape&&shapeParameters.kind<2&&[notification.userInfo[@"drawShape"]boolValue];if(_toolDrawingShape)_toolDrawingPen=NO;++_toolCanvasRevision;_toolCanvasEditTime=kCMTimeInvalid;_toolDragPart=0;_toolCanvasHasHover=NO;[_toolCanvasDraft release];_toolCanvasDraft=nil;[_toolCanvasOriginal release];_toolCanvasOriginal=nil;}[self postToolCanvasStatus:_toolDrawingPen?@"钢笔:点击放点,拖出曲柄;点首节点或完成绘制闭合。":_toolDrawingShape?@"在画面按下并拖出蒙版区域;Esc 取消。":@"已选中本层蒙版"];
}
- (void)addCloneStampFrom:(NSPoint)source target:(NSRect)target atTime:(CMTime)time {
- (void)addCloneStampFrom:(NSPoint)source target:(NSRect)target atTime:(CMTime)time completion:(void (^)(NSString *failure))completion {
dispatch_async(dispatch_get_main_queue(),^{
if(self->_trackingActive.load()||!CMTIME_IS_NUMERIC(time))return;
if(self->_trackingActive.load()){completion(@"请先停止跟踪,再绘制图章。");return;}
id<FxCustomParameterActionAPI_v4>action=[self->_apiManager apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];
if(!action)return;
if(!action){completion(@"宿主暂时无法保存图章,请重试。");return;}
NSDictionary *selection=nil;
NSString *failure=nil;
[action startAction:self];@try{
if(CMTimeCompare(DYHostDisplayedFrameTime(self->_apiManager,action.currentTime),time)!=0)return;
NSMutableDictionary *doc=DYMutablePlist(DYReadTools(self->_apiManager,time).document);
NSMutableDictionary *stamp=(id)DYAddSharedMask(doc,DYMaskEllipse);
if(!stamp){NSBeep();return;}
DYMaskParameters p=DYMaskAtTime(stamp,kCMTimeInvalid);
p.centerX=NSMidX(target);p.centerY=NSMidY(target);p.width=target.size.width;p.height=target.size.height;
stamp[@"parameters"]=[NSData dataWithBytes:&p length:sizeof(p)];
stamp[@"stampSource"]=@[@(source.x),@(source.y),@(p.width),@(p.height)];
id<FxUndoAPI>undo=[self->_apiManager apiForProtocol:@protocol(FxUndoAPI)];
BOOL grouped=[undo startUndoGroup:@"创建仿制图章"];
if(DYWriteTools(self->_apiManager,doc,time))selection=@{@"node":@"shared",@"mask":stamp[@"id"],@"document":doc};
else NSBeep();
if(grouped)[undo endUndoGroup];
// A new stamp is clip-wide. The OSC supplies geometry, while the action
// supplies the time for accessing this instance's non-animatable document.
CMTime writeTime=DYHostDisplayedFrameTime(self->_apiManager,action.currentTime);
id<FxParameterRetrievalAPI_v6>get=[self->_apiManager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];
DYToolDocument *stored=nil;
if(!CMTIME_IS_NUMERIC(writeTime)||![get getCustomParameterValue:&stored fromParameter:DYToolsParameterID atTime:writeTime]||![stored isKindOfClass:DYToolDocument.class]){
failure=@"宿主暂时无法读取当前图章,请重试。";
}else{
NSMutableDictionary *doc=DYMutablePlist(stored.document);
NSMutableDictionary *stamp=(id)DYAddSharedMask(doc,DYMaskEllipse);
if(!stamp){
failure=DYSharedMasks(doc).count>=DYSharedMaskLimit?@"已达到蒙版与图章数量上限。":@"无法在当前效果中创建图章。";
}else{
DYMaskParameters p=DYMaskAtTime(stamp,kCMTimeInvalid);
p.centerX=NSMidX(target);p.centerY=NSMidY(target);p.width=target.size.width;p.height=target.size.height;
stamp[@"parameters"]=[NSData dataWithBytes:&p length:sizeof(p)];
stamp[@"stampSource"]=@[@(source.x),@(source.y),@(p.width),@(p.height)];
id<FxUndoAPI>undo=[self->_apiManager apiForProtocol:@protocol(FxUndoAPI)];
BOOL grouped=[undo startUndoGroup:@"创建仿制图章"];
@try{
if(DYWriteTools(self->_apiManager,doc,writeTime))selection=@{@"node":@"shared",@"mask":stamp[@"id"],@"document":doc};
else failure=@"宿主未保存图章,请重新拖出覆盖区。";
}@finally{if(grouped)[undo endUndoGroup];}
}
}
os_log(OS_LOG_DEFAULT,"dayu_clone_commit accepted=%{public}d osc=%{public}.9f action=%{public}.9f",
selection!=nil,CMTimeGetSeconds(time),CMTimeGetSeconds(writeTime));
}@finally{[action endAction:self];}
if(selection){
[NSNotificationCenter.defaultCenter postNotificationName:DYModelChanged object:self->_apiManager];
[NSNotificationCenter.defaultCenter postNotificationName:@"DYToolCanvasSelection" object:self->_apiManager userInfo:selection];
[self postToolCanvasStatus:@"仿制图章已保存 · 可跟踪目标区域"];
}
[self postToolCanvasStatus:@"仿制图章已保存 · 可跟踪取样与覆盖区域"];
}else [self postToolCanvasStatus:failure];
completion(failure);
});
}
- (void)trackCloneStamp:(NSString*)stampID direction:(NSInteger)direction{
@@ -60,7 +76,7 @@
- (BOOL)toolCanvasVisible {@synchronized(self){return _selectedToolNode&&_selectedToolMask&&!_toolCanvasHidden;}}
- (DYViewerParameterBridge*)viewerParameterBridge{return _viewerParameterBridge;}
- (NSDictionary*)toolCanvasMaskAtTime:(CMTime)time {
@synchronized(self){if(_toolDrawingShape&&_toolCanvasDraft&&(!CMTIME_IS_NUMERIC(time)||CMTimeCompare(time,_toolCanvasEditTime)!=0)){[self discardToolCanvasDraft];[self postToolCanvasStatus:@"播放头已移动,已取消本次框选。"];}if(_toolCanvasHidden||!_selectedToolMask)return nil;BOOL draftTime=_toolCanvasDraft&&CMTIME_IS_NUMERIC(time)&&CMTIME_IS_NUMERIC(_toolCanvasEditTime)&&CMTimeCompare(time,_toolCanvasEditTime)==0;NSDictionary *m=draftTime?_toolCanvasDraft:[self toolMask:_selectedToolMask node:_selectedToolNode document:_toolCanvasDocument];if(!m)return nil;DYMaskParameters p=DYMaskAtTime(m,time);return @{@"id":m[@"id"],@"parameters":[NSData dataWithBytes:&p length:sizeof(p)],@"nodes":(_toolDrawingPen&&!_toolCanvasDraft)?[NSData data]:(m[@"nodes"]?:[NSData data]),@"drawing":@(_toolDrawingPen),@"drawShape":@(_toolDrawingShape),@"shapeStarted":@(_toolDrawingShape&&_toolCanvasDraft!=nil),@"hover":(_toolDrawingPen&&_toolCanvasHasHover)?@[@(_toolCanvasHoverPoint.x),@(_toolCanvasHoverPoint.y)]:@[],@"coverage":@(_toolShowCoverage),@"stampSource":m[@"stampSource"]?:@[],@"tracking":@(_trackingActive.load())};}
@synchronized(self){if(_toolDrawingShape&&_toolCanvasDraft&&(!CMTIME_IS_NUMERIC(time)||CMTimeCompare(time,_toolCanvasEditTime)!=0)){[self discardToolCanvasDraft];[self postToolCanvasStatus:@"播放头已移动,已取消本次框选。"];}if(_toolCanvasHidden||!_selectedToolMask)return nil;BOOL draftTime=_toolCanvasDraft&&CMTIME_IS_NUMERIC(time)&&CMTIME_IS_NUMERIC(_toolCanvasEditTime)&&CMTimeCompare(time,_toolCanvasEditTime)==0;NSDictionary *m=draftTime?_toolCanvasDraft:[self toolMask:_selectedToolMask node:_selectedToolNode document:_toolCanvasDocument];if(!m)return nil;DYMaskParameters p=DYMaskAtTime(m,time);return @{@"id":m[@"id"],@"parameters":[NSData dataWithBytes:&p length:sizeof(p)],@"nodes":(_toolDrawingPen&&!_toolCanvasDraft)?[NSData data]:(m[@"nodes"]?:[NSData data]),@"drawing":@(_toolDrawingPen),@"drawShape":@(_toolDrawingShape),@"shapeStarted":@(_toolDrawingShape&&_toolCanvasDraft!=nil),@"hover":(_toolDrawingPen&&_toolCanvasHasHover)?@[@(_toolCanvasHoverPoint.x),@(_toolCanvasHoverPoint.y)]:@[],@"coverage":@(_toolShowCoverage),@"stampSource":DYStampSourceAtTime(draftTime&&_toolDragPart!=DYCloneSourcePart&&_toolCanvasOriginal?_toolCanvasOriginal:m,time)?:@[],@"tracking":@(_trackingActive.load())};}
}
- (void)toolTrackRequested:(NSNotification*)notification {
NSInteger direction=[notification.userInfo[@"direction"]integerValue];if(direction==9){_trackingCancelled.store(true);return;}@synchronized(self){if(_toolDrawingPen||_toolDrawingShape||_toolCanvasCommitPending){[self postToolCanvasStatus:@"请先完成或取消蒙版绘制,再开始跟踪。"];return;}}if(_trackingActive.load()){[self toolStatus:@"请先取消当前跟踪"];return;}
@@ -73,6 +89,14 @@
@synchronized(self){_trackingReferenceFrame={};if(_toolSourceFrame.valid()&&CMTIME_IS_NUMERIC(_toolSourceTime)&&CMTimeCompare(_toolSourceTime,time)==0)_trackingReferenceFrame=_toolSourceFrame;}
id<FxTimingAPI_v4>timing=[_apiManager apiForProtocol:@protocol(FxTimingAPI_v4)];NSUInteger numerator=[timing timelineFpsNumeratorForEffect:self],denominator=[timing timelineFpsDenominatorForEffect:self];_trackingFrameDuration=numerator&&denominator&&numerator<=INT32_MAX?CMTimeMake(denominator,(int32_t)numerator):kCMTimeInvalid;if(!CMTIME_IS_NUMERIC(_trackingFrameDuration)||_trackingFrameDuration.value<=0){[self toolStatus:@"宿主未提供精确帧长,跟踪未启动"];return;}
[_trackingNode release];_trackingNode=[node copy];[_trackingMaskID release];_trackingMaskID=[notification.userInfo[@"mask"]copy];[_trackingFrozenMask release];_trackingFrozenMask=[mask copy];[_trackingCandidate release];_trackingCandidate=[DYMutablePlist(mask)retain];[_trackingSamples release];_trackingSamples=[NSMutableArray new];[_trackingMessage release];_trackingMessage=nil;
NSArray *source=DYStampSourceAtTime(mask,time);
_trackingStampMotion=DYStampMotionAtTime(mask,time);
if(source){
_trackingStampMotion.active=true;
_trackingStampSourceSeed={[source[0] floatValue],[source[1] floatValue],
std::min(8.f,[source[2] floatValue]*_trackingStampMotion.sourceScaleX),
std::min(8.f,[source[3] floatValue]*_trackingStampMotion.sourceScaleY),0};
}
_trackingReferenceTime=time;_trackingSeed=seed;_trackingBackward=direction<0;_trackingBoth=direction==0;_trackingSingle=std::abs((int)direction)==2;_trackingDiscard=NO;_trackingCancelled.store(false);_trackingFinishing.store(false);_trackingActive.store(true);++_trackingGeneration;_trackingStarted=NSProcessInfo.processInfo.systemUptime;
os_log(OS_LOG_DEFAULT,"dayu_tool_track_start direction=%{public}ld reference=%{public}.6f cached=%{public}d",(long)direction,CMTimeGetSeconds(time),_trackingReferenceFrame.valid());
NSError *error=nil;BOOL started=_trackingBackward?[analysis startBackwardAnalysis:kFxAnalysisLocation_GPU error:&error]:[analysis startForwardAnalysis:kFxAnalysisLocation_GPU error:&error];if(!started){_trackingActive.store(false);[self toolStatus:error.localizedDescription?:@"宿主未启动逐帧分析"];return;}
@@ -96,7 +120,23 @@
}
- (BOOL)setupAnalysisForTimeRange:(CMTimeRange)range frameDuration:(CMTime)duration error:(NSError**)error {
if(!CMTIME_IS_NUMERIC(duration)||duration.value<=0||duration.epoch!=0)return [self stopToolAnalysis:@"宿主分析帧长无效" error:error];_trackingFrameDuration=duration;_trackingPreviousTime=kCMTimeInvalid;_trackingFlip=NO;[_trackingSamples removeAllObjects];
std::vector<dy::FlowPoint>polygon;NSData *nodes=_trackingCandidate[@"nodes"];if(_trackingSeed.kind==DYMaskBezier){auto path=dyFlattenMask((const DYBezierNode*)nodes.bytes,nodes.length/sizeof(DYBezierNode));for(int i=0;i<path.count;i++)polygon.push_back({path.x[i],path.y[i]});}else if(_trackingSeed.kind==DYMaskRectangle)polygon={{-.5f,-.5f},{.5f,-.5f},{.5f,.5f},{-.5f,.5f}};else for(int i=0;i<128;i++){float angle=i*(2.f*M_PI/128);polygon.push_back({.5f*std::cos(angle),.5f*std::sin(angle)});}_toolTracker.setMask(std::move(polygon));return YES;
std::vector<dy::FlowPoint>polygon;NSData *nodes=_trackingCandidate[@"nodes"];if(_trackingSeed.kind==DYMaskBezier){auto path=dyFlattenMask((const DYBezierNode*)nodes.bytes,nodes.length/sizeof(DYBezierNode));for(int i=0;i<path.count;i++)polygon.push_back({path.x[i],path.y[i]});}else if(_trackingSeed.kind==DYMaskRectangle)polygon={{-.5f,-.5f},{.5f,-.5f},{.5f,.5f},{-.5f,.5f}};else for(int i=0;i<128;i++){float angle=i*(2.f*M_PI/128);polygon.push_back({.5f*std::cos(angle),.5f*std::sin(angle)});}
if(_trackingStampMotion.active)_stampSourceTracker.setMask(polygon);
_toolTracker.setMask(std::move(polygon));return YES;
}
- (BOOL)finishToolTrackingLoss:(const dy::TrackResult&)lost region:(NSString*)region atTime:(CMTime)time error:(NSError**)error {
NSString *reason=@"区域内运动不一致";
switch(lost.failure){
case dy::TrackFailure::InsufficientMatches:reason=@"可用特征点不足";break;
case dy::TrackFailure::LowConfidence:reason=@"运动可信度不足";break;
case dy::TrackFailure::OutsideFrame:reason=@"目标已离开画面";break;
case dy::TrackFailure::InvalidTransform:reason=@"运动变换过大";break;
case dy::TrackFailure::Backend:case dy::TrackFailure::InvalidFrame:reason=@"源画面或跟踪引擎异常";break;
default:break;
}
os_log(OS_LOG_DEFAULT,"dayu_tool_track_loss region=%{public}@ time=%{public}.6f reason=%{public}d features=%{public}d matches=%{public}d inliers=%{public}d confidence=%{public}.3f residual=%{public}.3f",region?:@"蒙版",CMTimeGetSeconds(time),(int)lost.failure,lost.features,lost.matches,lost.inliers,lost.confidence,lost.medianError);
NSString *detail=region?[NSString stringWithFormat:@"%@失去跟踪(%@)",region,reason]:reason;
return [self finishToolAnalysis:[NSString stringWithFormat:@"%@,已保留 %lu 帧可信轨迹;可调整区域后从此处继续",detail,(unsigned long)_trackingSamples.count] error:error];
}
- (BOOL)analyzeFrame:(FxImageTile*)tile atTime:(CMTime)time error:(NSError**)error {
if(!_trackingActive.load()||_trackingFinishing.load()){if(error)*error=[NSError errorWithDomain:FxPlugErrorDomain code:kFxError_UserCancelled userInfo:nil];return NO;}_trackingInFrame.store(true);@try{
@@ -105,13 +145,55 @@
dy::GrayFrame frame=[self toolGrayFrame:tile error:error];if(!frame.valid())return [self stopToolAnalysis:@"宿主未返回完整源画面" error:error];
if(!_trackingSamples.count){if(_trackingReferenceFrame.valid()&&frame.width==_trackingReferenceFrame.width&&frame.height==_trackingReferenceFrame.height){double same=0,flip=0;size_t count=0;for(int y=0;y<frame.height;y+=8)for(int x=0;x<frame.width;x+=8){float p=frame.pixels[y*frame.width+x];same+=fabs(p-_trackingReferenceFrame.pixels[y*frame.width+x]);flip+=fabs(p-_trackingReferenceFrame.pixels[(frame.height-1-y)*frame.width+x]);count++;}same/=MAX(size_t(1),count);flip/=MAX(size_t(1),count);_trackingFlip=flip<.035&&flip+.008<same&&flip<same*.8;}os_log(OS_LOG_DEFAULT,"dayu_tool_track_seed width=%{public}d height=%{public}d flip=%{public}d time=%{public}.6f",frame.width,frame.height,(int)_trackingFlip,CMTimeGetSeconds(time));}
if(_trackingFlip)for(int y=0;y<frame.height/2;y++)for(int x=0;x<frame.width;x++)std::swap(frame.pixels[y*frame.width+x],frame.pixels[(frame.height-1-y)*frame.width+x]);
if(!_trackingSamples.count){if(!_toolTracker.reset(frame,{_trackingSeed.centerX,_trackingSeed.centerY,_trackingSeed.width,_trackingSeed.height,_trackingSeed.angle}))return [self finishToolAnalysis:@"蒙版内纹理不足,原蒙版已保留" error:error];}else if(!_toolTracker.track(frame).valid){auto lost=_toolTracker.result();NSString *reason=@"区域内运动不一致";switch(lost.failure){case dy::TrackFailure::InsufficientMatches:reason=@"可用特征点不足";break;case dy::TrackFailure::LowConfidence:reason=@"运动可信度不足";break;case dy::TrackFailure::OutsideFrame:reason=@"目标已离开画面";break;case dy::TrackFailure::InvalidTransform:reason=@"运动变换过大";break;case dy::TrackFailure::Backend:case dy::TrackFailure::InvalidFrame:reason=@"源画面或跟踪引擎异常";break;default:break;}os_log(OS_LOG_DEFAULT,"dayu_tool_track_loss time=%{public}.6f reason=%{public}d features=%{public}d matches=%{public}d inliers=%{public}d confidence=%{public}.3f residual=%{public}.3f",CMTimeGetSeconds(time),(int)lost.failure,lost.features,lost.matches,lost.inliers,lost.confidence,lost.medianError);return [self finishToolAnalysis:[NSString stringWithFormat:@"%@,已保留 %lu 帧可信轨迹;可调整蒙版后从此处继续",reason,(unsigned long)_trackingSamples.count] error:error];}
auto result=_toolTracker.result();DYMaskParameters p=DYMaskAtTime(_trackingFrozenMask,time);p.centerX=result.cx;p.centerY=result.cy;p.width=_trackingSeed.width*result.scaleX;p.height=_trackingSeed.height*result.scaleY;p.angle=_trackingSeed.angle+result.rotation;if(!dyValidMaskParameters(p))return [self stopToolAnalysis:@"跟踪变换无效,未写入错误结果" error:error];[_trackingSamples addObject:DYMaskKey(time,p,NO,result.confidence)];_trackingPreviousTime=time;
if(_trackingSamples.count==1||_trackingSamples.count%15==0)[self toolStatus:[NSString stringWithFormat:@"已分析 %lu 帧 · 置信度 %.0f%%",(unsigned long)_trackingSamples.count,result.confidence*100]];return YES;
BOOL stamp=_trackingStampMotion.active;
dy::TrackResult target,source;
if(!_trackingSamples.count){
dy::TrackerROI targetROI={_trackingSeed.centerX,_trackingSeed.centerY,_trackingSeed.width,_trackingSeed.height,_trackingSeed.angle};
if(!_toolTracker.reset(frame,targetROI))
return [self finishToolAnalysis:stamp?@"覆盖区域内纹理不足,原图章已保留":@"蒙版内纹理不足,原蒙版已保留" error:error];
if(stamp&&!_stampSourceTracker.reset(frame,_trackingStampSourceSeed))
return [self finishToolAnalysis:@"取样区域内纹理不足,原图章已保留" error:error];
target=_toolTracker.result();
if(stamp)source=_stampSourceTracker.result();
}else{
target=_toolTracker.track(frame);
if(!target.valid)return [self finishToolTrackingLoss:target region:stamp?@"覆盖区域":nil atTime:time error:error];
if(stamp){
source=_stampSourceTracker.track(frame);
if(!source.valid)return [self finishToolTrackingLoss:source region:@"取样区域" atTime:time error:error];
}
}
DYMaskParameters p=DYMaskAtTime(_trackingFrozenMask,stamp?kCMTimeInvalid:time);
p.centerX=target.cx;p.centerY=target.cy;
float confidence=target.confidence;
DYStampMotion motion=_trackingStampMotion;
if(stamp){
NSArray *authoredSource=_trackingFrozenMask[@"stampSource"];
motion.sourceOffsetX=source.cx-[authoredSource[0] floatValue];
motion.sourceOffsetY=source.cy-[authoredSource[1] floatValue];
motion.sourceScaleX*=source.scaleX;motion.sourceScaleY*=source.scaleY;
motion.targetScaleX*=target.scaleX;motion.targetScaleY*=target.scaleY;
for(float scale:{motion.sourceScaleX,motion.sourceScaleY,motion.targetScaleX,motion.targetScaleY})
if(!std::isfinite(scale)||scale<1.f/16||scale>16.f)
return [self finishToolAnalysis:@"图章缩放超出跟踪范围,已保留连续可信轨迹" error:error];
confidence=std::min(confidence,source.confidence);
}else{
p.width=_trackingSeed.width*target.scaleX;p.height=_trackingSeed.height*target.scaleY;
p.angle=_trackingSeed.angle+target.rotation;
}
if(!dyValidMaskParameters(p))return [self stopToolAnalysis:@"跟踪变换无效,未写入错误结果" error:error];
[_trackingSamples addObject:DYStampKey(time,p,NO,confidence,motion)];_trackingPreviousTime=time;
if(_trackingSamples.count==1||_trackingSamples.count%15==0){
if(stamp)os_log(OS_LOG_DEFAULT,"dayu_stamp_track_pair time=%{public}.6f target=%{public}.5f,%{public}.5f source=%{public}.5f,%{public}.5f target_scale=%{public}.4f,%{public}.4f source_scale=%{public}.4f,%{public}.4f",CMTimeGetSeconds(time),target.cx,target.cy,source.cx,source.cy,motion.targetScaleX,motion.targetScaleY,motion.sourceScaleX,motion.sourceScaleY);
[self toolStatus:[NSString stringWithFormat:stamp?@"已跟踪取样与覆盖 %lu 帧 · 置信度 %.0f%%":@"已分析 %lu 帧 · 置信度 %.0f%%",(unsigned long)_trackingSamples.count,confidence*100]];
}
return YES;
}@finally{_trackingInFrame.store(false);}
}
- (BOOL)cleanupAnalysis:(NSError**)error {
if(!_trackingActive.load()||_trackingFinishing.exchange(true))return YES;BOOL changed=_trackingSamples.count>1;if(changed&&!DYMergeTracking(_trackingCandidate,_trackingSamples)){[_trackingMessage release];_trackingMessage=[@"轨迹合并失败,原蒙版已保留" copy];_trackingDiscard=YES;}
if(!_trackingActive.load()||_trackingFinishing.exchange(true))return YES;BOOL changed=_trackingSamples.count>1;if(changed&&!DYMergeTracking(_trackingCandidate,_trackingSamples,_trackingFrameDuration)){[_trackingMessage release];_trackingMessage=[@"轨迹合并失败,原蒙版已保留" copy];_trackingDiscard=YES;}
_toolTracker.stop();
if(_trackingStampMotion.active)_stampSourceTracker.stop();
uint64_t generation=_trackingGeneration;BOOL second=_trackingBoth&&!_trackingBackward&&!_trackingCancelled.load()&&!_trackingDiscard;
dispatch_async(dispatch_get_main_queue(),^{if(self->_trackingGeneration!=generation)return;
if(second){self->_trackingBackward=YES;self->_trackingFinishing.store(false);self->_trackingStarted=NSProcessInfo.processInfo.systemUptime;id<FxCustomParameterActionAPI_v4>a=[self->_apiManager apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];BOOL started=NO;if(a){[a startAction:self];@try{started=[[self->_apiManager apiForProtocol:@protocol(FxAnalysisAPI)]startBackwardAnalysis:kFxAnalysisLocation_GPU error:nil];}@finally{[a endAction:self];}}if(started){[self toolStatus:@"正向完成,正在从同一起点反向跟踪…"];return;}self->_trackingFinishing.store(true);}
+39 -18
查看文件
@@ -5,12 +5,12 @@
@implementation DYToolOSC {
id<MTLDevice> _device;id<MTLCommandQueue> _queue;CIContext *_context;
DYViewerControls *_viewerControls;CGFloat _height,_canvasWidth,_uiScale;BOOL _maskCapturing;DYPlugIn *_maskCaptureOwner;NSRect _imageRect;NSDictionary *_mask;NSMutableArray *_handles;NSBezierPath *_outline;NSInteger _lastRoute;NSUInteger _drawCount,_hitDiagnostics,_eventDiagnostics;
BOOL _stampHasSource,_stampDragging;
BOOL _stampHasSource,_stampDragging,_stampSaving,_stampNeedsRedraw;
NSPoint _stampSource,_stampStart,_stampEnd;
CMTime _stampTime;
NSString *_stampFailure;
}
- (instancetype)initWithAPIManager:(id<PROAPIAccessing>)manager{if((self=[super init])){_apiManager=manager;_viewerControls=[DYViewerControls new];_handles=[NSMutableArray new];_lastRoute=-1;_uiScale=1;os_log(OS_LOG_DEFAULT,"dayu_tool_osc_init");}return self;}
- (void)dealloc{[_viewerControls release];[_device release];[_queue release];[_context release];[_mask release];[_handles release];[_outline release];[super dealloc];}
- (void)dealloc{[_viewerControls release];[_device release];[_queue release];[_context release];[_mask release];[_handles release];[_outline release];[_stampFailure release];[super dealloc];}
- (FxDrawingCoordinates)drawingCoordinates{return kFxDrawingCoordinates_CANVAS;}
- (DYPlugIn*)pluginAtTime:(CMTime)time{NSString *value=nil;id<FxParameterRetrievalAPI_v6>get=[_apiManager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];[get getStringParameterValue:&value fromParameter:DYCanvasSessionParameterID];@synchronized(DYToolCanvasSessions()){return [DYToolCanvasSessions()objectForKey:value];}}
- (NSPoint)canvasPoint:(float)x y:(float)y parameters:(DYMaskParameters)p{
@@ -23,10 +23,9 @@
NSRect v=NSIntersectionRect(_imageRect,NSMakeRect(0,0,_canvasWidth,_height));CGFloat scale=MAX(.01,MIN(_uiScale,MIN(v.size.width/300.,v.size.height/100.)));
return NSMakeRect(NSMinX(v)+(item==9?8:76)*scale,NSMaxY(v)-61*scale,64*scale,24*scale);
}
- (void)updateStampAtTime:(CMTime)time{
if(!_viewerControls.stampArmed||!CMTIME_IS_NUMERIC(time)||!CMTIME_IS_NUMERIC(_stampTime)||CMTimeCompare(_stampTime,time)!=0){
_stampHasSource=_stampDragging=NO;_stampTime=time;
}
- (void)clearStampCreation{
_stampHasSource=_stampDragging=NO;
[_stampFailure release];_stampFailure=nil;
}
- (NSRect)stampControlRect:(NSInteger)index{
NSRect viewport=NSIntersectionRect(_imageRect,NSMakeRect(0,0,_canvasWidth,_height));
@@ -36,8 +35,11 @@
- (NSRect)stampTarget{
return NSMakeRect(MIN(_stampStart.x,_stampEnd.x),MIN(_stampStart.y,_stampEnd.y),fabs(_stampStart.x-_stampEnd.x),fabs(_stampStart.y-_stampEnd.y));
}
- (NSPoint)canvasStampSource:(NSPoint)source{
return NSMakePoint(NSMinX(_imageRect)+source.x*NSWidth(_imageRect),NSMinY(_imageRect)+source.y*NSHeight(_imageRect));
}
- (void)drawStampSource:(NSPoint)source{
NSPoint p=NSMakePoint(NSMinX(_imageRect)+source.x*NSWidth(_imageRect),NSMinY(_imageRect)+source.y*NSHeight(_imageRect));
NSPoint p=[self canvasStampSource:source];
CGFloat r=8*_uiScale;
NSBezierPath *mark=[NSBezierPath bezierPathWithOvalInRect:NSMakeRect(p.x-r,p.y-r,2*r,2*r)];
[mark moveToPoint:NSMakePoint(p.x-r,p.y)];[mark lineToPoint:NSMakePoint(p.x+r,p.y)];
@@ -50,10 +52,10 @@
if(_viewerControls.stampArmed){
NSRect cell=NSUnionRect([self stampControlRect:0],[self stampControlRect:3]);
DYDrawSoftControl(cell,4,NO,NO,NO);
NSString *prompt=_stampHasSource?@"拖出要覆盖的椭圆 · Esc 取消":@"点击画面选择取样中心 · Esc 取消";
NSString *prompt=_stampSaving?@"正在保存仿制图章…":_stampFailure?:(_stampHasSource?@"拖出要覆盖的椭圆 · Esc 取消":@"点击画面选择取样中心 · Esc 取消");
[prompt drawInRect:NSInsetRect(cell,6,4) withAttributes:@{NSForegroundColorAttributeName:NSColor.whiteColor,NSFontAttributeName:[NSFont systemFontOfSize:MAX(8.,NSHeight(cell)*.48)]}];
if(_stampHasSource)[self drawStampSource:_stampSource];
if(_stampDragging){
if(_stampDragging||_stampSaving||_stampFailure){
NSRect target=[self stampTarget];
NSRect oval=NSMakeRect(NSMinX(_imageRect)+target.origin.x*NSWidth(_imageRect),NSMinY(_imageRect)+target.origin.y*NSHeight(_imageRect),target.size.width*NSWidth(_imageRect),target.size.height*NSHeight(_imageRect));
NSBezierPath *outline=[NSBezierPath bezierPathWithOvalInRect:oval];outline.lineWidth=2*_uiScale;[NSColor.systemCyanColor setStroke];[outline stroke];
@@ -76,7 +78,6 @@
DYPlugIn *plugin=[self pluginAtTime:time];NSDictionary *mask=[plugin toolCanvasMaskAtTime:time];NSInteger route=(plugin?1:0)+(mask?2:0);if(route!=_lastRoute||_drawCount++<2){_lastRoute=route;os_log(OS_LOG_DEFAULT,"dayu_tool_osc_route plugin=%{public}d mask=%{public}d width=%{public}.2f height=%{public}.2f",plugin!=nil,mask!=nil,_imageRect.size.width,_imageRect.size.height);}[_mask release];_mask=[mask copy];[_handles removeAllObjects];[_outline release];_outline=nil;
[_viewerControls setBridge:[plugin viewerParameterBridge]];[_viewerControls setViewport:_imageRect];[_viewerControls prepareWithSize:NSMakeSize(canvasWidth,_height) scale:_uiScale atTime:time];
if(plugin&&canvasWidth>0&&_height>0&&canvasWidth<16384&&_height<16384&&_imageRect.size.width>0&&_imageRect.size.height>0){
[self updateStampAtTime:time];
NSRect region=mask||_viewerControls.stampArmed?NSMakeRect(0,0,canvasWidth,_height):NSIntegralRect([_viewerControls drawingBounds]);
if(NSIsEmptyRect(region)){[commands commit];[commands waitUntilCompleted];return;}
NSBitmapImageRep *bitmap=[[[NSBitmapImageRep alloc]initWithBitmapDataPlanes:NULL pixelsWide:(NSInteger)NSWidth(region) pixelsHigh:(NSInteger)NSHeight(region) bitsPerSample:8 samplesPerPixel:4 hasAlpha:YES isPlanar:NO colorSpaceName:NSDeviceRGBColorSpace bytesPerRow:(NSInteger)NSWidth(region)*4 bitsPerPixel:32]autorelease];
@@ -94,7 +95,7 @@
else if(p.kind==DYMaskLinearGradient){[_outline moveToPoint:[self canvasPoint:0 y:-2 parameters:p]];[_outline lineToPoint:[self canvasPoint:0 y:2 parameters:p]];}
if([mask[@"coverage"]boolValue]&&p.kind<3){[[NSColor colorWithCalibratedRed:1 green:.7 blue:.05 alpha:.2]setFill];[_outline fill];}
[[NSColor colorWithWhite:0 alpha:.8]setStroke];_outline.lineWidth=3.5*_uiScale;[_outline stroke];[[NSColor colorWithCalibratedRed:1 green:.8 blue:.15 alpha:1]setStroke];_outline.lineWidth=1.5*_uiScale;[_outline stroke];
if(p.kind<4&&![mask[@"drawing"]boolValue]&&![mask[@"drawShape"]boolValue]){[self addHandle:[self canvasPoint:0 y:0 parameters:p] part:1];if(p.kind!=DYMaskBezier){for(int i=0;i<4;i++)[self addHandle:[self canvasPoint:((float[]){-.5,.5,.5,-.5})[i] y:((float[]){-.5,-.5,.5,.5})[i] parameters:p] part:2+i];}[self addHandle:[self canvasPoint:0 y:-.68 parameters:p] part:6];}
if(p.kind<4&&![mask[@"drawing"]boolValue]&&![mask[@"drawShape"]boolValue]){[self addHandle:[self canvasPoint:0 y:0 parameters:p] part:1];if(p.kind!=DYMaskBezier){for(int i=0;i<4;i++)[self addHandle:[self canvasPoint:((float[]){-.5,.5,.5,-.5})[i] y:((float[]){-.5,-.5,.5,.5})[i] parameters:p] part:2+i];}if(![mask[@"stampSource"]count])[self addHandle:[self canvasPoint:0 y:-.68 parameters:p] part:6];}
for(NSDictionary *handle in _handles){NSPoint point=[handle[@"point"]pointValue];NSRect rect=NSMakeRect(point.x-4*_uiScale,point.y-4*_uiScale,8*_uiScale,8*_uiScale);[[NSColor colorWithWhite:.1 alpha:1]setFill];[[NSBezierPath bezierPathWithOvalInRect:rect]fill];[NSColor.whiteColor setStroke];[[NSBezierPath bezierPathWithOvalInRect:rect]stroke];}
if([mask[@"drawing"]boolValue]){
NSShadow *shadow=[[[NSShadow alloc]init]autorelease];shadow.shadowColor=[NSColor colorWithWhite:0 alpha:.95];shadow.shadowBlurRadius=2;shadow.shadowOffset=NSZeroSize;
@@ -110,9 +111,13 @@
if(drawing)for(NSInteger i=9;i<=10;i++)if(NSPointInRect(point,[self toolbarRectForItem:i]))return 10000+i;
NSInteger viewerHit=[_viewerControls partAtPoint:point];if(viewerHit)return viewerHit;
if(_viewerControls.stampArmed)return NSPointInRect(point,_imageRect)?10014:0;
if([_mask[@"stampSource"]count]==4){
NSInteger count=[_mask[@"tracking"]boolValue]?1:3;
NSArray *source=_mask[@"stampSource"];
if(source.count==4){
BOOL tracking=[_mask[@"tracking"]boolValue];
NSInteger count=tracking?1:3;
for(NSInteger i=0;i<count;i++)if(NSPointInRect(point,[self stampControlRect:i]))return 10011+i;
NSPoint cross=[self canvasStampSource:NSMakePoint([source[0]doubleValue],[source[1]doubleValue])];
if(!tracking&&NSPointInRect(point,_imageRect)&&hypot(cross.x-point.x,cross.y-point.y)<=12*_uiScale)return DYCloneSourcePart;
}
if(!_mask)return 0;if([_mask[@"drawShape"]boolValue])return NSPointInRect(point,_imageRect)?1:0;
DYMaskParameters p;[_mask[@"parameters"]getBytes:&p length:sizeof(p)];p.imageAspect=_imageRect.size.width/MAX(1.,_imageRect.size.height);
@@ -124,9 +129,10 @@
- (BOOL)event:(NSEventType)type x:(double)x y:(double)y part:(NSInteger)part modifiers:(FxModifierKeys)modifiers key:(unichar)key time:(CMTime)time {@synchronized(self){
DYPlugIn *plugin=[self pluginAtTime:time];if(_eventDiagnostics++<12)os_log(OS_LOG_DEFAULT,"dayu_tool_osc_event type=%{public}ld part=%{public}ld x=%{public}.2f y=%{public}.2f plugin=%{public}d",(long)type,(long)part,x,y,plugin!=nil);[_viewerControls setBridge:[plugin viewerParameterBridge]];[_viewerControls setViewport:_imageRect];[_viewerControls prepareWithSize:NSMakeSize(_canvasWidth,_height) scale:_uiScale atTime:time];NSPoint canvasPoint=NSMakePoint(x,_height-y);
if(_maskCapturing&&plugin!=_maskCaptureOwner){_maskCapturing=NO;_maskCaptureOwner=nil;return NO;}
[self updateStampAtTime:time];
if(_stampSaving)return YES;
if(!_viewerControls.stampArmed)[self clearStampCreation];
if(type==NSEventTypeKeyDown&&key==27&&_viewerControls.stampArmed){
_viewerControls.stampArmed=NO;[self updateStampAtTime:time];return YES;
_viewerControls.stampArmed=NO;[self clearStampCreation];return YES;
}
if(type==NSEventTypeLeftMouseDown&&part>=10011&&part<=10013){
NSInteger direction=[_mask[@"tracking"]boolValue]?9:part-10012;
@@ -135,6 +141,7 @@
if(plugin&&_viewerControls.stampArmed&&NSWidth(_imageRect)>0&&NSHeight(_imageRect)>0){
NSPoint uv=NSMakePoint(fmax(0,fmin(1,(x-NSMinX(_imageRect))/NSWidth(_imageRect))),fmax(0,fmin(1,(canvasPoint.y-NSMinY(_imageRect))/NSHeight(_imageRect))));
if(type==NSEventTypeLeftMouseDown&&part==10014){
[_stampFailure release];_stampFailure=nil;
if(!_stampHasSource){_stampSource=uv;_stampHasSource=YES;}
else {_stampStart=_stampEnd=uv;_stampDragging=YES;}
return YES;
@@ -144,7 +151,21 @@
if(type==NSEventTypeLeftMouseUp){
NSRect target=[self stampTarget];_stampDragging=NO;
if(NSWidth(target)>=.001&&NSHeight(target)>=.001&&NSWidth(target)*NSWidth(_imageRect)>=3*_uiScale&&NSHeight(target)*NSHeight(_imageRect)>=3*_uiScale){
[plugin addCloneStampFrom:_stampSource target:target atTime:time];_viewerControls.stampArmed=NO;[self updateStampAtTime:time];
_stampSaving=YES;
DYViewerParameterBridge *bridge=_viewerControls.bridge;
[plugin addCloneStampFrom:_stampSource target:target atTime:time completion:^(NSString *failure){
@synchronized(self){
self->_stampSaving=NO;
if(self->_viewerControls.bridge!=bridge||!self->_viewerControls.stampArmed){[self clearStampCreation];return;}
self->_stampNeedsRedraw=YES;
if(failure){
[self->_stampFailure release];self->_stampFailure=[failure copy];
}else{
self->_viewerControls.stampArmed=NO;
[self clearStampCreation];
}
}
}];
}
}
return YES;
@@ -164,7 +185,7 @@
- (void)mouseUpAtPositionX:(double)x positionY:(double)y activePart:(NSInteger)part modifiers:(FxModifierKeys)m forceUpdate:(BOOL*)update atTime:(CMTime)t{BOOL result=[self event:NSEventTypeLeftMouseUp x:x y:y part:part modifiers:m key:0 time:t];if(update)*update=result;}
- (void)keyDownAtPositionX:(double)x positionY:(double)y keyPressed:(unsigned short)key modifiers:(FxModifierKeys)m forceUpdate:(BOOL*)update didHandle:(BOOL*)handled atTime:(CMTime)t{BOOL result=(key==27||key==13||key==10||key==3||key==8||key==127)&&[self event:NSEventTypeKeyDown x:x y:y part:1 modifiers:m key:key time:t];if(update)*update=result;if(handled)*handled=result;}
- (void)mouseMovedAtPositionX:(double)x positionY:(double)y activePart:(NSInteger)part modifiers:(FxModifierKeys)m forceUpdate:(BOOL*)update atTime:(CMTime)t{@synchronized(self){
DYPlugIn*plugin=[self pluginAtTime:t];[_viewerControls setBridge:[plugin viewerParameterBridge]];[_viewerControls setViewport:_imageRect];[_viewerControls prepareWithSize:NSMakeSize(_canvasWidth,_height) scale:_uiScale atTime:t];NSPoint point=NSMakePoint(x,_height-y);NSInteger viewerHit=[_viewerControls partAtPoint:point];BOOL redraw=[_viewerControls mouseMoved:point];NSDictionary *mask=[plugin toolCanvasMaskAtTime:t];BOOL drawing=[mask[@"drawing"]boolValue]||[mask[@"drawShape"]boolValue];NSCursor *cursor=[_viewerControls headerAtPoint:point]?([_viewerControls capturing]?NSCursor.closedHandCursor:NSCursor.openHandCursor):viewerHit?NSCursor.pointingHandCursor:part==10014?NSCursor.crosshairCursor:part>=10000?NSCursor.pointingHandCursor:(drawing||part>=1000)?NSCursor.crosshairCursor:part?NSCursor.openHandCursor:NSCursor.arrowCursor;[[_apiManager apiForProtocol:@protocol(FxOnScreenControlAPI_v4)]setCursor:cursor];if([mask[@"drawing"]boolValue]&&!viewerHit)[self event:NSEventTypeMouseMoved x:x y:y part:part modifiers:m key:0 time:t];if(update)*update=redraw||[mask[@"drawing"]boolValue];
DYPlugIn*plugin=[self pluginAtTime:t];[_viewerControls setBridge:[plugin viewerParameterBridge]];[_viewerControls setViewport:_imageRect];[_viewerControls prepareWithSize:NSMakeSize(_canvasWidth,_height) scale:_uiScale atTime:t];NSPoint point=NSMakePoint(x,_height-y);NSInteger viewerHit=[_viewerControls partAtPoint:point];BOOL redraw=[_viewerControls mouseMoved:point];NSDictionary *mask=[plugin toolCanvasMaskAtTime:t];BOOL drawing=[mask[@"drawing"]boolValue]||[mask[@"drawShape"]boolValue];NSCursor *cursor=[_viewerControls headerAtPoint:point]?([_viewerControls capturing]?NSCursor.closedHandCursor:NSCursor.openHandCursor):viewerHit?NSCursor.pointingHandCursor:part==10014?NSCursor.crosshairCursor:part>=10000?NSCursor.pointingHandCursor:(drawing||part>=1000)?NSCursor.crosshairCursor:part?NSCursor.openHandCursor:NSCursor.arrowCursor;[[_apiManager apiForProtocol:@protocol(FxOnScreenControlAPI_v4)]setCursor:cursor];if([mask[@"drawing"]boolValue]&&!viewerHit)[self event:NSEventTypeMouseMoved x:x y:y part:part modifiers:m key:0 time:t];if(update)*update=redraw||[mask[@"drawing"]boolValue]||_stampNeedsRedraw;_stampNeedsRedraw=NO;
}}
- (void)mouseEnteredAtPositionX:(double)x positionY:(double)y modifiers:(FxModifierKeys)m forceUpdate:(BOOL*)update atTime:(CMTime)t{[self mouseMovedAtPositionX:x positionY:y activePart:0 modifiers:m forceUpdate:update atTime:t];}
- (void)mouseExitedAtPositionX:(double)x positionY:(double)y modifiers:(FxModifierKeys)m forceUpdate:(BOOL*)update atTime:(CMTime)t{@synchronized(self){BOOL changed=[_viewerControls mouseExited];if(update)*update=changed;}}
+10 -1
查看文件
@@ -45,7 +45,16 @@ NSDictionary *DYShareToolMask(NSMutableDictionary *document,NSString *nodeID,NSS
NSDictionary *DYResolvedToolDocument(NSDictionary *document);
DYMaskParameters DYMaskAtTime(NSDictionary *mask,CMTime time);
NSDictionary *DYMaskKey(CMTime time,DYMaskParameters parameters,BOOL manual,float confidence);
BOOL DYMergeTracking(NSMutableDictionary *mask,NSArray *samples);
struct DYStampMotion {
float sourceOffsetX=0,sourceOffsetY=0;
float sourceScaleX=1,sourceScaleY=1,targetScaleX=1,targetScaleY=1;
bool active=false;
};
DYStampMotion DYStampMotionAtTime(NSDictionary *stamp,CMTime time);
NSArray *DYStampSourceAtTime(NSDictionary *stamp,CMTime time);
NSArray *DYStampSamplingScaleAtTime(NSDictionary *stamp,CMTime time);
NSDictionary *DYStampKey(CMTime time,DYMaskParameters parameters,BOOL manual,float confidence,DYStampMotion motion);
BOOL DYMergeTracking(NSMutableDictionary *mask,NSArray *samples,CMTime frameDuration=kCMTimeInvalid);
NSDictionary *DYToolRenderSnapshot(NSDictionary *document,CMTime time);
DYUniforms DYToolUniforms(NSDictionary *node);
BOOL DYToolIsNeutral(NSDictionary *node);
+138 -6
查看文件
@@ -1,3 +1,4 @@
#include <numeric>
#import "DYToolState.h"
#include "DYSpiderState.h"
#include "DYFilmMath.h"
@@ -62,6 +63,15 @@ NSMutableDictionary *DYMutablePlist(NSDictionary *value){
}
static NSDictionary *DYEmptyTools(){return @{@"schema":@1,@"layers":@[],@"baseMasks":@{}};}
static BOOL finiteNumber(id v){return [v isKindOfClass:NSNumber.class]&&std::isfinite([v doubleValue]);}
static BOOL validStampValues(id values,NSUInteger count,NSUInteger offsets,double minScale,double maxScale){
if(![values isKindOfClass:NSArray.class]||[values count]!=count)return NO;
for(NSUInteger i=0;i<count;i++){
if(!finiteNumber(values[i]))return NO;
double value=[values[i] doubleValue];
if(i<offsets?fabs(value)>1:value<minScale||value>maxScale)return NO;
}
return YES;
}
static BOOL validID(id v){return [v isKindOfClass:NSString.class]&&[[[NSUUID alloc]initWithUUIDString:v]autorelease]!=nil;}
static NSData *parameterData(DYMaskParameters p){return [NSData dataWithBytes:&p length:sizeof(p)];}
static BOOL readParameters(id data,DYMaskParameters *p){if(![data isKindOfClass:NSData.class]||[data length]!=sizeof(*p))return NO;[data getBytes:p length:sizeof(*p)];return dyValidMaskParameters(*p);}
@@ -76,9 +86,14 @@ BOOL DYValidToolMask(NSDictionary *mask){
if(p.kind!=DYMaskEllipse||![source isKindOfClass:NSArray.class]||[source count]!=4)return NO;
for(NSUInteger i=0;i<4;i++)if(!finiteNumber(source[i])||[source[i] doubleValue]<(i<2?0:.001)||[source[i] doubleValue]>1)return NO;
}
id samplingScale=mask[@"stampSamplingScale"];
if(samplingScale&&(!source||!validStampValues(samplingScale,2,0,1./256,256)))return NO;
const float *n=(const float*)nodes.bytes;for(NSUInteger i=0;i<nodes.length/4;i++)if(!std::isfinite(n[i])||fabs(n[i])>1000)return NO;
NSArray *keys=mask[@"keys"];if(![keys isKindOfClass:NSArray.class]||keys.count>DYToolKeyLimit)return NO;CMTime last=kCMTimeInvalid;
for(NSDictionary *k in keys){if(![k isKindOfClass:NSDictionary.class]||!finiteNumber(k[@"value"])||!finiteNumber(k[@"scale"])||!finiteNumber(k[@"epoch"])||!finiteNumber(k[@"manual"])||!finiteNumber(k[@"confidence"])||[k[@"confidence"]doubleValue]<0||[k[@"confidence"]doubleValue]>1)return NO;CMTime t=keyTime(k);DYMaskParameters q;if(!CMTIME_IS_NUMERIC(t)||!readParameters(k[@"parameters"],&q)||q.kind!=p.kind||(CMTIME_IS_NUMERIC(last)&&(last.epoch!=t.epoch||CMTimeCompare(last,t)>=0)))return NO;last=t;}return YES;
for(NSDictionary *k in keys){if(![k isKindOfClass:NSDictionary.class]||!finiteNumber(k[@"value"])||!finiteNumber(k[@"scale"])||!finiteNumber(k[@"epoch"])||!finiteNumber(k[@"manual"])||!finiteNumber(k[@"confidence"])||[k[@"confidence"]doubleValue]<0||[k[@"confidence"]doubleValue]>1)return NO;CMTime t=keyTime(k);DYMaskParameters q;if(!CMTIME_IS_NUMERIC(t)||!readParameters(k[@"parameters"],&q)||q.kind!=p.kind||(CMTIME_IS_NUMERIC(last)&&(last.epoch!=t.epoch||CMTimeCompare(last,t)>=0)))return NO;
if(k[@"stampMotion"]&&(!source||!validStampValues(k[@"stampMotion"],6,2,1./16,16)))return NO;
last=t;
}return YES;
}
static BOOL validMasks(id masks,NSMutableSet *ids,NSSet *sharedIDs,BOOL references){
if(![masks isKindOfClass:NSArray.class]||[masks count]>DYToolMaskLimit)return NO;NSMutableSet *links=[NSMutableSet set];
@@ -158,11 +173,123 @@ static NSDictionary *DYExpandSharedMasks(NSDictionary *doc,BOOL keepKeys){
for(NSString *type in doc[@"baseMasks"])base[type]=resolve([@"base:" stringByAppendingString:type]);out[@"baseMasks"]=base;NSMutableArray *layers=[NSMutableArray array];for(NSDictionary *node in doc[@"layers"]){NSMutableDictionary *copy=[[node mutableCopy]autorelease];copy[@"masks"]=resolve(node[@"id"]);[layers addObject:copy];}out[@"layers"]=layers;out[@"schema"]=@2;[out removeObjectForKey:@"sharedMasks"];return out;
}
NSDictionary *DYResolvedToolDocument(NSDictionary *doc){return DYExpandSharedMasks(doc,NO);}
DYMaskParameters DYMaskAtTime(NSDictionary *mask,CMTime time){DYMaskParameters p=dyDefaultMaskParameters();readParameters(mask[@"parameters"],&p);NSArray *keys=mask[@"keys"];if(!keys.count||!CMTIME_IS_NUMERIC(time))return p;if(keyTime(keys[0]).epoch!=time.epoch)return p;NSUInteger low=0,high=keys.count;while(low<high){NSUInteger mid=low+(high-low)/2;if(CMTimeCompare(keyTime(keys[mid]),time)<0)low=mid+1;else high=mid;}NSDictionary *left=keys[low?low-1:0],*right=keys[MIN(low,keys.count-1)];DYMaskParameters a,b;readParameters(left[@"parameters"],&a);readParameters(right[@"parameters"],&b);double duration=CMTimeGetSeconds(CMTimeSubtract(keyTime(right),keyTime(left)));float w=duration>0?fmax(0,fmin(1,CMTimeGetSeconds(CMTimeSubtract(time,keyTime(left)))/duration)):0;
// Only temporal geometry/feather/strength interpolate; key selection and levels stay authored.
float *v=&p.centerX,*av=&a.centerX,*bv=&b.centerX;for(int i=0;i<8;i++)v[i]=av[i]+(bv[i]-av[i])*w;return p;}
struct DYMaskKeySpan {
NSDictionary *left=nil,*right=nil;
float fraction=0;
};
static DYMaskKeySpan maskKeySpan(NSDictionary *mask,CMTime time){
NSArray *keys=mask[@"keys"];
if(!keys.count||!CMTIME_IS_NUMERIC(time)||keyTime(keys[0]).epoch!=time.epoch)return {};
NSUInteger low=0,high=keys.count;
while(low<high){
NSUInteger mid=low+(high-low)/2;
if(CMTimeCompare(keyTime(keys[mid]),time)<0)low=mid+1;
else high=mid;
}
NSDictionary *left=keys[low?low-1:0],*right=keys[MIN(low,keys.count-1)];
double duration=CMTimeGetSeconds(CMTimeSubtract(keyTime(right),keyTime(left)));
float fraction=duration>0?std::clamp(CMTimeGetSeconds(CMTimeSubtract(time,keyTime(left)))/duration,0.,1.):0;
return {left,right,fraction};
}
static DYStampMotion stampMotionFromKey(NSDictionary *key){
NSArray *v=key[@"stampMotion"];
if(!v)return {};
return {[v[0] floatValue],[v[1] floatValue],[v[2] floatValue],
[v[3] floatValue],[v[4] floatValue],[v[5] floatValue],true};
}
static DYStampMotion stampMotionInSpan(DYMaskKeySpan span){
auto a=stampMotionFromKey(span.left),b=stampMotionFromKey(span.right);
if(span.fraction<=0)return a;
if(span.fraction>=1)return b;
auto blend=[&](float x,float y){return x+(y-x)*span.fraction;};
return {blend(a.sourceOffsetX,b.sourceOffsetX),blend(a.sourceOffsetY,b.sourceOffsetY),
blend(a.sourceScaleX,b.sourceScaleX),blend(a.sourceScaleY,b.sourceScaleY),
blend(a.targetScaleX,b.targetScaleX),blend(a.targetScaleY,b.targetScaleY),a.active||b.active};
}
DYStampMotion DYStampMotionAtTime(NSDictionary *stamp,CMTime time){return stampMotionInSpan(maskKeySpan(stamp,time));}
NSArray *DYStampSourceAtTime(NSDictionary *stamp,CMTime time){
NSArray *source=stamp[@"stampSource"];
DYStampMotion motion=DYStampMotionAtTime(stamp,time);
if(!source||!motion.active)return source;
return @[@(std::clamp([source[0] doubleValue]+motion.sourceOffsetX,0.,1.)),
@(std::clamp([source[1] doubleValue]+motion.sourceOffsetY,0.,1.)),source[2],source[3]];
}
NSArray *DYStampSamplingScaleAtTime(NSDictionary *stamp,CMTime time){
NSArray *base=stamp[@"stampSamplingScale"];
DYStampMotion motion=DYStampMotionAtTime(stamp,time);
if(!motion.active)return base;
double x=(base?[base[0] doubleValue]:1)*motion.sourceScaleX/motion.targetScaleX;
double y=(base?[base[1] doubleValue]:1)*motion.sourceScaleY/motion.targetScaleY;
return @[@(std::clamp(x,1./256,256.)),@(std::clamp(y,1./256,256.))];
}
DYMaskParameters DYMaskAtTime(NSDictionary *mask,CMTime time){
DYMaskParameters p=dyDefaultMaskParameters();
readParameters(mask[@"parameters"],&p);
BOOL stamp=mask[@"stampSource"]!=nil;
if(stamp)p.angle=0;
DYMaskKeySpan span=maskKeySpan(mask,time);
if(!span.left)return p;
DYMaskParameters a,b;
readParameters(span.left[@"parameters"],&a);readParameters(span.right[@"parameters"],&b);
float *v=&p.centerX,*av=&a.centerX,*bv=&b.centerX;
for(int i=0;i<(stamp?2:8);i++)v[i]=av[i]+(bv[i]-av[i])*span.fraction;
if(stamp){
DYStampMotion motion=stampMotionInSpan(span);
if(motion.active){
p.width=std::clamp(p.width*motion.targetScaleX,.001f,4000.f);
p.height=std::clamp(p.height*motion.targetScaleY,.001f,4000.f);
}
}
return p;
}
NSDictionary *DYMaskKey(CMTime t,DYMaskParameters p,BOOL manual,float confidence){return @{@"value":@(t.value),@"scale":@(t.timescale),@"epoch":@(t.epoch),@"parameters":parameterData(p),@"manual":@(manual),@"confidence":@(confidence)};}
BOOL DYMergeTracking(NSMutableDictionary *m,NSArray *samples){if(!samples.count)return YES;NSMutableArray *all=[NSMutableArray array];CMTime lo=keyTime(samples.firstObject),hi=keyTime(samples.lastObject);if(CMTimeCompare(lo,hi)>0)std::swap(lo,hi);for(NSDictionary *key in m[@"keys"])if([key[@"manual"]boolValue]||CMTimeCompare(keyTime(key),lo)<0||CMTimeCompare(keyTime(key),hi)>0)[all addObject:key];for(NSDictionary *key in samples){BOOL manual=NO;for(NSDictionary *old in all)if(CMTimeCompare(keyTime(old),keyTime(key))==0){manual=YES;break;}if(!manual)[all addObject:key];}[all sortUsingComparator:^NSComparisonResult(NSDictionary *a,NSDictionary *b){return (NSComparisonResult)CMTimeCompare(keyTime(a),keyTime(b));}];NSMutableDictionary *candidate=DYMutablePlist(m);candidate[@"keys"]=all;if(!DYValidToolMask(candidate))return NO;m[@"keys"]=all;return YES;}
NSDictionary *DYStampKey(CMTime time,DYMaskParameters p,BOOL manual,float confidence,DYStampMotion motion){
NSDictionary *key=DYMaskKey(time,p,manual,confidence);
if(!motion.active)return key;
NSMutableDictionary *paired=[[key mutableCopy]autorelease];
paired[@"stampMotion"]=@[@(motion.sourceOffsetX),@(motion.sourceOffsetY),@(motion.sourceScaleX),
@(motion.sourceScaleY),@(motion.targetScaleX),@(motion.targetScaleY)];
return paired;
}
BOOL DYMergeTracking(NSMutableDictionary *m,NSArray *samples,CMTime frameDuration){
if(!samples.count)return YES;
NSMutableArray *all=[NSMutableArray array];
NSMutableDictionary *manualByTime=[NSMutableDictionary dictionary];
CMTime lo=keyTime(samples.firstObject),hi=keyTime(samples.lastObject);
if(CMTimeCompare(lo,hi)>0)std::swap(lo,hi);
if(m[@"stampSource"]&&CMTIME_IS_NUMERIC(frameDuration)&&frameDuration.value>0){
// FCP can shift analysis timestamps by a fraction of a frame between passes.
// Replace an older automatic key belonging to the first or last new frame.
CMTime half=CMTimeMultiplyByRatio(frameDuration,1,2);
lo=CMTimeSubtract(lo,half);hi=CMTimeAdd(hi,half);
}
// Normalize equivalent time fractions when preserving authored keys.
auto timeID=[](NSDictionary *key){
CMTime time=keyTime(key);
int64_t divisor=time.timescale>0?std::gcd(time.value%time.timescale,int64_t(time.timescale)):1;
return [NSString stringWithFormat:@"%lld/%lld/%lld",time.value/divisor,time.timescale/divisor,time.epoch];
};
for(NSDictionary *key in m[@"keys"]){
if([key[@"manual"] boolValue]){manualByTime[timeID(key)]=@(all.count);[all addObject:key];}
else if(CMTimeCompare(keyTime(key),lo)<0||CMTimeCompare(keyTime(key),hi)>0)[all addObject:key];
}
for(NSDictionary *key in samples){
NSNumber *index=manualByTime[timeID(key)];
if(!index){[all addObject:key];continue;}
if(key[@"stampMotion"]){
NSUInteger slot=index.unsignedIntegerValue;
NSMutableDictionary *authored=[[all[slot] mutableCopy]autorelease];
authored[@"stampMotion"]=key[@"stampMotion"];
all[slot]=authored;
}
}
[all sortUsingComparator:^NSComparisonResult(NSDictionary *a,NSDictionary *b){return (NSComparisonResult)CMTimeCompare(keyTime(a),keyTime(b));}];
NSMutableDictionary *candidate=[[m mutableCopy]autorelease];
candidate[@"keys"]=all;
if(!DYValidToolMask(candidate))return NO;
m[@"keys"]=all;
return YES;
}
NSDictionary *DYToolRenderSnapshot(NSDictionary *doc,CMTime t){
NSArray *shared=DYSharedMasks(doc);
doc=DYExpandSharedMasks(doc,YES);
@@ -170,7 +297,12 @@ NSDictionary *DYToolRenderSnapshot(NSDictionary *doc,CMTime t){
NSMutableArray *result=[NSMutableArray arrayWithCapacity:masks.count];
for(NSDictionary *mask in masks){
if(![mask[@"keys"]count]){[result addObject:mask];continue;}
NSMutableDictionary *m=[[mask mutableCopy]autorelease];m[@"parameters"]=parameterData(DYMaskAtTime(mask,t));m[@"keys"]=@[];[result addObject:m];
NSMutableDictionary *m=[[mask mutableCopy]autorelease];m[@"parameters"]=parameterData(DYMaskAtTime(mask,t));m[@"keys"]=@[];
if(mask[@"stampSource"]){
m[@"stampSource"]=DYStampSourceAtTime(mask,t);
m[@"stampSamplingScale"]=DYStampSamplingScaleAtTime(mask,t);
}
[result addObject:m];
}
return result;
};
@@ -66,5 +66,79 @@
[NSNotificationCenter.defaultCenter postNotificationName:@"DYToolTrackingStatus" object:host userInfo:@{@"node":@"shared",@"mask":sharedID,@"message":@"共享跟踪状态"}];BOOL statusVisible=[[[panel valueForKey:@"_status"]stringValue]isEqual:@"共享跟踪状态"];
run.record(@"shared-mask-inspector-alias-activates-canvas-and-receives-canonical-status",aliasActive&&statusVisible&&[[(NSObject*)plugin valueForKey:@"_selectedToolNode"]isEqual:@"shared"]);
}
{
NSMutableDictionary *stampDoc=DYMutablePlist([[[DYToolDocument alloc]init]autorelease].document);
NSMutableDictionary *stamp=(id)DYAddSharedMask(stampDoc,DYMaskEllipse);
NSString *stampID=stamp[@"id"];
DYMaskParameters target=DYMaskAtTime(stamp,kCMTimeZero);
target.centerX=.75f;target.centerY=.5f;target.width=.32f;target.height=.54f;
stamp[@"parameters"]=[NSData dataWithBytes:&target length:sizeof(target)];
stamp[@"stampSource"]=@[@.25,@.5,@.32,@.54];
auto noise=[](int x,int y){
uint32_t n=uint32_t(x)*73856093u^uint32_t(y)*19349663u;
n^=n>>13;n*=1274126177u;
return .15f+.7f*((n>>8)&255)/255.f;
};
auto pairedFrame=[&](int step,bool flatSource){
Pixels pixels(tw*th*4);
for(NSUInteger y=0;y<th;y++)for(NSUInteger x=0;x<tw;x++){
bool source=x<tw/2;
float cx=tw*(source?.25f:.75f),cy=th*.5f,scale=1+step*(source?-.025f:.035f);
float u=(cx+(float(x)-cx-step*(source?-1.5f:2.f))/scale)/4;
float v=(cy+(float(y)-cy-step*(source?1.f:-.75f))/scale)/4;
int ix=int(floorf(u)),iy=int(floorf(v));float fx=u-ix,fy=v-iy;
float top=noise(ix,iy)*(1-fx)+noise(ix+1,iy)*fx;
float bottom=noise(ix,iy+1)*(1-fx)+noise(ix+1,iy+1)*fx;
float code=source&&flatSource?.4f:top*(1-fy)+bottom*fy;
float linear=powf((code+.055f)/1.055f,2.4f);
auto index=(y*tw+x)*4;pixels[index]=pixels[index+1]=pixels[index+2]=linear;pixels[index+3]=1;
}
[[frame metalTextureForDevice:gpu]replaceRegion:MTLRegionMake2D(0,0,tw,th) mipmapLevel:0 withBytes:pixels.data() bytesPerRow:tw*8];
};
auto requestStamp=[&](int start){
host->_time=timeAt(start);host->_state=kFxAnalysisState_NotAnalyzing;
[plugin toolTrackRequested:[NSNotification notificationWithName:@"DYToolTrack" object:host userInfo:@{@"node":@"shared",@"mask":stampID,@"direction":@1}]];
return [plugin desiredAnalysisTimeRange:&desired forInputWithTimeRange:inputRange error:nil]&&
[plugin setupAnalysisForTimeRange:desired frameDuration:timeAt(1) error:nil];
};
auto finish=[&](){host->_state=kFxAnalysisState_AnalysisCompleted;[plugin cleanupAnalysis:nil];drain();};
DYWriteTools(base,stampDoc,kCMTimeZero);
int beforeStamp=base->_undoStarts;
BOOL paired=requestStamp(0);
NSError *pairError=nil;
for(int i=0;i<6&&paired;i++){pairedFrame(i,false);paired&=[plugin analyzeFrame:frame atTime:timeAt(i) error:&pairError];}
finish();
NSDictionary *saved=DYSharedMaskWithID(DYReadTools(base,kCMTimeZero).document,stampID);
DYStampMotion motion=DYStampMotionAtTime(saved,timeAt(5));
DYMaskParameters covered=DYMaskAtTime(saved,timeAt(5));
NSArray *sampled=DYStampSourceAtTime(saved,timeAt(5));
run.record(@"host-clone-stamp-follows-two-independent-centers-and-scales",
paired&&[saved[@"keys"] count]==6&&motion.active&&
fabs(covered.centerX-(.75+10./tw))<.006&&fabs(covered.centerY-(.5-3.75/th))<.008&&
fabs([sampled[0] doubleValue]-(.25-7.5/tw))<.006&&fabs([sampled[1] doubleValue]-(.5+5./th))<.008&&
fabs(motion.targetScaleX-1.175)<.045&&fabs(motion.targetScaleY-1.175)<.045&&
fabs(motion.sourceScaleX-.875)<.04&&fabs(motion.sourceScaleY-.875)<.04&&base->_undoStarts==beforeStamp+1,
@{@"keys":@([saved[@"keys"] count]),@"source":sampled?:@[],@"target":@[@(covered.centerX),@(covered.centerY)],
@"sourceScale":@[@(motion.sourceScaleX),@(motion.sourceScaleY)],
@"targetScale":@[@(motion.targetScaleX),@(motion.targetScaleY)],@"error":reason(pairError)});
DYStampMotion restart=DYStampMotionAtTime(saved,timeAt(2));
paired=requestStamp(2);
for(int i=2;i<6&&paired;i++){pairedFrame(i,false);paired&=[plugin analyzeFrame:frame atTime:timeAt(i) error:nil];}
finish();
saved=DYSharedMaskWithID(DYReadTools(base,kCMTimeZero).document,stampID);
DYStampMotion resumed=DYStampMotionAtTime(saved,timeAt(2));
run.record(@"host-clone-stamp-restarts-from-current-paired-scale",
paired&&[saved[@"keys"] count]==6&&resumed.active&&restart.sourceScaleX==resumed.sourceScaleX&&restart.targetScaleX==resumed.targetScaleX);
DYWriteTools(base,stampDoc,kCMTimeZero);
paired=requestStamp(0);
for(int i=0;i<3&&paired;i++){pairedFrame(i,false);paired&=[plugin analyzeFrame:frame atTime:timeAt(i) error:nil];}
pairedFrame(3,true);NSError *sourceLoss=nil;
BOOL ended=![plugin analyzeFrame:frame atTime:timeAt(3) error:&sourceLoss];
finish();
saved=DYSharedMaskWithID(DYReadTools(base,kCMTimeZero).document,stampID);
run.record(@"host-clone-stamp-source-loss-stops-both-tracks-at-last-paired-frame",
paired&&ended&&[saved[@"keys"] count]==3&&[sourceLoss.domain isEqual:FxPlugErrorDomain]&&
sourceLoss.code==kFxError_UserCancelled&&[sourceLoss.localizedDescription containsString:@"取样区域"]);
}
[plugin release];
}
+3 -3
查看文件
@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.13.0</string>
<string>1.14.0</string>
<key>CFBundleVersion</key>
<string>83</string>
<string>90</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>PlugInKit</key>
@@ -71,7 +71,7 @@
<key>uuid</key>
<string>1C17B73B-F229-4C09-A434-EAF6DFF5F22A</string>
<key>version</key>
<string>1.13.0</string>
<string>1.14.0</string>
</dict>
<dict>
<key>className</key>
+19 -1
查看文件
@@ -1,5 +1,23 @@
#import <FxPlug/FxPlugSDK.h>
#import "DYDiagnostics.h"
#import "../Shared/DYBetaDiagnostics.h"
#import "../Shared/DYCodeIntegrity.h"
#include <string.h>
int main(int argc,const char*argv[]){@autoreleasepool{if(argc==2&&strcmp(argv[1],"--self-test")==0)return DYRunDiagnostics();DYBetaStart();[FxPrincipal startServicePrincipal];DYBetaStop();return 0;}}
#include <sysexits.h>
int main(int argc, const char *argv[]) {
@autoreleasepool {
NSString *component = nil;
OSStatus status = DYValidateRunningInstallation(DYCodeRoleService, &component);
if (status != errSecSuccess) {
NSLog(@"大鱼调色拒绝启动插件服务,验签失败 (%@, %d)。%@", component, (int)status,
DYIntegrityRecoveryMessage);
return EX_CONFIG;
}
if (argc == 2 && strcmp(argv[1], "--self-test") == 0) return DYRunDiagnostics();
DYBetaStart();
[FxPrincipal startServicePrincipal];
DYBetaStop();
return 0;
}
}
+13
查看文件
@@ -0,0 +1,13 @@
#import <Foundation/Foundation.h>
#import <Security/Security.h>
typedef NS_ENUM(NSInteger, DYCodeRole) {
DYCodeRoleWrapper,
DYCodeRoleService,
};
FOUNDATION_EXPORT NSString *const DYPluginRelativePath;
FOUNDATION_EXPORT NSString *const DYIntegrityRecoveryMessage;
FOUNDATION_EXPORT OSStatus DYValidateSignedInstallation(NSURL *wrapperURL, NSString **failedComponent);
FOUNDATION_EXPORT OSStatus DYValidateRunningInstallation(DYCodeRole role, NSString **failedComponent);
+88
查看文件
@@ -0,0 +1,88 @@
#import "DYCodeIntegrity.h"
NSString *const DYPluginRelativePath = @"Contents/PlugIns/大鱼调色 XPC Service.pluginkit";
NSString *const DYIntegrityRecoveryMessage = @"大鱼调色未通过官方签名或完整性验证。请使用原始安装包重新安装。";
static NSString *const DYWrapperIdentifier = @"com.dayu.color";
static NSString *const DYServiceIdentifier = @"com.dayu.color.XPC";
static OSStatus DYCreateSigningRequirement(NSString *identifier, SecRequirementRef *requirement) {
// Pin the Developer ID team and signing identifier, allowing certificate renewal.
NSString *text = [NSString stringWithFormat:
@"identifier \"%@\" and anchor apple generic and "
"certificate 1[field.1.2.840.113635.100.6.2.6] exists and "
"certificate leaf[field.1.2.840.113635.100.6.1.13] exists and "
"certificate leaf[subject.OU] = \"B3W25FX5H5\"", identifier];
return SecRequirementCreateWithString((__bridge CFStringRef)text, kSecCSDefaultFlags, requirement);
}
static OSStatus DYValidateRunningCode(NSString *identifier) {
SecRequirementRef requirement = NULL;
OSStatus status = DYCreateSigningRequirement(identifier, &requirement);
if (status != errSecSuccess) return status;
SecCodeRef code = NULL;
status = SecCodeCopySelf(kSecCSDefaultFlags, &code);
if (status == errSecSuccess) {
status = SecCodeCheckValidity(code, kSecCSDefaultFlags, requirement);
CFRelease(code);
}
CFRelease(requirement);
return status;
}
static OSStatus DYValidateBundle(NSURL *url, NSString *identifier, SecCSFlags flags) {
SecRequirementRef requirement = NULL;
OSStatus status = DYCreateSigningRequirement(identifier, &requirement);
if (status != errSecSuccess) return status;
SecStaticCodeRef code = NULL;
status = SecStaticCodeCreateWithPath((__bridge CFURLRef)url, kSecCSDefaultFlags, &code);
if (status == errSecSuccess) {
status = SecStaticCodeCheckValidity(code, flags | kSecCSStrictValidate | kSecCSCheckAllArchitectures,
requirement);
CFRelease(code);
}
CFRelease(requirement);
return status;
}
OSStatus DYValidateSignedInstallation(NSURL *wrapperURL, NSString **failedComponent) {
if (failedComponent) *failedComponent = @"wrapper";
OSStatus status = DYValidateBundle(wrapperURL, DYWrapperIdentifier, kSecCSDefaultFlags);
if (status != errSecSuccess) return status;
if (failedComponent) *failedComponent = @"service";
NSURL *serviceURL = [wrapperURL URLByAppendingPathComponent:DYPluginRelativePath isDirectory:YES];
status = DYValidateBundle(serviceURL, DYServiceIdentifier, kSecCSCheckNestedCode);
if (status != errSecSuccess) return status;
// A separately signed older service with the same identity must not be mixed into this build.
NSDictionary *wrapper = [NSDictionary dictionaryWithContentsOfURL:[wrapperURL URLByAppendingPathComponent:@"Contents/Info.plist"]];
NSDictionary *service = [NSDictionary dictionaryWithContentsOfURL:[serviceURL URLByAppendingPathComponent:@"Contents/Info.plist"]];
if (failedComponent) *failedComponent = @"component-build";
if (![wrapper[@"CFBundleVersion"] isEqual:service[@"CFBundleVersion"]] ||
![wrapper[@"CFBundleShortVersionString"] isEqual:service[@"CFBundleShortVersionString"]]) return errSecCSReqFailed;
if (failedComponent) *failedComponent = nil;
return errSecSuccess;
}
OSStatus DYValidateRunningInstallation(DYCodeRole role, NSString **failedComponent) {
BOOL isService = role == DYCodeRoleService;
if (failedComponent) *failedComponent = isService ? @"running-service" : @"running-wrapper";
OSStatus status = DYValidateRunningCode(isService ? DYServiceIdentifier : DYWrapperIdentifier);
if (status != errSecSuccess) return status;
NSURL *bundleURL = NSBundle.mainBundle.bundleURL.URLByResolvingSymlinksInPath;
NSURL *wrapperURL = bundleURL;
if (isService) {
// The service must be embedded in the wrapper being verified.
for (NSInteger level = 0; level < 3; level++) wrapperURL = wrapperURL.URLByDeletingLastPathComponent;
NSURL *expected = [wrapperURL URLByAppendingPathComponent:DYPluginRelativePath isDirectory:YES];
if (failedComponent) *failedComponent = @"service-location";
if (![wrapperURL.pathExtension isEqualToString:@"app"] ||
![bundleURL.path isEqualToString:expected.path]) return errSecCSBadBundleFormat;
}
return DYValidateSignedInstallation(wrapperURL, failedComponent);
}
+73 -9
查看文件
@@ -1,9 +1,16 @@
#import "AppDelegate.h"
#import "DYBetaUpdater.h"
#import "../Shared/DYBetaDiagnostics.h"
#import "../Shared/DYCodeIntegrity.h"
static NSString *const DYPluginID = @"com.dayu.color.XPC";
static NSString *const DYReleaseAddress = @"https://dayu.media";
static dispatch_queue_t DYPluginRegistrationQueue(void) {
static dispatch_queue_t queue;
static dispatch_once_t once;
dispatch_once(&once, ^{ queue = dispatch_queue_create("com.dayu.color.registration", DISPATCH_QUEUE_SERIAL); });
return queue;
}
static NSColor *DYColor(CGFloat r, CGFloat g, CGFloat b) { return [NSColor colorWithSRGBRed:r green:g blue:b alpha:1]; }
static NSColor *DYBlue(void) { return DYColor(.36,.65,1); }
static NSColor *DYGreen(void) { return DYColor(.26,.86,.53); }
@@ -125,6 +132,7 @@ typedef NS_ENUM(NSInteger,DYRegistrationState) { DYChecking, DYRegistering, DYRe
@property(assign) NSProgressIndicator *updateProgress;
@property(retain) NSTimer *updateProgressTimer;
@property BOOL updateCheckDone;
@property BOOL integrityRejected;
@end
@implementation AppDelegate
@@ -278,32 +286,84 @@ typedef NS_ENUM(NSInteger,DYRegistrationState) { DYChecking, DYRegistering, DYRe
}
return NO;
}
- (BOOL)registry:(NSDictionary *)query listsExactPath:(NSString *)path {
NSString *suffix = [@"\t" stringByAppendingString:path];
for (NSString *line in [query[@"output"] componentsSeparatedByCharactersInSet:NSCharacterSet.newlineCharacterSet]) {
if ([line hasSuffix:suffix]) return YES;
}
return NO;
}
- (NSString *)removeRejectedPluginRegistration:(NSString *)path {
NSArray *arguments = @[@"-m",@"-A",@"-D",@"-v",@"-i",DYPluginID];
NSDictionary *before = [self runPluginKit:arguments];
if ([before[@"code"] intValue] != 0) return @"query-failed";
if (![self registry:before listsExactPath:path]) return @"not-registered";
if (![path.stringByStandardizingPath isEqualToString:path.stringByResolvingSymlinksInPath]) return @"skipped-symlink";
[self runPluginKit:@[@"-r",path]];
NSDictionary *after = [self runPluginKit:arguments];
if ([after[@"code"] intValue] != 0 || [self registry:after listsExactPath:path]) return @"removal-unverified";
return @"removed";
}
- (void)rejectModifiedInstallation:(NSDictionary *)results {
if (self.integrityRejected || self.terminating) return;
self.integrityRejected = YES;
[self.updater stopForIntegrityFailure];
[self finishRegistration:NO details:DYIntegrityRecoveryMessage results:results];
self.retryButton.enabled = NO;
self.exitDetail.stringValue = @"此副本的自动更新已停用。请安装原始安装包后重新打开。";
NSString *path = [NSBundle.mainBundle.bundlePath stringByAppendingPathComponent:DYPluginRelativePath];
dispatch_async(DYPluginRegistrationQueue(), ^{
@autoreleasepool {
NSString *removal = [self removeRejectedPluginRegistration:path];
dispatch_async(dispatch_get_main_queue(), ^{
self.diagnostics[@"registrationRevocation"] = removal;
[self writeDiagnostics];
});
}
});
}
- (void)checkRegistration:(id)sender {
if (self.integrityRejected) return;
if (self.diagnostics && (self.registrationState == DYChecking || self.registrationState == DYRegistering)) return;
[self.exitTimer invalidate]; self.exitTimer = nil; self.registrationState = DYChecking;
self.retryButton.enabled = NO; self.retryButton.title = @"检查中…";
self.statusTitle.stringValue = @"正在检查插件…"; self.statusTitle.textColor = NSColor.whiteColor;
self.statusDetail.stringValue = @"正在检查本机插件登记,随后自动提交注册。";
self.progress.indeterminate = YES; [self.progress startAnimation:nil];
NSString *path = [NSBundle.mainBundle.bundlePath stringByAppendingPathComponent:@"Contents/PlugIns/大鱼调色 XPC Service.pluginkit"];
NSString *path = [NSBundle.mainBundle.bundlePath stringByAppendingPathComponent:DYPluginRelativePath];
self.diagnostics = [NSMutableDictionary dictionaryWithDictionary:@{
@"bundleID":NSBundle.mainBundle.bundleIdentifier,@"version":[NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"],
@"build":[NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"],@"executable":NSBundle.mainBundle.executablePath,
@"bundleID":NSBundle.mainBundle.bundleIdentifier ?: @"",@"version":[NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"] ?: @"",
@"build":[NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"] ?: @"",@"executable":NSBundle.mainBundle.executablePath ?: @"",
@"pid":@(NSProcessInfo.processInfo.processIdentifier),@"plugin":path,@"status":@"checking"}];
dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED,0), ^{
dispatch_async(DYPluginRegistrationQueue(), ^{
@autoreleasepool {
NSString *failedComponent = nil;
OSStatus status = DYValidateRunningInstallation(DYCodeRoleWrapper, &failedComponent);
if (status != errSecSuccess) {
NSDictionary *results = @{@"integrity":@"rejected", @"integrityComponent":failedComponent,
@"integrityOSStatus":@(status)};
dispatch_async(dispatch_get_main_queue(), ^{
[self rejectModifiedInstallation:results];
});
return;
}
NSBundle *plugin = [NSBundle bundleWithPath:path];
NSDictionary *attributes = [plugin objectForInfoDictionaryKey:@"PlugInKit"][@"Attributes"];
BOOL validComponent = [plugin.bundleIdentifier isEqualToString:DYPluginID] &&
[[plugin objectForInfoDictionaryKey:@"CFBundleVersion"] isEqual:[NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"]] &&
[attributes[@"com.apple.protocol"] isEqual:@"FxPlug"] && [attributes[@"com.apple.version"] isEqual:@"1.1"];
if (!validComponent) {
dispatch_async(dispatch_get_main_queue(), ^{ [self finishRegistration:NO details:@"未找到完整的插件组件。请从发布地址重新安装大鱼调色。" results:@{}]; }); return;
dispatch_async(dispatch_get_main_queue(), ^{
if (!self.integrityRejected)
[self finishRegistration:NO details:@"未找到完整的插件组件。请从发布地址重新安装大鱼调色。" results:@{}];
}); return;
}
// The stand-alone wrapper can inspect the registry directly. Registration
// and actual host rendering remain separate states; the user confirms FCP.
NSDictionary *before = [self runPluginKit:@[@"-m",@"-v",@"-i",DYPluginID]];
dispatch_async(dispatch_get_main_queue(), ^{
if (self.integrityRejected) return;
self.registrationState = DYRegistering; self.statusTitle.stringValue = @"正在注册插件…";
self.statusDetail.stringValue = @"正在向系统提交插件注册,并核对当前安装位置。";
});
@@ -318,10 +378,12 @@ typedef NS_ENUM(NSInteger,DYRegistrationState) { DYChecking, DYRegistering, DYRe
NSString *message = registered ?
@"已确认当前插件登记。请在 Final Cut Pro 中实际应用并确认效果正常;若宿主已打开,请保存后重新打开。" :
@"插件注册尚未完成。请点击“重新检查”,或重新安装后再试。窗口将保持打开。";
NSDictionary *results = @{@"before":before,@"submission":add,@"after":after ?: @{},@"registered":@(registered),
NSDictionary *results = @{@"integrity":@"verified",@"before":before,@"submission":add,@"after":after ?: @{},@"registered":@(registered),
@"discoveryVerified":@(registered),@"submissionAccepted":@(submissionAccepted),@"hostVerification":@"awaiting-user-confirmation",
@"confirmationMethod":registered ? @"exact-path-discovery" : @"unconfirmed"};
dispatch_async(dispatch_get_main_queue(), ^{ [self finishRegistration:registered details:message results:results]; });
dispatch_async(dispatch_get_main_queue(), ^{
if (!self.integrityRejected) [self finishRegistration:registered details:message results:results];
});
}
});
}
@@ -330,7 +392,7 @@ typedef NS_ENUM(NSInteger,DYRegistrationState) { DYChecking, DYRegistering, DYRe
self.registrationState = success ? DYReady : DYFailed;
[self.progress stopAnimation:nil]; self.progress.indeterminate = NO; self.progress.doubleValue = success ? 100 : 0;
self.registrationCard.tint = success ? DYGreen() : DYColor(1,.67,.30); [self.registrationCard setNeedsDisplay:YES];
self.statusTitle.stringValue = success ? @"✓ 插件注册成功" : @"需要重新检查";
self.statusTitle.stringValue = success ? @"✓ 插件注册成功" : (self.integrityRejected ? @"安装完整性验证失败" : @"需要重新检查");
self.statusTitle.textColor = success ? DYGreen() : DYColor(1,.75,.4); self.statusDetail.stringValue = details;
self.retryButton.title = @"重新检查"; self.retryButton.enabled = YES;
self.confirmationButton.enabled = success;
@@ -352,12 +414,14 @@ typedef NS_ENUM(NSInteger,DYRegistrationState) { DYChecking, DYRegistering, DYRe
- (void)updateChanged:(NSDictionary *)state {
if(self.terminating)return;
NSString *phase=state[@"phase"];
BOOL rejected = [phase isEqual:@"integrity_rejected"];
if (rejected) [self rejectModifiedInstallation:@{@"integrity":@"rejected"}];
BOOL busy=[@[@"checking",@"downloading",@"validating"]containsObject:phase];
BOOL available=[@[@"available",@"ready",@"host_wait",@"installer"]containsObject:phase];
if(![phase isEqual:@"checking"]){self.updateCheckDone=YES;if(available)[self keepIntroduction:nil];}
self.updateTitle.stringValue=[phase isEqual:@"available"]?state[@"message"]:@"公测更新";
self.updateDetail.stringValue=state[@"message"]?:@"";
self.updateCheckButton.enabled=!busy;
self.updateCheckButton.enabled=!busy && !rejected;
self.updateInstallButton.enabled=[@[@"available",@"ready",@"host_wait",@"installer"]containsObject:phase];
self.updateInstallButton.title=[phase isEqual:@"available"]?@"下载更新":@"安装更新";
self.updateCancelButton.hidden=![phase isEqual:@"downloading"];
@@ -6,6 +6,7 @@
- (void)check;
- (void)download;
- (void)install;
- (void)stopForIntegrityFailure;
- (void)cancel;
+ (BOOL)validateManifest:(NSDictionary *)manifest error:(NSError **)error;
+ (BOOL)validatePackage:(NSURL *)package manifest:(NSDictionary *)manifest error:(NSError **)error;
@@ -1,5 +1,6 @@
#import "DYBetaUpdater.h"
#import "../Shared/DYBetaDiagnostics.h"
#import "../Shared/DYCodeIntegrity.h"
#import <AppKit/AppKit.h>
#import <CommonCrypto/CommonDigest.h>
#include <atomic>
@@ -31,6 +32,7 @@ static NSString *command(NSString *path,NSArray *arguments,NSError **error) {
NSURL *_package;
NSDictionary *_state,*_manifest;
std::atomic_uint _generation;
BOOL _integrityRejected;
}
- (void)emit:(NSString *)phase message:(NSString *)message;
@end
@@ -57,6 +59,21 @@ static NSString *command(NSString *path,NSArray *arguments,NSError **error) {
if(!NSThread.isMainThread){dispatch_async(dispatch_get_main_queue(),^{[self emit:phase message:message];});return;}
[_state release];_state=[@{@"phase":phase,@"message":message?:@"",@"version":_manifest[@"version"]?:@""}copy];if(self.changed)self.changed(_state);
}
- (BOOL)requireOfficialInstallation {
if (_integrityRejected) return NO;
if (DYValidateRunningInstallation(DYCodeRoleWrapper, NULL) == errSecSuccess) return YES;
[self stopForIntegrityFailure];
return NO;
}
- (void)stopForIntegrityFailure {
if (_integrityRejected) return;
_integrityRejected = YES;
++_generation;
[_task cancel];
[_manifest release]; _manifest = nil;
[_package release]; _package = nil;
[self emit:@"integrity_rejected" message:DYIntegrityRecoveryMessage];
}
+ (BOOL)validateManifest:(NSDictionary *)manifest error:(NSError **)error {
if(![manifest isKindOfClass:NSDictionary.class]){if(error)*error=DYUpdateError(@"公测更新清单格式错误。");return NO;}
id build=manifest[@"build"],size=manifest[@"size"];
@@ -90,13 +107,12 @@ static NSString *command(NSString *path,NSArray *arguments,NSError **error) {
}
if(apps.count!=1){if(error)*error=DYUpdateError(@"更新包必须包含一个完整的大鱼调色 APP。");return NO;}
NSURL *app=apps.firstObject;NSDictionary *info=[NSDictionary dictionaryWithContentsOfURL:[app URLByAppendingPathComponent:@"Contents/Info.plist"]];
NSDictionary *plugin=[NSDictionary dictionaryWithContentsOfURL:[app URLByAppendingPathComponent:@"Contents/PlugIns/大鱼调色 XPC Service.pluginkit/Contents/Info.plist"]];
NSURL *service=[app URLByAppendingPathComponent:DYPluginRelativePath isDirectory:YES];
NSDictionary *plugin=[NSDictionary dictionaryWithContentsOfURL:[service URLByAppendingPathComponent:@"Contents/Info.plist"]];
if(![info[@"CFBundleIdentifier"]isEqual:@"com.dayu.color"]||![plugin[@"CFBundleIdentifier"]isEqual:@"com.dayu.color.XPC"]||
[info[@"CFBundleVersion"]integerValue]!=[manifest[@"build"]integerValue]||[plugin[@"CFBundleVersion"]integerValue]!=[manifest[@"build"]integerValue]||
![info[@"CFBundleShortVersionString"]isEqual:manifest[@"version"]]){if(error)*error=DYUpdateError(@"更新包产品或版本与清单不一致。");return NO;}
if(!command(@"/usr/bin/codesign",@[@"--verify",@"--deep",@"--strict",app.path],error))return NO;
NSString *identity=command(@"/usr/bin/codesign",@[@"-dvvv",app.path],error);
if(![identity containsString:@"TeamIdentifier=B3W25FX5H5"]){if(error)*error=DYUpdateError(@"包内 APP 签名团队不匹配。");return NO;}
if(DYValidateSignedInstallation(app,NULL)!=errSecSuccess){if(error)*error=DYUpdateError(@"更新包内的 APP 或插件未通过官方签名验证。");return NO;}
// Product PKGs install the wrapper at its fixed FxPlug location and carry templates.
BOOL appTarget=NO,templates=NO;
for(NSURL *url in [NSFileManager.defaultManager enumeratorAtURL:inspection includingPropertiesForKeys:nil options:0 errorHandler:nil]){
@@ -116,6 +132,7 @@ static NSString *command(NSString *path,NSArray *arguments,NSError **error) {
}
- (void)check {
NSString *phase=_state[@"phase"];if([@[@"checking",@"downloading",@"validating"]containsObject:phase])return;
if (![self requireOfficialInstallation]) return;
unsigned generation=++_generation;[self emit:@"checking" message:@"正在检查公测更新…"];
NSString *url=[NSString stringWithFormat:@"https://dayu.media/wp-json/dayu-color/v1/update?bundle_id=com.dayu.color&channel=beta&current_build=%@",([NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"]?:@"0")];
NSMutableURLRequest *request=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:6];
@@ -137,6 +154,7 @@ static NSString *command(NSString *path,NSArray *arguments,NSError **error) {
}
- (void)download {
if(![_state[@"phase"]isEqual:@"available"])return;NSError *error=nil;
if (![self requireOfficialInstallation]) return;
if(![DYBetaUpdater validateManifest:_manifest error:&error]){[self emit:@"failed" message:error.localizedDescription];return;}
if([_manifest[@"build"]integerValue]<=[[NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"]integerValue])return;
unsigned generation=++_generation;NSDictionary *manifest=[[_manifest copy]autorelease];[self emit:@"downloading" message:@"正在下载公测更新,可随时取消。"];
@@ -147,7 +165,9 @@ static NSString *command(NSString *path,NSArray *arguments,NSError **error) {
if(!error&&[(NSHTTPURLResponse*)response statusCode]==200&&DYBetaAllowedURL(response.URL,YES)){
[NSFileManager.defaultManager removeItemAtURL:destination error:nil];
if([NSFileManager.defaultManager moveItemAtURL:temporary toURL:destination error:&error]){
[self emit:@"validating" message:@"正在验证完整性、签名、公证和插件版本…"];
dispatch_async(dispatch_get_main_queue(), ^{
if(generation==self->_generation.load()) [self emit:@"validating" message:@"正在验证完整性、签名、公证和插件版本…"];
});
BOOL valid=[DYBetaUpdater validatePackage:destination manifest:manifest error:&error];
if(!valid&&!error)error=DYUpdateError(@"更新包未通过验证。");
}
@@ -163,15 +183,20 @@ static NSString *command(NSString *path,NSArray *arguments,NSError **error) {
}
- (void)install {
if(![@[@"ready",@"host_wait",@"installer"]containsObject:_state[@"phase"]])return;
if (![self requireOfficialInstallation]) return;
for(NSString *ID in @[@"com.apple.FinalCut",@"com.apple.FinalCutApp",@"com.apple.motionapp",@"com.apple.motionappApp"])
if([NSRunningApplication runningApplicationsWithBundleIdentifier:ID].count){[self emit:@"host_wait" message:@"请先保存并正常退出 FCP / Motion,再点击安装更新。不会强制退出宿主。"];
DYBetaEvent(@"update_installer",@{@"status":@"waiting_for_host"});return;}
if(_package&&[NSWorkspace.sharedWorkspace openURL:_package]){
if (!_package || ![digest(_package) isEqualToString:_manifest[@"sha256"]]) {
[self emit:@"failed" message:@"更新包已更改或不可读。请重新检查并下载更新。"];
return;
}
if([NSWorkspace.sharedWorkspace openURL:_package]){
[NSUserDefaults.standardUserDefaults setObject:_manifest[@"build"] forKey:@"betaPendingUpdateBuild"];[self emit:@"installer" message:@"已打开系统安装程序,请按提示授权并完成安装。"];
DYBetaEvent(@"update_installer",@{@"status":@"system_installer_opened"});}
else [self emit:@"failed" message:@"无法打开系统安装程序,请重试。"];
}
- (void)cancel {++_generation;[_task cancel];BOOL newer=[_manifest[@"build"]integerValue]>[[NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"]integerValue];[self emit:newer?@"available":@"idle" message:@"已取消,不影响当前插件。"];}
- (void)cancel {if(_integrityRejected)return;++_generation;[_task cancel];BOOL newer=[_manifest[@"build"]integerValue]>[[NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"]integerValue];[self emit:newer?@"available":@"idle" message:@"已取消,不影响当前插件。"];}
- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task willPerformHTTPRedirection:(NSHTTPURLResponse *)response newRequest:(NSURLRequest *)request completionHandler:(void (^)(NSURLRequest *))completion {
BOOL download=[task isKindOfClass:NSURLSessionDownloadTask.class];completion(DYBetaAllowedURL(request.URL,download)?request:nil);
}
+2 -2
查看文件
@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.13.0</string>
<string>1.14.0</string>
<key>CFBundleVersion</key>
<string>83</string>
<string>90</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>
+33 -7
查看文件
@@ -1,18 +1,31 @@
# 大鱼调色开发交接
更新于 2026-11-05(Asia/Shanghai)。这是新对话的接手入口。历史设计和实现细节按需查阅专项交接,复现和交付证据以对应版本的报告为准。
更新于 2026-11-06(Asia/Shanghai)。这是新对话的接手入口。历史设计和实现细节按需查阅专项交接,复现和交付证据以对应版本的报告为准。
## 当前基线
| 项目 | 已核对状态 |
| --- | --- |
| 工程与源码 | `/Volumes/备份/大鱼调色/大鱼调色`,`大鱼调色.xcodeproj`,`Wrapper Application` / Release。远程为 `https://dayu.media/git/dayu/dayu-color.git`,分支 `main`。本轮开发基线为 `504e08e425e44a271e1e0be819cf6a593d4b786c`。 |
| 本机正式安装 | **1.13.0(83)**,`/Library/Plug-Ins/FxPlug/大鱼调色.app`。外层 ID `com.dayu.color`,服务 ID `com.dayu.color.XPC`。实际编译源码 `9977b5c41b07e0b08e6408c492498ba6e396c981`。签名、公证、票据和本机正式路径通过。[交付](verification/Delivery.json) · [宿主验收](verification/HostCloneStamp1.13.0.json) |
| Git Release | 1.12.1(81),标签 `v1.12.1-canvas-inspector-20261105` 指向 `9f0adbeb3b1b902b66ac4be7169b919f82675f21`。签名公证 PKG 已发布为公测,草稿和正式附件均完成完整下载校验。本地包位于 `/Volumes/备份/大鱼调色/发行包/大鱼调色-1.12.1.pkg`。[发布页](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.12.1-canvas-inspector-20261105) · [发布核验](verification/Release.json) |
| 站点及自动更新 | 本次交接回读时,原文章与主 APP 公测通道均为 **1.12.0(79)**。主 APP 启动时自动检查,发现新版后由用户确认下载和安装。[原文章](https://dayu.media/15792/) · [文章核验](verification/Article1.12.0.json) · [更新通道核验](verification/BetaPublication1.12.0.json) |
| 工程与源码 | `/Volumes/备份/大鱼调色/大鱼调色`,`大鱼调色.xcodeproj`,`Wrapper Application` / Release。远程为 `https://dayu.media/git/dayu/dayu-color.git`,分支 `main`。1.14.0(90)实际编译节点为 `810bbf4dfb0a05bc2fa66da546ca75b9610985a3`。 |
| 本机正式安装 | **1.14.0(90)**,`/Library/Plug-Ins/FxPlug/大鱼调色.app`。签名、公证、票据及 881 项原生检查通过,FCP 12.4 实拍双向跟踪生成 257 个连续双点键。[交付](verification/Delivery.json) · [宿主验收](verification/HostCloneTracking1.14.0.json) |
| Git Release | **1.13.2(86)**,标签 `v1.13.2-integrity-20261105` 指向 `5252296b7b628c8df7e68dfb48df0db38cd12a75`。公测 Release 393/附件 37。草稿和发布后附件完整下载均匹配签名公证包。本地包 `/Volumes/备份/大鱼调色/发行包/大鱼调色-1.13.2.pkg`。[发布页](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.13.2-integrity-20261105) · [发布核验](verification/Release.json) |
| 站点及自动更新 | 文章 15792 已更新为 **1.13.2(86)**,站内主下载包完整下载校验通过。主 APP 公测通道回读为 **1.12.0(79)**。[原文章](https://dayu.media/15792/) · [文章核验](verification/Article1.13.2.json) · [更新通道核验](verification/BetaPublication1.12.0.json) |
| 本机开发与验收 | AppKit / Objective-C++ / FxPlug 4 / Metal,Apple Silicon,macOS 14.6+。交付记录使用 Xcode 27.1、FxPlug SDK 4.3.5 和 FCP 12.4。构建缓存为 `/Users/mac/Library/Caches/CodexBuilds/com.dayu.color`,验收素材库位于其中的 `fcp-qa/大鱼调色_验收.fcpbundle`。产品交付锁为 `/Users/mac/.codex/app-delivery-locks/com.dayu.color.lock`,接手时重新检查。 |
## 1.13.0 画布响应与仿制图章
## 1.14.0 图章取样与覆盖跟踪
- 用户在 1.13.4 的实拍工程中确认图章可落位、拖动,随后要求取样点和覆盖目标都参与跟踪并识别缩放。[1.13.4 实鼠确认](verification/HostCloneStampSave1.13.4.json)
- 两个区域各自使用同一宿主源帧运行 OpenCV 分析。写入的每个轨迹键同时记录两点的位置与缩放。任一侧跟丢时,提交本次最后一段两侧均可信的连续轨迹。普通蒙版沿用原分析。旧图章单点轨迹仍按位移求值,可重新跟踪以获得双点数据。
- 覆盖圈随覆盖区域缩放。渲染按取样区域和覆盖区域的相对缩放映射当前帧的源像素,两侧缩放相同时保留整数像素平移。调大或调小覆盖范围仍可独立操作。清除轨迹时将当前帧的图章外观保留为静态值。
- 89 版在 FCP 12.4 实拍素材上完成正向和双向跟踪。双向导出得到 257 个连续双点键,并发现片尾一个原有自动键与最后的新键只差 6.33 毫秒。90 版按半帧识别同帧自动键,在分析范围边缘替换旧键,同时保留手工编辑和分析范围之外的轨迹。90 版在同一 4K 源帧上生成 257 个连续双点键,无旧键残留。最终帧横纵缩放分别约为取样 1.387 / 1.689 倍,覆盖 1.169 / 1.203 倍。两边各有独立的中心轨迹。[1.14.0 实拍与原生核验](verification/HostCloneTracking1.14.0.json)
## 1.13.1 等像素复制与取样十字拖动
- 选中图章后可拖动青色取样十字。拖动时更新标记,松手后换取样位置并形成一次撤销。Esc 取消,旧图章可直接编辑。源点调整适用于图章的全部帧,目标位置轨迹保持原样。
- Metal 按整数像素偏移直接复制当前帧中的原像素,羽化只混合覆盖边缘。改变椭圆宽高只修改覆盖范围。画布和工作区移除图章旋转控件。跟踪继续用现有分析器求解运动,图章只应用中心位移。旧项目的轨迹键保留,历史缩放与旋转分量在图章求值时忽略。普通蒙版仍使用原有变换。
- 入口为 `DYToolOSC.inc.h`、`DYToolCanvasEditing.inc.h`、`DYToolHostMethods.inc.h`、`DYToolState.mm` 和 `DYGrade.metal`。画布写回继续校验时间、图章 ID 和外部修改冲突。原生检查覆盖一次撤销、Esc 取消、拖动和调尺寸时保持跟踪键,以及实际 Metal 输出的等像素复制。
## 1.13.0 历史交付 · 画布响应与仿制图章
- 旧版工具栏重绘会清零并上传整张 CPU 位图。无蒙版、未进入图章取样时,新版只绘制工具栏和已打开面板所需的区域,并沿用宿主提供的透明画布。4K、2 倍缩放的空闲工具栏位图为 1000×134,约占 3840×2160 的 1.6%。蒙版与图章绘制仍可能使用整画布。
- 工具文档复制改用内存深拷贝,已验证的不可变文档副本共享内容。每帧快照直接从选中的关键帧生成,不再绕一次序列化往返,也只为胶片层读取颗粒参数。M4 合成测试用四条各含 2400 个键的轨迹,40 次复制平均耗时从 18.018 ms 降到 10.949 ms。上述是局部测量,第三方反馈缺少触发动作、素材和工程,尚无法对同一场景前后复测。
@@ -41,12 +54,20 @@
## 验收与待跟进
- **86 版安装完整性加固。** `Shared/DYCodeIntegrity.m` 固定 Apple Developer ID Application、团队和签名标识,验证正在运行的代码及磁盘上的外层 APP、插件服务与签名资源。外层注册前拒绝改包并撤销此副本登记。XPC 在进入 FxPrincipal 前独立校验。更新器验签失败后取消本次运行的更新任务,停用检查、下载、安装,恢复须安装原包并重开。
- **分发与边界。** 原始 PKG 允许原样转发,无机器码或账号授权。用户选择保留后端自动更新策略,由新版本在本地拒绝改包。对方若保留签名内件,只在外部加装控制,内件验签仍可通过。缺少倒卖样本,实际改法待确认。拒绝路径、旧包校验、原版更新及宿主画面均有独立记录。[完整性测试](verification/Integrity1.13.2.json)
- **85 版历史防护评估。** 1.13.1(85)的正式 APP `com.dayu.color` 与 FxPlug 服务 `com.dayu.color.XPC` 都由 `B3W25FX5H5` 的 Developer ID Application 签名。该版的外层 `AppDelegate.m` 在调用 `pluginkit -a` 前只检查组件元数据。插件 `Plugin/main.m` 直接进入 `FxPrincipal`,效果清单为静态登记。
- **验签实测。** 用临时 Security.framework 探针对正式安装与独立副本执行静态签名校验,要求 Apple 签发的 Developer ID Application、指定 Team ID 和各自的签名标识。正式 APP 与服务均通过,错误标识、服务掉签、服务临时重签、Metal 资源被改及外层 APP 临时重签均被拒绝。仅重签外层时,原版内层服务单独校验仍通过。临时副本已清理。本轮未运行改包,也未获得倒卖样本,无法确认对方实际改动。
- **85 版像素复制与十字。** 正式安装的 864 项原生检查通过,实际 Metal 输出验证扩大覆盖只增加复制面积,重合像素逐值相同。FCP 12.4 独立项目副本读入 83 版图章,画布和工作区都只提供中心与尺寸控制,导出后原图章和 99 个轨迹键逐项一致。实窗自动拖动未产生宿主写入,十字拖动、一次撤销和 Esc 取消由正式安装版的原生回调覆盖。工作区“画面编辑”按钮仍沿用通用蒙版提示文字。[验收证据](verification/HostCloneSource1.13.1.json)
- **83 版图章与跟踪。** 安装后的 858 项原生检查通过。FCP 12.4 独立验收项目副本中已看到图标、取样十字、目标区及实际贴图。工作区触发真实正向跟踪,冷重开后导出的预设保留 99 个轨迹键,目标几何变化,取样坐标和尺寸一致。宿主测试通过载入验收预设创建图章。画布点击及拖选由原生 FxPlug 回调测试覆盖,自动鼠标输入没有进入实窗的 OSC 回调。[验收证据](verification/HostCloneStamp1.13.0.json)
- 正式 81 版通过 844 项原生检查。FCP 12.4 冷重开后,检视器顶部完整显示,曲线读到 57,600 个输出样本,原调色参数成功读回。同帧输出变更和检视器直方图刷新已通过原生检查。用户手动确认的是 80 版的画布曲线和实时直方图。[宿主验收](verification/HostCanvasInspector1.12.1.json)
- **画布白平衡待实机复核。** 已验证取样入口分发、播放头改变后的写入保护、白平衡求解、色温和色调写入及一次撤销。下一次实机验收补做系统取样界面的点选和取消,核对取样后色温与色调的实际变化。[宿主验收范围](verification/HostCanvasInspector1.12.1.json)
- **第三方 FCP 保存告警待反馈。** 本机内置 APFS 验收库未复现,退出重开读回正常。收到报错前的操作、时间、FCP 和插件版本、素材库位置后,再区分卷写入故障、素材库异常与特定插件写入触发;先保护原库与备份,复现在独立验收库进行。[保存告警排查](research/FinalCutSaveFailure-20261105.md)
- 站点文章和自动更新通道与 Git Release 是独立交付。后续若要将站点或更新通道升到 81,按发布任务核对现有线上版本、正式安装包和生产回滚记录。[更新部署说明](Backend/README.md)
- 站点文章、自动更新通道和 Git Release 分别交付。接手通道更新时,以实时清单、正式包和对应的生产回滚记录为准。[更新部署说明](Backend/README.md)
## 继续工作
@@ -65,3 +86,8 @@
| 2026-11-05 | 检视器、画布控件与保存告警排查 | 81 版正式安装并发布。80 版的画布反馈已复核,81 版修复检视器裁切与直方图刷新。剩余实机取样和第三方告警见上。 |
| 2026-11-05 | 建立每次任务的交接流程 | 新建本入口及项目规则,为历史专项交接加指引。回读核对了正式安装 81、远程版本标签、站点文章及公测通道 79。本轮成果为项目文档。 |
| 2026-11-05 | 画布响应与仿制图章 | 83 版正式安装,补齐图章渲染、现有跟踪复用及工作区编辑。性能局部测量、FCP 实帧和冷重开证据见本页,反馈场景待复现。 |
| 2026-11-05 | 仿制图章等像素复制与取样十字拖动 | 加入源点拖动和撤销,复制改为整数像素平移,目标跟踪保留中心位移。 |
| 2026-11-05 | 二次打包与重签防护评估 | 已核对注册和 XPC 启动入口,并用正式 85 版和改动副本验证候选验签规则。下一步可接入双入口校验并在正式安装版上复测 FCP。 |
| 2026-11-05 | 防二次加密和重签 | 1.13.2(86)正式安装。注册、服务启动和更新入口加入验签,FCP 和安装包通过验收。公测 Release 393 已发布并完整下载核对,站点及自动更新策略沿用原配置。 |
| 2026-11-05 | 更新 1.13.2 站点文章 | 在原文章 15792 更新正文、SEO 和主下载包,加入验签、原包转发规则、仿制图章与故障排查说明。原售价、会员权益、封面和历史图片均已回读,主包完整下载校验通过。公测自动更新通道回读为 1.12.0。 |
| 2026-11-06 | 仿制图章松手消失和拖动回弹 | FCP 在同一次手势给出相差约 32 毫秒的绘制时间与参数写入时间。88 版将图章文档写入与几何时间分开,用户实拍确认可拖动。本机正式安装和 88 安装包已验收;接续实现取样与覆盖区域独立跟踪及缩放后再发 Release。 |