比较提交
| 作者 | SHA1 | 提交日期 | |
|---|---|---|---|
|
|
c0e6f3be0a | ||
|
|
10a14a8c62 | ||
|
|
6dd29caa3d | ||
|
|
d7d33fd8c6 | ||
|
|
ade118e284 | ||
|
|
201152d3e0 | ||
|
|
cccc51ff7a | ||
|
|
80dec904be | ||
|
|
b216cebc70 | ||
|
|
5cf4ba75b3 | ||
|
|
fe8b298c33 | ||
|
|
031c704f0f | ||
|
|
0dfb838b39 | ||
|
|
7f2cef5c58 | ||
|
|
92a90e6b33 | ||
|
|
30d413dc42 | ||
|
|
0597c8f4dd | ||
|
|
0ab448d04f | ||
|
|
cc037340bf | ||
|
|
61248ab9f5 | ||
|
|
ac9180e47c | ||
|
|
def8c2f638 | ||
|
|
642817e782 | ||
|
|
d39004c26a | ||
|
|
ebb67af1bc | ||
|
|
b0ef44b496 | ||
|
|
07a3f7bd4d | ||
|
|
c6d40d2f4d | ||
|
|
39676664f7 | ||
|
|
09e04ca647 | ||
|
|
77856a1334 | ||
|
|
6ea931a991 | ||
|
|
ab63b25f88 | ||
|
|
fe7ddbd6f8 | ||
|
|
8c62e4b5bd | ||
|
|
55b66a358c | ||
|
|
2ba0a415ae | ||
|
|
998a983884 | ||
|
|
8e00968bf0 | ||
|
|
0328399f52 |
没有与搜索条件相匹配的文件
@@ -0,0 +1,17 @@
|
||||
大鱼调色 1.10.0(72)|紧急 UI 更新
|
||||
|
||||
- 画布工具改为纵向排列,可打开、移动、折叠或关闭多个工具面板。
|
||||
- 曲线支持直接拖点及 RGB 通道切换,颜色分级提供四个画布色轮;保留精确参数视图。
|
||||
- 新增画布外辅助工作区,集中查看当前效果输出的亮度波形、RGB 分列、直方图与风格1 LUT 预览。
|
||||
- 曲线双轴与色轮参数在一次手势内共同提交并撤销;播放头、图层或颜色管理改变时中止过期写入。
|
||||
|
||||
695 项正式安装原生检查通过。Final Cut Pro 12.4 中的曲线拖点与一次撤销、LUT 预览、移动播放头后的示波器更新已通过实际鼠标验证。自绘示波器为 sRGB 显示参考,宿主分块输出时标注当前分块,不代替 HDR / IRE 精密测量。
|
||||
|
||||
支持 Apple Silicon,macOS 14.6 及以上。APP 与 PKG 已通过 Developer ID 签名、Apple 公证和票据验证。固定安装位置:/Library/Plug-Ins/FxPlug/大鱼调色.app。本次正式 APP 独立安装并验收,PKG 完成20项展开验包,未重复执行系统安装脚本。
|
||||
|
||||
安装包:大鱼调色-1.10.0.pkg
|
||||
大小:43090565 字节
|
||||
SHA-256:ee70461c9b2d2e0ddd78cbcb3371c3b1b36b7f0e5fc69bfccc7ac0f1a3e468d8
|
||||
实际编译源码:80dec904bedf5f704b29d16325fa95d639f3a250
|
||||
|
||||
资源文章已先行更新:https://dayu.media/15792/ 。使用新的紧急UI更新封面及用户提供的深色/浅色实际截图,主安装包更新为本版;50元、有效会员免费及其它商业设置保持。
|
||||
@@ -0,0 +1,14 @@
|
||||
大鱼调色 1.8.4(64)公测
|
||||
|
||||
重新收敛“霓虹炫彩”配色。移除各模块独立的红、绿、橙等高饱和色块,卡片和标题统一为接近黑色、轻微暖紫倾向的低饱和表面,图标使用统一的柔和银灰紫色。使用者认可的“保存预设”按钮继续保留原有粉紫到青色渐变,渐变强调集中在主按钮、滑杆和顶部细线。
|
||||
|
||||
在用户认可的近黑底色上,模块名称按钮以统一的轻粉青渐变、细边及更亮展开态强化显示;蒙版、删除、再加一层按钮增加低对比按钮底与清晰图标。
|
||||
|
||||
不改变现有功能、参数、色彩管理、模板或直方图算法。亮度/RGB直方图继续使用320×180分析画面、256档、最多2Hz刷新,支持单通道与显隐;仍不是最终输出或HDR示波器。
|
||||
|
||||
适用Apple Silicon,macOS14.6或更新。唯一正式安装 /Library/Plug-Ins/FxPlug/大鱼调色.app。605项正式原生检查通过;FCP12.4实际检查模块按钮展开/折叠、图层操作辨识与直方图数据,前后8,590字节预设逐字节一致。用户认可的候选63底色代码完整保留。APP与PKG均已正式签名、公证Accepted并粘附票据,PKG通过20项展开验包。本轮APP独立正式安装验收,没有重复执行PKG安装脚本。
|
||||
|
||||
包名:大鱼调色-1.8.4.pkg
|
||||
字节数:43009859
|
||||
SHA-256:59c8cee9282260ad97130b1d3d8dc6b09bdf8e8f82cb6c5937bf54ee5880e660
|
||||
实际编译源码:55b66a358cf4c52eeb6ad89acde822cb73be3137
|
||||
@@ -0,0 +1,15 @@
|
||||
大鱼调色 1.8.5(67)
|
||||
|
||||
- 只保留“浅色 / 深色”两个明确的文字切换,移除其它主题和彩色色签。
|
||||
- 浅色使用冰蓝表面、深青文字、柔和浮雕与定向反光边。
|
||||
- 深色使用中性炭黑、浅色文字、高亮细边与局部青蓝光晕。
|
||||
- 按钮、模块、数值框与滑杆采用同一套层次语言,曲线继续显示亮度与RGB直方图叠层。
|
||||
|
||||
610项正式原生检查与FCP12.4界面验收通过;外观切换前后完整调色预设保持一致。调色数学、CMS、模板与预设格式保持原合同。
|
||||
|
||||
支持Apple Silicon,macOS14.6及以上,Final Cut Pro / Motion。APP与安装包已完成Developer ID签名、Apple公证与票据验证,安装位置为/Library/Plug-Ins/FxPlug/大鱼调色.app。本轮APP独立安装验收,PKG展开验包未重复执行安装脚本。
|
||||
|
||||
安装包:大鱼调色-1.8.5.pkg
|
||||
大小:43010987字节
|
||||
SHA-256:b4540c2be931d9e042ed1a6f2673c001e4b6e0ec67eef0bc22f4b3977af4952b
|
||||
实际编译源码:d39004c26af3c0c5853111faef7e40e6c66f6aa6
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"title": "大鱼调色 1.10.0 公测版:紧急 UI 更新,画布工具与独立工作区",
|
||||
"status": "publish",
|
||||
"content": "<!-- wp:paragraph -->\n<p>大鱼调色 1.10.0 公测版是一款适用于 Final Cut Pro 与 Motion 的原生 FxPlug 4 调色插件。从素材色彩还原、基础调整,到 LUT 风格、胶片质感和局部蒙版,可直接在剪辑时间线里完成。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>本篇下载售价为50元,站内有效会员免费。提供已签名、公证的完整 PKG 安装包,版本 1.10.0,构建 72。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.10.0 紧急 UI 更新</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>本次紧急更新重新安排了调色工具的位置:画布左侧使用纵向工具条,曲线、色轮等调整控件直接叠在画面中;示波器和 LUT 预览放进画布外的独立工作区。需要精确参数时,仍可使用右侧检查器。下方两张为新版实际界面,分别展示深色与浅色模式。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:list -->\n<ul class=\"wp-block-list\"><li><strong>纵向工具条</strong>:从画布侧边切换工具,工具面板可以独立移动、折叠和关闭,也可同时打开多个工具。</li><li><strong>画布内调整</strong>:曲线支持直接添加、移动和删除控制点,并切换 RGB、红、绿、蓝通道;颜色分级提供直接调节的色轮。一次拖动作为一次操作,可用 ⌘Z 撤销。</li><li><strong>画布外工作区</strong>:通过“工作区 · 示波器 / LUT”打开,切换亮度波形、RGB 分列或直方图;“风格1 LUT”页使用当前画面预览 LUT,并明确应用到风格1。</li><li><strong>保留已有调色</strong>:原有调色参数和预设继续使用,深色、浅色模式均可切换。</li></ul>\n<!-- /wp:list -->\n\n<!-- wp:paragraph -->\n<p>工作区示波器用于 sRGB 显示参考,采样当前插件的处理输出,不包含其后的其他效果或宿主显示转换;它不替代 HDR/IRE 精密测量。宿主仅提供分块画面时,会标明当前分块。移动播放头后随新画面更新。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>此版本已完成正式签名、公证及安装验证,并在 Final Cut Pro 中实测曲线拖点与一次撤销、LUT 预览、示波器随播放头更新。</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 深色模式:画布左侧纵向工具条、检查器与画布外示波器工作区\" class=\"wp-image-15840\" width=\"1628\" height=\"1258\" /><figcaption class=\"wp-element-caption\">大鱼调色 1.10.0 深色模式:纵向画布工具与独立示波器工作区</figcaption></figure>\n<!-- /wp:image -->\n\n<!-- wp:image {\"id\":15841,\"sizeSlug\":\"full\",\"linkDestination\":\"none\"} -->\n<figure class=\"wp-block-image size-full\"><img src=\"https://dayu.media/wp-content/uploads/2026/11/1793804588-7ea8d6f6f860d66.png\" alt=\"大鱼调色 1.10.0 浅色模式:浅色纵向工具条、调色检查器与画布外直方图工作区\" class=\"wp-image-15841\" width=\"1664\" height=\"1068\" /><figcaption class=\"wp-element-caption\">大鱼调色 1.10.0 浅色模式:纵向画布工具与独立示波器工作区</figcaption></figure>\n<!-- /wp:image -->\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.7.4:删除模块与图层</h3>\n<!-- /wp:heading -->\n\n<!-- wp:paragrLine truncated
|
||||
"excerpt": "大鱼调色 1.10.0 紧急 UI 更新:纵向工具条、画布内曲线与色轮、画布外示波器及 LUT 预览工作区,提供深浅色模式。完整 PKG 已签名公证,售价50元,站内有效会员免费。",
|
||||
"seo": {
|
||||
"title": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色1.10.0公测版:紧急UI更新,画布工具与独立工作区"
|
||||
},
|
||||
"description": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色1.10.0公测版紧急UI更新:纵向工具条、画布内曲线与色轮、独立示波器和LUT预览工作区,支持深浅色模式。适用于Apple Silicon、macOS14.6及以上,已在Final Cut Pro12.4实测。完整PKG已签名公证,售价50元,站内有效会员免费。"
|
||||
},
|
||||
"keywords": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色,Final Cut Pro,调色插件,FxPlug4,紧急UI更新,画布曲线,色轮,示波器,LUT预览,会员免费"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
<!-- wp:paragraph -->
|
||||
<p>大鱼调色 1.10.0 公测版是一款适用于 Final Cut Pro 与 Motion 的原生 FxPlug 4 调色插件。从素材色彩还原、基础调整,到 LUT 风格、胶片质感和局部蒙版,可直接在剪辑时间线里完成。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>本篇下载售价为50元,站内有效会员免费。提供已签名、公证的完整 PKG 安装包,版本 1.10.0,构建 72。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:heading -->
|
||||
<h2 class="wp-block-heading">1.10.0 紧急 UI 更新</h2>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>本次紧急更新重新安排了调色工具的位置:画布左侧使用纵向工具条,曲线、色轮等调整控件直接叠在画面中;示波器和 LUT 预览放进画布外的独立工作区。需要精确参数时,仍可使用右侧检查器。下方两张为新版实际界面,分别展示深色与浅色模式。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:list -->
|
||||
<ul class="wp-block-list"><li><strong>纵向工具条</strong>:从画布侧边切换工具,工具面板可以独立移动、折叠和关闭,也可同时打开多个工具。</li><li><strong>画布内调整</strong>:曲线支持直接添加、移动和删除控制点,并切换 RGB、红、绿、蓝通道;颜色分级提供直接调节的色轮。一次拖动作为一次操作,可用 ⌘Z 撤销。</li><li><strong>画布外工作区</strong>:通过“工作区 · 示波器 / LUT”打开,切换亮度波形、RGB 分列或直方图;“风格1 LUT”页使用当前画面预览 LUT,并明确应用到风格1。</li><li><strong>保留已有调色</strong>:原有调色参数和预设继续使用,深色、浅色模式均可切换。</li></ul>
|
||||
<!-- /wp:list -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>工作区示波器用于 sRGB 显示参考,采样当前插件的处理输出,不包含其后的其他效果或宿主显示转换;它不替代 HDR/IRE 精密测量。宿主仅提供分块画面时,会标明当前分块。移动播放头后随新画面更新。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>此版本已完成正式签名、公证及安装验证,并在 Final Cut Pro 中实测曲线拖点与一次撤销、LUT 预览、示波器随播放头更新。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:image {"id":15840,"sizeSlug":"full","linkDestination":"none"} -->
|
||||
<figure class="wp-block-image size-full"><img src="https://dayu.media/wp-content/uploads/2026/11/1793804584-5bc2fbe021e0e8f.png" alt="大鱼调色 1.10.0 深色模式:画布左侧纵向工具条、检查器与画布外示波器工作区" class="wp-image-15840" width="1628" height="1258" /><figcaption class="wp-element-caption">大鱼调色 1.10.0 深色模式:纵向画布工具与独立示波器工作区</figcaption></figure>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:image {"id":15841,"sizeSlug":"full","linkDestination":"none"} -->
|
||||
<figure class="wp-block-image size-full"><img src="https://dayu.media/wp-content/uploads/2026/11/1793804588-7ea8d6f6f860d66.png" alt="大鱼调色 1.10.0 浅色模式:浅色纵向工具条、调色检查器与画布外直方图工作区" class="wp-image-15841" width="1664" height="1068" /><figcaption class="wp-element-caption">大鱼调色 1.10.0 浅色模式:纵向画布工具与独立示波器工作区</figcaption></figure>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:heading -->
|
||||
<h2 class="wp-block-heading">在时间线里完成调色</h2>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p><strong>色彩管理与基础调整</strong>:支持 CST 输入、工作空间和输出转换,并提供曝光、白平衡、曲线、HSL、色轮及蜘蛛盘等调节工具。首次使用时,请在一级调色中选择与素材相符的输入曲线和色域。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p><strong>LUT 与风格管理</strong>:通过缩略图浏览、收藏和预览管理常用 LUT,支持自选 LUT 文件与文件夹。完整预设用于保存组合调节;适合静态颜色变换的处理可导出 Cube LUT,颗粒、晕光、蒙版等时间或空间效果不属于静态 LUT 的保存范围。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p><strong>胶片模拟与印片外观</strong>:包含减色、颗粒、晕光、辉光、暗角及通道混合器,提供 Kodak 2383、Fuji 3513 等八种印片外观,可独立调整强度。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p><strong>局部蒙版与工具叠层</strong>:可针对单独工具添加蒙版、建立相邻叠层,并使用关键帧与跟踪处理局部区域,方便细调画面的不同部分。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:heading -->
|
||||
<h2 class="wp-block-heading">历史更新</h2>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:heading {"level":3} -->
|
||||
<h3 class="wp-block-heading">1.7.4:删除模块与图层</h3>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>每个模块和新增图层的标题增加减号按钮,可删除不需要的层并让它从界面消失。删除时一并还原该模块的参数、清除关键帧及所属 LUT、蒙版等设置,避免隐藏后仍影响画面;其他模块保持原设置。误删可通过 Final Cut Pro 的一次撤销恢复。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>顶部“添加模块”菜单可重新添加任意模块,新层从初始参数开始,不继承已删除层的设置。原有“再加一层”继续保留,删除状态随工程和完整预设保存。本机已验证删除、撤销、重做、重新添加与退出重开;本版继续保留此前的 Cube 兼容与“更多空间”窗口修正。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:heading {"level":3} -->
|
||||
<h3 class="wp-block-heading">1.7.3:显示缩放下的 LUT 窗口</h3>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>修正部分显示器选择“更多空间”后,LUT 缩略图浏览库出现大片灰色、内容偏移和裁切的问题。首次打开即可完整显示搜索、文件夹、预览和底部控件,无需点击窗口绿色按钮恢复;原有窗口缩放、网格/列表与缩略图设置继续保留。本机已在相同显示设置下验证首次打开和重新启动 Final Cut Pro 后打开正常。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:heading {"level":3} -->
|
||||
<h3 class="wp-block-heading">1.7.2:LUT 浏览窗口</h3>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>LUT 缩略图浏览库改为跟随 Final Cut Pro 提供的实际窗口内容区域,避免旧窗口位置和尺寸记录干扰布局;窗口变化时同步调整深色内容区、列表及底部控件。缩略图大小、网格/列表、侧栏、分类和最近使用设置继续保留。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:heading {"level":3} -->
|
||||
<h3 class="wp-block-heading">1.7.1:LUT 导入兼容</h3>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>改善 Cube LUT 导入兼容性,可读取部分在颜色数据行夹带文字标记的文件。保留可读取的数值,无法读取的后续通道按 0 处理,各行位置保持不变;这与本机 Final Cut Pro“自定 LUT”处理同类文件的方式一致。原有文件编码支持、缩略图浏览与预览功能继续保留。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:heading {"level":3} -->
|
||||
<h3 class="wp-block-heading">1.7.0 公测新增</h3>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>主 App 启动时自动检查新版,发现更新后由用户确认下载。完整更新包经过完整性、签名和产品版本校验,保存并退出 Final Cut Pro / Motion 后,通过系统安装器完成升级。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>公测诊断用于记录系统与版本、插件初始化、界面创建、管线准备和首次渲染的耗时,以及错误和本插件崩溃摘要。它在后台限量排队、离线重试,不上传素材、LUT、预设、账号、硬件 UUID 或原始崩溃文件;诊断保留30天,可在主 App 关闭。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>本版处于公测阶段,部分用户反馈的偶发加载无响应仍在收集信息,尚未确认根因。遇到问题时,请附主 App 显示的报告标识、发生时间、Mac 芯片、macOS 和 FCP 版本,便于关联加载过程。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:heading -->
|
||||
<h2 class="wp-block-heading">兼容与安装内容</h2>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:list -->
|
||||
<ul class="wp-block-list"><li>Apple Silicon Mac,macOS 14.6 或更新版本;本发行构建不支持 Intel Mac。</li><li>本机已在 Final Cut Pro 12.4 验证加载、界面和调节,其他宿主版本的兼容情况继续通过公测收集。</li><li>主 App 固定安装到 /Library/Plug-Ins/FxPlug/大鱼调色.app,FCP 效果模板安装到当前登录用户的“影片/Motion Templates/Effects/大鱼调色”。</li><li>安装包不包含用户自选素材、LUT 或个人预设。</li></ul>
|
||||
<!-- /wp:list -->
|
||||
|
||||
<!-- wp:heading -->
|
||||
<h2 class="wp-block-heading">安装</h2>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>安装前,请先退出 Final Cut Pro(FCPX)和 Motion,并在整个安装过程中保持它们关闭。PKG 通常会检查这两个程序是否正在运行;如果安装器提示关闭,请退出对应程序后继续安装。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>运行本资源提供的 PKG 安装包,安装包包含完整的大鱼调色主 App、内嵌 FxPlug 插件和效果模板,并自动完成安装与插件注册,无需另行安装运行依赖。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>本公测版不需要登录或输入激活码。安装完成后打开主 App「大鱼调色」,它会检查并提交插件注册;成功后显示3秒倒计时再退出。点击“查看功能介绍”可以保留窗口,查看更新和诊断设置。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:heading -->
|
||||
<h2 class="wp-block-heading">使用</h2>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>安装和注册完成后,打开 Final Cut Pro。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>在“效果”中找到“大鱼调色”文件夹,选择“大鱼调色”即可使用。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>选中添加了插件的片段后,从画布左侧纵向工具条打开调色面板。拖动面板标题可调整位置;在检查器点击“工作区 · 示波器 / LUT”,可打开画布外的辅助窗口。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:heading -->
|
||||
<h2 class="wp-block-heading">常见问题</h2>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>如果插件失效或显示红色警告,可能是系统插件缓存异常。先退出 Final Cut Pro,再重新打开一次插件主 App,然后重新启动 Final Cut Pro 查看插件是否恢复。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>本资源的主 App「大鱼调色」安装在下面的实际路径。将以下命令复制到“终端”运行,即可打开主 App:</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:code -->
|
||||
<pre class="wp-block-code"><code>open '/Library/Plug-Ins/FxPlug/大鱼调色.app'</code></pre>
|
||||
<!-- /wp:code -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>若仍显示红色警告或长时间停在加载中,请核对系统及 FCP 版本,并通过主 App 的“发送诊断摘要”反馈报告标识和发生时间。公测阶段的偶发加载无响应仍在收集信息,重新注册并不能保证解决所有问题。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"articleID": 15792,
|
||||
"assets": [
|
||||
{
|
||||
"file": "dayu-color-1.10.0-interface-01.png",
|
||||
"role": "body-interface-dark",
|
||||
"bytes": 577587,
|
||||
"sha256": "4e948f0599700ddd13f2938a1aac892dea1b6ff60423c2ea15a72e50d5a9ec70",
|
||||
"width": 1628,
|
||||
"height": 1258
|
||||
},
|
||||
{
|
||||
"file": "dayu-color-1.10.0-interface-02-light.png",
|
||||
"role": "body-interface-light",
|
||||
"bytes": 493551,
|
||||
"sha256": "e0f7ec34a839755efed1d67277e482c753e48aa770279cdb2b75a5963f16257f",
|
||||
"width": 1664,
|
||||
"height": 1068
|
||||
},
|
||||
{
|
||||
"file": "dayu-color-1.10.0-cover.png",
|
||||
"role": "generated-article-cover",
|
||||
"bytes": 1722606,
|
||||
"sha256": "c05470ec2b50de0cfdd246b26334aaa895bd288abdb080cad2d4312c120c9a5a",
|
||||
"width": 1672,
|
||||
"height": 941
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"articleID": 15792,
|
||||
"images": [
|
||||
{
|
||||
"file": "dayu-color-1.10.0-interface-01.png",
|
||||
"bytes": 577587,
|
||||
"sha256": "4e948f0599700ddd13f2938a1aac892dea1b6ff60423c2ea15a72e50d5a9ec70",
|
||||
"status": "verified",
|
||||
"id": 15840,
|
||||
"url": "https://dayu.media/wp-content/uploads/2026/11/1793804584-5bc2fbe021e0e8f.png",
|
||||
"alt": "大鱼调色 1.10.0 深色模式:画布左侧纵向工具条、检查器与画布外示波器工作区",
|
||||
"title": "大鱼调色 1.10.0 深色模式",
|
||||
"downloadSHA256": "4e948f0599700ddd13f2938a1aac892dea1b6ff60423c2ea15a72e50d5a9ec70"
|
||||
},
|
||||
{
|
||||
"file": "dayu-color-1.10.0-interface-02-light.png",
|
||||
"bytes": 493551,
|
||||
"sha256": "e0f7ec34a839755efed1d67277e482c753e48aa770279cdb2b75a5963f16257f",
|
||||
"status": "verified",
|
||||
"id": 15841,
|
||||
"url": "https://dayu.media/wp-content/uploads/2026/11/1793804588-7ea8d6f6f860d66.png",
|
||||
"alt": "大鱼调色 1.10.0 浅色模式:浅色纵向工具条、调色检查器与画布外直方图工作区",
|
||||
"title": "大鱼调色 1.10.0 浅色模式",
|
||||
"downloadSHA256": "e0f7ec34a839755efed1d67277e482c753e48aa770279cdb2b75a5963f16257f"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
# 1.10.0 文章封面
|
||||
|
||||
生成方式:内置 imagegen;生成日期:2026-11-04。最终文件:`dayu-color-1.10.0-cover.png`。
|
||||
|
||||
提示词:
|
||||
|
||||
Use case: ads-marketing.
|
||||
Asset type: wide 16:9 article cover for a real native Final Cut Pro color-grading plugin.
|
||||
Primary request: create a polished Chinese editorial cover announcing the emergency UI update of 大鱼调色 version 1.10.0.
|
||||
Scene: elegant charcoal-black background, subtle cyan and violet light, restrained native macOS visual language. A clean vertical strip of abstract tool icons along one side, a luminous RGB curve with control points, a precise color wheel, and a small RGB histogram area suggest canvas tools and a separate auxiliary workspace. These are editorial graphic motifs, not a fabricated app screenshot.
|
||||
Composition: large beautifully typeset Chinese product title with generous space, smaller version number, prominent update badge. Strong thumbnail legibility, calm professional color-science feel. Avoid excessive glow or clutter.
|
||||
Text (verbatim, no additional text):
|
||||
"大鱼调色"
|
||||
"1.10.0"
|
||||
"紧急 UI 更新"
|
||||
"画布工具 · 曲线色轮 · 独立工作区"
|
||||
"Final Cut Pro"
|
||||
Typography: crisp modern Chinese sans-serif, accurate characters, white main title, cyan or violet accent badge.
|
||||
Constraints: landscape 16:9, finished opaque cover. No fake detailed UI text, no logos of other products, no watermark, no price.
|
||||
|
||||
正文图片为用户提供的深色、浅色模式实拍截图,按原始字节保存;与生成封面分开使用。
|
||||
二进制文件未显示。
|
之后 宽度: | 高度: | 大小: 1.6 MiB |
二进制文件未显示。
|
之后 宽度: | 高度: | 大小: 564 KiB |
二进制文件未显示。
|
之后 宽度: | 高度: | 大小: 482 KiB |
@@ -1,12 +1,16 @@
|
||||
# 大鱼调色
|
||||
|
||||
原生 FxPlug 4 调色器,当前公测版本 **1.8.3(62)**。唯一安装位置为 `/Library/Plug-Ins/FxPlug/大鱼调色.app`;Final Cut Pro 中从“效果 → 大鱼调色”添加。
|
||||
原生 FxPlug 4 调色器。当前正式签名、公证并安装 **1.10.0(72)**,固定位置 `/Library/Plug-Ins/FxPlug/大鱼调色.app`;FCP 中从“效果 → 大鱼调色”添加。
|
||||
|
||||
1.8.3 新增默认“霓虹炫彩”:按模块分布紫红、青蓝、玫红、绿青等双色渐变,卡片、标题与图标都使用模块配色,取消统一紫底与深蓝灰底;重点按钮与滑杆用洋红到青色渐变,正文白色。原六种主题与编号保留。本机已从黑金切换到炫彩。曲线新增亮度/RGB直方图叠层、单通道查看与显隐开关,使用真实320×180分析缓存、256档,最多每秒更新2次。
|
||||
新版采用纵向工具条和多个可移动浮动面板,曲线可直接拖点,分级可直接调色轮;画布外工作区提供 sRGB 显示参考示波器和风格1 LUT 预览。695项正式安装原生检查与用户实鼠的曲线拖点/一次撤销、LUT预览、示波器更新均通过。完整PKG已签名公证、粘附票据并验包。
|
||||
|
||||
直方图沿用已有分析画面:原流程为一级CST/输入LUT后,新CMS为显示输出转换后、SDR修饰前;不是最终输出示波器或每层曲线的即时输入。透明/非有限像素不计,范围外归端点,共同峰值平方根缩放。主题与叠层不写入调色预设,曲线数学、CMS及模板保持。
|
||||
[原资源文章](https://dayu.media/15792/)已先行更新为“1.10.0 紧急 UI 更新”,替换新封面与用户提供的深浅色原始截图,主下载同步正式包,售价50元、有效会员免费保持。Git Release正在收尾,最终状态见后续 `verification/Release.json`;不可使用其中更早版本的历史记录宣称本版已发布。详见[交互说明](research/ViewerWorkspace-20261104.md)、[宿主验证](verification/HostWorkspace1.10.0.json)、[文章验证](verification/Article1.10.0.json)与[恢复说明](RECOVERY.md)。
|
||||
|
||||
[1.8.3安装包 Release](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.8.3-neon-histogram-20261104)。605项原生检查及正式FCP验收见 verification/HostNeon1.8.3.json。
|
||||
1.8.4 收敛“霓虹炫彩”配色:所有模块统一使用用户已认可的低饱和近黑表面,去掉红绿橙色块。保存预设保留原粉紫到青色渐变;模块名称按钮以统一轻渐变、细边和更亮展开态强化显示,蒙版/删除/再加一层按钮增加克制的按钮底。原主题编号、功能、直方图、CMS及预设保持。
|
||||
|
||||
[1.8.4安装包 Release](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.8.4-refined-neon-20261104)。正式验证见 verification/HostRefined1.8.4.json。
|
||||
|
||||
1.8.3加入的曲线直方图继续使用真实320×180分析缓存、256档、最多2Hz,RGB叠加亮度和三个色彩通道;可切单通道及显隐。原流程源为一级CST/输入LUT后,新CMS为显示输出转换后、SDR修饰前,非最终输出/HDR示波器或每层的即时曲线输入。用户已否定1.8.3的分模块彩虹色块,后续不要恢复该视觉方案。
|
||||
|
||||
历史1.8.2 将高级色彩管理收进顶部“颜色设置”按钮,默认收起且不占调色区域;展开和收起只改变显示,不写调色参数、不产生撤销项。新增“黑金渐变”主题:黑色与深炭色背景、亮金文字和小范围静态光晕;未设置主题时默认黑金,已明确保存的五种旧主题继续保留,可随时切换。增加对比度或减少透明度时不绘制文字光晕。窄栏使用两排操作按钮。
|
||||
|
||||
|
||||
+55
@@ -1,3 +1,55 @@
|
||||
# 2026-11-04 画布工具与辅助工作区:1.10.0(72)验收完成
|
||||
|
||||
当前正式安装 **1.10.0(72)**,固定位置 `/Library/Plug-Ins/FxPlug/大鱼调色.app`,主 Bundle ID `com.dayu.color`,XPC `com.dayu.color.XPC`。实际编译源码 `80dec904bedf5f704b29d16325fa95d639f3a250`;Developer ID 团队 B3W25FX5H5,APP 公证 `c0209032-38d2-4434-8e37-7f911414c3c6` Accepted。票据、Gatekeeper、唯一 PluginKit 正式路径、正式安装的 **695 项原生检查**与用户实鼠验收通过。
|
||||
|
||||
画布侧改为纵向十四工具入口,支持多个独立移动、折叠和关闭的浮动工具面板。曲线直接添加、拖动、删除点并切 RGB 通道;颜色分级提供四个实际色轮,二者可切换参数页。其它工具继续使用原有参数和图层 UUID;移动面板与切换编辑视图不进入调色撤销。
|
||||
|
||||
外部“工作区 · 示波器 / LUT”由 FxRemoteWindow 托管。亮度波形、RGB 分列和直方图采集当前效果输出并标注 sRGB 显示参考/分块限制;不包含其后其他效果或宿主显示转换,也不替代 HDR/IRE 测量。LUT 页预览与应用风格1。用户明确确认曲线拖点/一次撤销、外窗 LUT 预览、移动播放头后示波器更新“三项都正常”,见 `verification/HostWorkspace1.10.0.json`。
|
||||
|
||||
最终 PKG `../发行包/大鱼调色-1.10.0.pkg`,43,090,565 字节,SHA-256 `ee70461c9b2d2e0ddd78cbcb3371c3b1b36b7f0e5fc69bfccc7ac0f1a3e468d8`,Installer 签名、公证 `9604cc73-153c-4751-ac5b-2cca76b4c219` Accepted、票据、Gatekeeper 和20项展开验包通过。APP 已独立安装验收,本轮未重复执行系统 PKG 安装脚本。`verification/Package.json` 是本版验包记录。
|
||||
|
||||
按用户要求,公证后先更新原文章 https://dayu.media/15792/:标题及正文说明“紧急 UI 更新”,新生成封面,深色/浅色两张用户原图,主下载包更新为本版;50元、有效会员免费及其它商业/视频设置保留。前台SEO逐项一致、旧图移除、新图原始哈希与正式包完整下载校验通过。素材、正文、提示词与验证分别保存在 `Publishing/1.10.0/`、`verification/Article1.10.0.json`。未修改 NAS 源码、生产接口或自动更新清单。
|
||||
|
||||
远端 https://dayu.media/git/dayu/dayu-color.git,main。发行目标标签 `v1.10.0-canvas-workspace-20261104`;Git Release 仍待上传与完整下载核验,不能将旧版 `Release.json` 当作本版记录。标签包含最终 Package.json 与文章记录;发布后 Release.json 保存在后续 main,不移动已有标签。71 因实窗顶栏缺陷被72替代未发布,70包保留为历史未发布候选。
|
||||
|
||||
独立远程 checkout 已核对实际编译提交、526个跟踪文件、Git fsck、8个锁定依赖归档、插件/诊断/工作区/渲染器四个翻译单元 C++20 语法,见 `verification/WorkspaceRecovery1.10.0.json`。无 LFS/子模块,未重复完整重建 CMS 依赖。Xcode27.1、FxPlug SDK4.3.5、Apple Silicon/macOS14.6+;签名/公证凭据需独立恢复,不在 Git。
|
||||
|
||||
正式验收后已清理任务生成的70/71旧安装恢复APP、缓存生成APP和公证ZIP,见 `verification/WorkspacePendingCleanup1.10.0.json`;源码恢复checkout暂留供最终标签核验。源码、历史包和用户QA媒体保留。恢复具体步骤沿用下文,当前版本以本节和相应验证记录为准。
|
||||
|
||||
以下为上一完整发布版 1.8.5(67)及历史交接,供恢复参考。
|
||||
|
||||
# 1.8.5(67)浅色 / 深色双模式
|
||||
|
||||
远程 https://dayu.media/git/dayu/dayu-color.git,main。实际编译源码d39004c26af3c0c5853111faef7e40e6c66f6aa6;发行标签v1.8.5-light-dark-20261104。标签完整提交、正式安装包与下载校验见verification/Release.json及Package.json。当前交接大鱼调色FxPlug4交接.md;旧配色历史以归档为准。
|
||||
|
||||
只保留浅色/深色两个文字按钮,旧主题已移除。浅冰蓝反光浮雕与炭黑局部光晕为同系列;内部7/8偏好ID保留,旧0–6读入回落深色,新偏好默认浅色,不自动跟随系统。主题不进入调色参数。610项正式原生检查、FCP两模式实看/切换、57,600直方图采样和前后8,590字节完整预设一致通过。HostTwoModes1.8.5.json说明实际验收与未覆盖范围。
|
||||
|
||||
唯一正式APP /Library/Plug-Ins/FxPlug/大鱼调色.app,主ID com.dayu.color,内部com.dayu.color.XPC;Release/Developer ID团队B3W25FX5H5。APP公证bf104b1f-5161-4970-8d8a-170989825747 Accepted,票据、Gatekeeper与正式启动通过。PKG独立签名公证与20项展开验包结果见最终Package.json;APP独立替换并验收,未重复运行PKG安装脚本。
|
||||
|
||||
ColorManagement包含8个依赖归档及许可证,无LFS/子模块。恢复需Xcode27.1、FxPlug SDK4.3.5、Apple Silicon/macOS14.6+及独立保存的签名/公证凭据;Git不包含密钥。按下文恢复依赖,检出具体完整SHA后Release构建,再运行tools/deliver.py按正式签名公证安装并宿主验收,通过后Packaging/build_pkg.py。必要资源与源码/版本标签独立检出核验见SoftRecovery1.8.5.json;未宣称独立重新编译。
|
||||
|
||||
正式发行包输出../发行包/大鱼调色-1.8.5.pkg;66已验包但未发布的候选由最终67替代,保留证据Soft66Package.json,临时文件按SoftCleanup1.8.5.json清理。历史发行包/标签、源码和私人QA媒体保留。本轮未改NAS后端、网站文章或自动更新清单。
|
||||
|
||||
最终67正式PKG 43010987字节,SHA-256 b4540c2be931d9e042ed1a6f2673c001e4b6e0ec67eef0bc22f4b3977af4952b,公证04fae6f1-7e38-4ab4-8c12-7bcae0ea77fd Accepted,Installer签名/票据/Gatekeeper及20项展开验包通过。源码及正式包记录随v1.8.5-light-dark-20261104标签保存;实际Release/下载回读另见后续Release.json。
|
||||
|
||||
最终Release386/附件30已发布并回读:https://dayu.media/git/dayu/dayu-color/releases/tag/v1.8.5-light-dark-20261104。标签完整提交def8c2f6386a3d34453912b9e8f96e37e192796c;草稿Edge真实下载与发布后再次完整下载均核对43010987字节、SHA-256 b4540c2be931d9e042ed1a6f2673c001e4b6e0ec67eef0bc22f4b3977af4952b。PKG公证04fae6f1-7e38-4ab4-8c12-7bcae0ea77fd Accepted。独立远程版本标签498个文件与8个依赖归档校验,编译输入一致;本轮未独立重新编译。生成APP、旧安装备份、候选66包、下载副本及恢复clone按SoftCleanup1.8.5.json清理,正式67安装和最终PKG/历史包保留。标签包含最终Package.json;标签快照里的旧Release.json是上一版历史,1.8.5发布回读在后续main,不移动既有标签。
|
||||
|
||||
---
|
||||
|
||||
# 1.8.4(64)统一底色与模块按钮强化
|
||||
|
||||
仓库 https://dayu.media/git/dayu/dayu-color.git,main。实际编译源码55b66a358cf4c52eeb6ad89acde822cb73be3137,发行标签v1.8.4-refined-neon-20261104;完整标签SHA和下载校验见Release.json。正式位置/身份/依赖沿用下文,完整当前交接见大鱼调色FxPlug4交接.md。
|
||||
|
||||
用户否定1.8.3的红绿橙色块;候选63的统一低饱和近黑底色已获认可,最终64保持底色代码不变,只强化模块名称轻渐变/细边/展开态及右侧图层操作按钮。保存预设保留原粉紫到青色渐变。不要恢复历史彩虹卡片或深蓝灰方案。
|
||||
|
||||
605项正式原生检查和FCP12.4界面/预设前后一致检查通过;详见HostRefined1.8.4.json。正式APP公证34af6e05-cba5-4031-9184-762f758c0889,PKG公证2632037d-733a-4092-8323-12dcf264c022均Accepted;票据及Gatekeeper通过,PKG20项展开验包。APP独立正式替换验收,未重复运行安装脚本。
|
||||
|
||||
发行包../发行包/大鱼调色-1.8.4.pkg,43009859字节,SHA-256 59c8cee9282260ad97130b1d3d8dc6b09bdf8e8f82cb6c5937bf54ee5880e660。源码、安装包、标签、完整下载与恢复范围见对应verification报告。未修改网站文章或自动更新清单。
|
||||
|
||||
Release385/附件29已发布,草稿及发布后完整下载均验证通过。标签完整SHA fe7ddbd6f89b4ee3c7af9dd61e94d99056f414e8;远程独立恢复485个文件及8个依赖归档,编译输入一致。临时恢复与下载副本已清理,详见RefinedRecovery1.8.4.json和RefinedCleanup1.8.4.json。
|
||||
|
||||
---
|
||||
|
||||
# 1.8.3(62)多色渐变与曲线直方图
|
||||
|
||||
仓库 https://dayu.media/git/dayu/dayu-color.git,main。编译源码3fd015224037df944b428684c43ec8ec7accea85;发行标签v1.8.3-neon-histogram-20261104。正式位置、身份、依赖及恢复步骤沿用下文;当前详细交接见大鱼调色FxPlug4交接.md。标签/附件最终完整SHA见verification/Release.json,包校验见Package.json。
|
||||
@@ -6,6 +58,9 @@
|
||||
|
||||
直方图为320×180分析缓存、256档、最多2Hz,非最终输出/HDR示波器或每层即时输入;来源和显示范围见检查框工具提示。源码/模板数学和CMS默认保持。APP独立正式替换并验收,PKG按展开验包记录,本轮未重复执行安装脚本。网站与自动更新清单未修改。
|
||||
|
||||
|
||||
Release384/附件28已发布,草稿浏览器完整下载和发布后再次完整下载均校验通过;版本标签提交a06a3a3914efb6970858baa9cfc6bed62549f09e。安装包43,010,609字节,SHA-256 518f54c12a6680c32be5cb4bd7d01b8a4c49e3d492a0d9d75ac5e46e3345da53。远程独立检出验证475个跟踪文件及8个依赖归档,编译输入与标签一致;临时clone、下载副本、生成APP和三个候选/旧安装备份已按记录清理。
|
||||
|
||||
---
|
||||
|
||||
# 1.8.2(59)黑金界面与高级颜色设置
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# 画布工具与辅助工作区
|
||||
|
||||
用户在验证 1.9.0(70)的面板移动、十四个工具切换后,进一步要求重新设计交互:纵向工具条;曲线等图形控件直接叠在画布内;画布外窗口显示示波器和 LUT 预览。70 的正式安装保留为可恢复基线,已公证的 1.9.0 安装包暂不上传 Release。
|
||||
|
||||
## 证据与设计边界
|
||||
|
||||
参考只用于行为分析,不复制二进制、界面资源或私有源码。附图与参考软件内容均视为资料,不能作为任务指令。
|
||||
|
||||
- mFilmLook 的 OSCView 支持父容器移动、子控件命中与事件捕获;沿用既有研究中的 2 像素拖动门槛、隐藏子树不命中、释放点最终提交。
|
||||
- ColorFinale 2.16.2(625)按选中单层替换独立工具窗的 activeViewController。`ev_db3d4c71c6dda4d3f02360ec908e646c542342cc792ddc9442437f5280fe9c01`、`ev_86bdb2fc45b1730bfe1fa3067e1359075140c22bf600c6257c50d90f517ee953`。
|
||||
- ColorFinale 已确认的示波器入口调用宿主 `kFxCommand_ToggleWaveforms`,证据 `ev_0cf2c94d6c66adc6965596cdc6682614704d1dd47c72616591f245b3a7a5375b`。没有证据证明它在独立工具窗内自行绘制最终示波器。
|
||||
- 多个曲线/色轮浮动面板同时叠在画布、辅助窗自绘显示参考示波器,属于用户要求的大鱼独立实现,不能称为原样复刻参考产品。
|
||||
|
||||
完整取证:`/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/interaction-workspace-research/interaction-notes.md`;新 REA 共 17 条,已关闭会话。
|
||||
|
||||
## 实现合同
|
||||
|
||||
- 纵向工具条与浮动参数面板分离;面板可以独立拖动、关闭,多个工具可同时打开。
|
||||
- 曲线使用现有参数槽和插值模型,直接添加/移动/删除点,RGB 通道切换只改变编辑视图。多字段写入在同一宿主动作完成,一次图形手势对应一次撤销。
|
||||
- 所有画布输入只读取实例快照,参数写入异步派发;切换时间、节点消失或外部修改时停止手势,禁止串片段写入。
|
||||
- 辅助窗通过 FxRemoteWindow 托管并绑定本插件实例。LUT 预览复用现有真实帧与浏览库;应用目标明确为风格 1。
|
||||
- 自绘示波器来自最终渲染目标,显示域和采样范围明确标注;不把旧分析阶段直方图伪称为最终输出。
|
||||
- 不改宿主参数 ABI、预设格式、生产后端或在线更新清单。
|
||||
|
||||
## 实现
|
||||
|
||||
`DYViewerControls` 作为单一 OSC 根,绘制纵向十四工具入口,管理各自可拖动、折叠、关闭的工具面板。入口保持最上方绘制与命中,小画面分页;蒙版工具条移至图像右侧并在图像交集内自适应布局。所有位置与通道选择均为视图状态。
|
||||
|
||||
`DYViewerParameterPanel` 绑定工具类型与稳定图层 UUID;曲线直接添加、移动和删除现有参数槽的点,支持 RGB/红/绿/蓝;颜色分级提供四个实际色轮。二者可切换精确参数页,其它工具沿用现有参数描述与范围。多个不同工具可同时叠在画面上。
|
||||
|
||||
`DYViewerParameterBridge` 通过完整字段集合提交曲线 XY、色轮 HS;预校验整组,在同一次宿主 action 内写入,保持单次撤销与冲突中止。无当前帧快照时保留原图层选择并禁止编辑,只有真实文档确认删除才回退同类型图层。空工具面板不能结束其它面板的共享写入手势。
|
||||
|
||||
`DYColorWorkspace` 使用 FxRemoteWindow,并从画布入口或检查器“工作区 · 示波器 / LUT”打开。LUT 页明确应用到风格1;沿用真实分析帧缩略图浏览库。异步准备后核对播放头、原 LUT 和颜色管理,写回读取真实目标图层;关闭会取消准备,宿主拒绝保存不会显示成功。
|
||||
|
||||
示波器采样的是**当前效果的处理输出**,不包含后续其它效果或宿主显示转换。已知 ICC 输出转扩展 sRGB,显示亮度波形、RGB 分列、直方图;它是显示参考,不能替代 HDR/IRE 精密测量。宿主仅提供分块时界面明确标注当前分块。LUT 页或窗口关闭停止示波器采样,重新打开等待新帧;旧帧不会冒充新播放头结果。
|
||||
|
||||
## 验证进展
|
||||
|
||||
71 已通过正式安装的 691 项原生检查,但 FCP 实窗发现示波器背景越界绘制,覆盖顶栏。该候选未发布,记录见 `verification/Viewer71Candidate.json`。72 加入根视图和面板显式裁剪,以及真实顶栏位图/越界重绘/缩放回归;已正式签名公证、安装并通过 695 项原生检查。FCP 实窗确认顶栏恢复和纵向工具条显示;用户实际鼠标确认曲线拖点/一次撤销、LUT 页真实预览、移动播放头后的示波器更新“三项都正常”,记录 `verification/HostWorkspace1.10.0.json`。
|
||||
|
||||
保留所有参数 ID、预设 schema 和渲染调色算法。正式PKG已签名公证、票据和20项验包通过;按用户要求先更新原网站文章,增加紧急UI更新说明、新封面和两张深浅色用户原图,主包同步,商业规则保留。无NAS源码或自动更新清单变更。
|
||||
@@ -0,0 +1,37 @@
|
||||
# 大鱼调色开发交接
|
||||
|
||||
2026年11月4日,Asia/Shanghai。本轮正式版本 **1.8.3(62)**,在1.8.2基础上新增炫彩主题与曲线直方图。此前完整CMS、黑金及发布流程交接已逐字节归档到 research/handoffs/DayuColorThrough1.8.2-20261104.md;其旧版本号与黑金默认要求属于历史,用户本轮视觉反馈优先。
|
||||
|
||||
实际工程 /Volumes/备份/大鱼调色/大鱼调色;Xcode工程“大鱼调色.xcodeproj”,Wrapper Application / Release;检查器为Objective-C++/AppKit。平台Apple Silicon/macOS14.6+,本机Xcode27.1、FxPlug4.3.5。唯一正式安装 /Library/Plug-Ins/FxPlug/大鱼调色.app,主ID com.dayu.color,内部 com.dayu.color.XPC。固定缓存 /Users/mac/Library/Caches/CodexBuilds/com.dayu.color。
|
||||
|
||||
源码远程 https://dayu.media/git/dayu/dayu-color.git,main;实际编译源码 **3fd015224037df944b428684c43ec8ec7accea85**。版本标签 v1.8.3-neon-histogram-20261104;完整标签提交及PKG/Release摘要见最终 verification/Package.json、Release.json、NeonRecovery1.8.3.json。标签包含Package.json,后续发布回读另作main提交,不移动已有标签。无LFS/子模块。
|
||||
|
||||
## 用户最新视觉要求
|
||||
|
||||
用户否决了候选60“大片紫色”,又否决候选61“深蓝灰与青色主题近似”。最终62使用分模块双色渐变表面:一级紫红、蜘蛛盘青蓝、基础珊瑚玫红、肤色橙红、HSL绿青、曲线青蓝等。卡片、标题与图标都跟随模块色相;背景为有色相的紫/蓝/青渐变,不再使用深蓝灰方案。白色正文,洋红到青色的重点按钮与滑杆。不要在后续调整中自动恢复全紫或统一蓝灰。
|
||||
|
||||
主题追加ID6“霓虹炫彩”;旧0–5不改编号,未保存偏好默认6,明确旧选择保留。本机已在正式FCP切到6,冷重开保持。偏好域com.dayu.color.preferences/themeIndex;主题不写入工程或预设。大面积表面均为不透明静态渐变,无持续动画,炫彩文字不发光。
|
||||
|
||||
## 直方图实现与边界
|
||||
|
||||
DYHistogram.h统计既有320×180浮点分析缓存,在渲染工作线程生成不可变256档亮度/R/G/B快照,主线程只绘制。透明、NaN、无穷像素不计;范围外归端点;各通道共用峰值并作平方根高度。RGB页叠加4通道,单色页只绘对应通道,直方图默认开启、可显隐;新建检查器重置显示开关,不写参数/撤销/预设。
|
||||
|
||||
原流程分析源为一级CST/输入LUT后;新CMS为显示输出转换后、SDR修饰前。**不是最终输出示波器,不保证每个局部曲线层的即时输入。** 显示编码亮度是Rec.709系数加权码值,并非场景线性亮度/HDR测量。最多每0.5秒更新,依赖宿主渲染;无缓存显示“等待画面”。工具提示列明来源/采样范围。没有改变GPU数学、Uniform、参数ID、CMS、模板或预设格式。
|
||||
|
||||
关键文件:DYTheme.mm、DYInspector.mm、DYHistogram.h、DYRenderer.h/mm、DYManagedRender.inc.h、DYCompactUIDiagnostics.inc.h。独立层共用renderer且各自观察其通知,缓存按renderer隔离,失效时清空旧直方图。勿新增定时器、全分辨率读取或UI线程像素统计。
|
||||
|
||||
## 正式验证
|
||||
|
||||
605项正式原生检查通过;FCP12.4实看最终多色表面、RGB/红/绿/蓝及显隐、色块与真实运动视频的分布更新;最终冷重开主题保持、颜色设置收起、直方图拿到57,600有效采样。完整原预设8,590字节在恢复测试点及最终冷重开后逐字节一致,SHA-256 1f05b3e350dd5fbc054de155062aff87fdd4d46c6a762ee06650ad5bd3363982。
|
||||
|
||||
候选60期间在图表中心添加的masterX0=0.5点在61冷重开后仍保留,最终通过原生载入预设恢复;不能把该主动交互产生的参数差异算作主题修改。拖动/删除没有单独完整验收,不宣称全手势覆盖。无VoiceOver、辅助显示选项矩阵或Instruments全性能采样。SwiftUI扫描器无Swift文件,记录不适用。详细证据见 HostNeon1.8.3.json及 research/ui-neon-20261104/validation.md。
|
||||
|
||||
APP公证706a58bb-2fa4-4b1e-b392-de60d93aef49,Accepted;正式安装签名/票据/Gatekeeper和实际FCP服务路径通过。发行包由PKG工坊制作并展开验包;本轮APP直接正式安装验收,没有再次执行PKG系统安装脚本。PKG公证5666e466-7ec5-49fb-beac-f7fc5b4e080c为Accepted,20项展开验包通过。Release384/附件28已发布,草稿和发布后完整下载均校验43,010,609字节、SHA-256 518f54c12a6680c32be5cb4bd7d01b8a4c49e3d492a0d9d75ac5e46e3345da53。标签提交a06a3a3914efb6970858baa9cfc6bed62549f09e,独立恢复475个跟踪文件和8个依赖归档通过;生成APP、旧安装备份、提交ZIP、下载副本及恢复clone已清理。未更改NAS后端、网站文章或自动更新清单。
|
||||
|
||||
## 继续开发与交付
|
||||
|
||||
保护nil/v2/v3色彩流程、预设v7及模板默认,不因UI改动修改CMS。高级“颜色设置”仍默认收起,开关不改模型。详细数学与恢复依赖按上述历史完整交接和RECOVERY.md。
|
||||
|
||||
tools/checkpoint.py对明确文件提交/推送并核验main,自带仓库锁。tools/deliver.py取得产品锁,保持HEAD直到Delivery.json写入实际编译SHA;正式安装验收通过才输入complete。Packaging/build_pkg.py与Packaging/publish_beta.py复用PKG工坊,最终版本包不进入Git。草稿附件404先确认已上传,使用正常已登录浏览器完整下载后传--verified-download,不重复POST、不提前发布。
|
||||
|
||||
源代码、历史发行包、私人QA媒体与预设保留。只清理本任务识别的生成APP、旧安装备份、提交ZIP、恢复clone与下载副本;不能扩大为整盘清理。密钥/证书不在Git,发布时重新验证,身份与锁按本机全局约定。
|
||||
@@ -0,0 +1,35 @@
|
||||
# 大鱼调色开发交接
|
||||
|
||||
2026-11-04,Asia/Shanghai。本轮正式版本1.8.4(64),实际编译源码55b66a358cf4c52eeb6ad89acde822cb73be3137。远程 https://dayu.media/git/dayu/dayu-color.git,main。实际工程 /Volumes/备份/大鱼调色/大鱼调色,Wrapper Application / Release,Objective-C++/AppKit;Apple Silicon,macOS14.6+,本机Xcode27.1/FxPlug4.3.5。
|
||||
|
||||
唯一正式APP /Library/Plug-Ins/FxPlug/大鱼调色.app;ID com.dayu.color / com.dayu.color.XPC。固定缓存 /Users/mac/Library/Caches/CodexBuilds/com.dayu.color。签名团队B3W25FX5H5,公证profile codex-dayu-notary-B3W25FX5H5;具体Accepted记录见verification/Delivery.json。不要另建/Applications副本。交付/仓库锁按本机全局规则。
|
||||
|
||||
## 本轮明确的视觉反馈
|
||||
|
||||
用户否定1.8.3“大红大绿”的分模块彩虹色块,只认可保存预设的渐变。候选63改为统一低饱和近黑、轻微暖紫的表面,**该底色已获用户明确认可**。用户随后要求模块/图层按钮强化显示。最终64完整保留63的paletteRGB和DYDrawThemeSurface,不再改底色;只给模块名称小按钮添加统一轻粉青渐变、细边和更亮展开态,给蒙版/删除/再加一层按钮增加低对比底板与更亮图标。保存预设保留原粉紫—青色渐变。
|
||||
|
||||
后续不要恢复统一大紫底、深蓝灰方案或按模块分配红绿橙色。底色认可不等于用户已对每个按钮细节作最终美学评价。当前默认炫彩ID6,旧0–5及明确保存的旧选择不改编号;偏好域com.dayu.color.preferences/themeIndex。主题/按钮外观不写调色参数或预设。
|
||||
|
||||
关键修改仅DYTheme.mm、DYInspector.mm及两个Info.plist。没有改变调色数学、GPU、Uniform、参数ID、CMS、模板或预设格式。模块标题按原state绘更亮展开态;右侧操作仅增加identifier=layerAction用于绘制,原tag/target/action不变。不同主题继续使用既有配色。
|
||||
|
||||
## 验证与交付
|
||||
|
||||
605项正式原生检查通过。FCP12.4从正式位置加载1.8.4(64),实看统一底色、强化标题/图层操作底板,展开/折叠正常,直方图拿到57,600采样。前后完整预设均8,590字节、逐字节一致,SHA-256 1f05b3e350dd5fbc054de155062aff87fdd4d46c6a762ee06650ad5bd3363982。详见HostRefined1.8.4.json、InstalledSelfTest.json及research/ui-refined-20261104/validation.md。
|
||||
|
||||
本轮正式宿主退出后载入新安装版本;未另做相同64版的第二次冷重开、VoiceOver/系统辅助显示矩阵或Instruments采样。280/320/400栏宽及CMS nil/v2/v3不变使用既有原生检查。源码确认用户认可的底色与表面绘制逐字保留。不要把数值检查/暂定评分当作用户美学认可。
|
||||
|
||||
APP公证34af6e05-cba5-4031-9184-762f758c0889为Accepted,签名、票据、Gatekeeper及唯一发现路径通过。候选63公证记录保存在RefinedCandidate63.json,仅用于视觉沟通,未发布包。正式PKG/Release最终状态见Package.json、Release.json;标签v1.8.4-refined-neon-20261104关联最终包记录,发布后回读另作main提交,不移动标签。APP独立正式安装验收;PKG展开验包不代表重复运行安装脚本。
|
||||
|
||||
## 保持的技术合同
|
||||
|
||||
直方图沿用320×180浮点分析缓存、256档、最多2Hz;透明/非有限像素不计,范围外归端点,共同峰值平方根缩放。RGB页叠亮度与三色,单色页仅相应通道。原流程分析源为一级CST/输入LUT后,新CMS为显示输出转换后、SDR修饰前;不是最终输出/HDR示波器,不保证每个曲线层即时输入。统计在工作线程,UI只画快照;缓存按renderer隔离,失效清空。不要增加全尺寸读取或UI线程像素统计。
|
||||
|
||||
完整预设v7,nil/v2/v3 CMS及模板原默认保持,高级颜色设置默认收起、展开不改参数。完整CMS、UI和恢复历史见research/handoffs/DayuColorThrough1.8.3-20261104.md及其引用的更早交接。源码依赖归档/许可证在ColorManagement,无LFS/子模块;证书/密钥不在Git。本轮未修改NAS后端、网站文章或自动更新清单。
|
||||
|
||||
## 后续流程
|
||||
|
||||
读取当前工作区与实际正式版本,保护其他任务改动。tools/checkpoint.py仅对明确路径提交/推送并核验main,自带仓库锁。tools/deliver.py持有产品交付锁直到宿主验收,保持HEAD以记录实际编译SHA,通过后输入complete。Packaging/build_pkg.py和Packaging/publish_beta.py复用PKG工坊制作、展开校验和Release完整下载;草稿404按历史指南用已登录浏览器下载真实附件后传--verified-download,不重复上传/提前发布。
|
||||
|
||||
只清理本任务生成APP、旧安装备份、提交ZIP、下载和恢复clone;保留正式包、源码、历史包、私人QA媒体。恢复说明RECOVERY.md及对应最终验证报告;Git不替代证书的独立安全备份。
|
||||
|
||||
最终Release385/附件29已发布:https://dayu.media/git/dayu/dayu-color/releases/tag/v1.8.4-refined-neon-20261104。标签提交fe7ddbd6f89b4ee3c7af9dd61e94d99056f414e8;草稿浏览器下载与发布后再次完整下载均核对43009859字节和SHA-256 59c8cee9282260ad97130b1d3d8dc6b09bdf8e8f82cb6c5937bf54ee5880e660。远程独立检出485个跟踪文件、8个依赖源包和编译输入一致通过;本轮未独立重编。临时恢复clone、下载副本、生成APP、提交ZIP及旧安装备份按RefinedCleanup1.8.4.json清理;正式包和历史包保留。
|
||||
@@ -0,0 +1,77 @@
|
||||
# mFilmLook 屏幕控件迁移
|
||||
|
||||
任务日期:2026-11-04,Asia/Shanghai。
|
||||
|
||||
接收项目按当前目录与最近交接先采用「大鱼调色」,主 Bundle ID `com.dayu.color`。编辑前工作区干净,main 与远程 main 均为 `ac9180e47cdcf778544f826a20a92274f6c63813`;正式版 1.8.5(67)。不修改同目录的其它产品。
|
||||
|
||||
参考为用户指定的 `/Applications/motionVFX/Plugins/mFilmLook.app`,内嵌 XPC 服务版本 3.1.4(251215.1955),Universal 文件 SHA-256 `6814e428e99256f23d076c8855f918f9692b8b20f6f7ca5fbc37789bb573a88d`。只读研究屏幕控件,不更改参考产品。
|
||||
|
||||
## 研究问题
|
||||
|
||||
1. 工具条与模块面板如何切换、显示 hover / pressed / selected 状态。
|
||||
2. 命中测试与拖动捕获如何配合;移动阈值、松开与离开如何处理。
|
||||
3. 滑杆如何映射参数、何时写回及结束手势。
|
||||
4. 如何将以上行为接到本项目参数、独立叠层、检查器与撤销中。
|
||||
|
||||
## 实现边界
|
||||
|
||||
以交互规范独立实现,复用本项目的参数定义和绘制系统;不引入参考产品的二进制、图标、字体或渲染算法。所有本项目的图像处理、CMS、预设格式、参数 ID 保持其现有合同。
|
||||
|
||||
画面内提供可收起的调色入口、模块/独立叠层选择、启停与参数分页。按钮抬起时在原命中区域触发;滑杆按下后捕获拖动,即使移出轨道仍继续,松开释放。滑杆实时异步写回主队列;整次手势归入一个宿主撤销组。OSC 回调不等待主队列或直接写宿主模型。
|
||||
|
||||
悬停、展开、分页、模块选择属于瞬时 UI 状态,不创建调色参数或撤销项。保留现有蒙版工具条、钢笔与跟踪路由。
|
||||
|
||||
证据与验证结果将在对应阶段补充;静态研究不能代替真实宿主交互验证。
|
||||
|
||||
## 静态证据
|
||||
|
||||
# mFilmLook 3.1.4 屏幕控件静态调查
|
||||
|
||||
范围:只读用户指定的 mFilmLook XPC Service,未运行插件,未修改原件。Universal 原件 SHA-256 为 6814e428e99256f23d076c8855f918f9692b8b20f6f7ca5fbc37789bb573a88d;供 Ghidra 12.1.4 使用的 arm64 切片为 b1cee1dffd3b490afa0c22db646404b018a0aaadf70d9a6827e95cb178c74357。所有结论是静态观察或由此推导,未声称宿主运行已验证。
|
||||
|
||||
## 可独立实现的交互规范
|
||||
|
||||
- 展开和效果启用分离。drawOSC 0x100002988 从 inspectorBarParams 的字符串 0/1 恢复面板显隐,从 inspectorCheckboxParams 恢复效果启用。mouseUp 0x100005724 比较状态,只写回变化。证据 ev_be6866f470c930f3239f4678fa9ed11da79a23143297864c6ada4d44c8196fa2、ev_7ba43ef534545c3c16f1633f4ee7911a343b72289a8ad1ba6e6d86a96d1b12c5。
|
||||
- 坐标由 FxOnScreenControlAPI_v4 convertPointFromSpace 转换,控件逆矩阵还原局部坐标,带边距矩形命中;隐藏父视图时跳过整个子树。方法 mouseAction 0x1000bdd68、OSCView::getHitElementID 0x10005bd7c / 0x10005bea0。证据 ev_73eedf87215a0cf8da178948205e5ab372ccea33f84d43fe5b1d39d7074973b9、ev_0ba4130d5f30564be2f317cb3353a943f93a64ed039859a973d95250740606a0、ev_b80a7bd65444cae316b421dfe459b0d507d42a2d186233af197680a7c0945390。
|
||||
- 按下保存起点,任意轴超过 2.0 后置拖动标记;松开补算最后位移。mouseDown 0x1000044b4、mouseDrag 0x10000463c、mouseUp 0x100005724。证据 ev_c67c0a4caf048aaec7fd687416ed7ae81110807b606ff4a94b43ece6e699ef08、ev_889e7b4ee2ff8413b326c083dd336e9d602608f2e4d59a35b398412b9ca671ad、ev_7ba43ef534545c3c16f1633f4ee7911a343b72289a8ad1ba6e6d86a96d1b12c5。
|
||||
- 滑杆按值域线性映射:t=(value-min)/(max-min),knobX=(t-0.5)*trackWidth,两端夹紧。轨道点击可跳转;拖动实时写宿主 float 参数,松开再收尾。OSCMarkedSlider::mouseDownAction 0x100026a6c、setMoveVec 0x1000267fc、getValue 0x1000269d4、setValue 0x100026a14。证据 ev_76c35a7740fa1b938d07c6a50f0ff0bb76dadbb01218b199ec887681507f75fc、ev_ccc485dc8ea1e56ebe1cfabf017612a379758f9a394255be4c387ce26ecdff6f、ev_661e01277328a90c0cefa7d18df4864e37fe83b25e6cdadd2532124502c1268b、ev_0505d73a7f2d30b301c123b2331d7f5a9f1ef5f22422e2673723f070de23d794。
|
||||
- 按钮保存按下时的启用/按压状态,释放后清按压。OSCButton::mouseDownAction 0x10006c204、mouseUpAction 0x10006c188。证据 ev_a04295adad17a322579d4478039c8c2693882c767696247fb769f0c2491882a4、ev_f3fd7e86b0686b9ca3468648b46f4130e3950789a9f69c32cc25f77c6a689e7b。
|
||||
- hover 提示延时常量 0.5 秒,mouseExited 隐藏提示并请求重绘。DisplayTooltipIfNeeded 0x100005e04、mouseExited 0x100005f88。提示证据 ev_113c519048990bee9fc99ad832eeefb84bf611d05442919dd22028b098f5d8b2。
|
||||
|
||||
## 未知及移植边界
|
||||
|
||||
- 此管理器鼠标路径未读取 modifiers,无 Shift 精细拖动的原版证据。
|
||||
- IPluginOSCManager::doubleClick 0x1000062b0 只检查约 100ms 时间间隔;未发现双击复位默认值。证据 ev_2b22b07404cc104b0d63f0fa9bd7341f4f3ea6017c00ffd3ae7ea3201ada5bc0。
|
||||
- 有 startUndo/endUndo 的 FxUndoAPI 包装(0x1000c2de0、0x1000c2e48),但间接调用边界未知,不能声明原版拖动撤销分组已完整确认。建议使用接收工程既有撤销契约。证据 ev_f2e3705b55f0d6e7cc1fa284c30b9bf4e909c88b564c27b98f20f7e83f24cdb6、ev_ae0897bf492fb9c9d49f2eb4dc0f5a499c1bf45f0699f1b2cca6adfb71bd3d22。
|
||||
- Ghidra 的 arm64 C++/ObjC 参数签名存在错误,主要结论已对照 otool 汇编。未观察 FCP 实际交互。
|
||||
- 独立重写状态机和布局;原版图标、纹理、资源、二进制、伪源码不进入产品或源码仓库。
|
||||
|
||||
REA 已关闭。完整证据为同目录 evidence-bundle.json;同目录另有 analysis-snapshot.json 和 arm64.asm。缓存仅用于调查复核。
|
||||
|
||||
## 接收项目适配
|
||||
|
||||
画面右上角“画面调色”入口默认收起;展开后可从目录选择现有模块和独立层,参数按可用高度分页。复杂曲线/蜘蛛盘继续使用检查器的原生图形编辑,画面面板提供其已有标量调节,未搬入原版渲染或专有资源。基础调整保留独立的影调、颜色两个启停按钮。展开、选择和页码保留为会话 UI 状态;参考插件的展开参数持久化方式未照搬,以免更改本项目参数/预设合同。
|
||||
|
||||
本项目显式增加单项 ↺ 复位;不声称参考插件有双击复位或 Shift 精调。默认值标记、既有浅/深主题、独立图层 UUID 路由与冲突保护均属于项目适配。2 像素门槛按实际绘制比例换算。鼠标移出只清悬停,不中断仍被捕获的滑杆;播放头/节点失效或 OSC 释放会结束写入组。
|
||||
|
||||
正式构建前 647 项离屏原生检查通过:20 项桥接、16 项界面状态/边界及原有功能,另包含真实 Metal 蒙版跨面板拖动回归。最终正式安装自检及 FCP 实测结果另记 verification。
|
||||
|
||||
## 68 候选宿主修正
|
||||
|
||||
正式候选 68 的入口落在宿主黑边,未通过交互验收。69 将整组布局锚定到实际 OBJECT→CANVAS 图像矩形与画布的交集;不将黑边上可绘制等同于可接收鼠标事件。68 不打包、不发布;公证记录保留,正式交付以最终验收构建为准。
|
||||
|
||||
## 正式候选 69 的验收状态
|
||||
|
||||
1.9.0(69)签名、公证 Accepted、票据、Gatekeeper、唯一 PluginKit 路径与正式安装 648 项原生检查均通过。FCP 已加载并显示图像与新入口。自动坐标点击没有原生 hit/event 证据;本项目 1.4.0/1.4.1 已记录同机 CUA 输入限制,随后实际鼠标成功。因此不能把自动输入无回调当作黑边或新控件导致原生鼠标失败的证据。69 的图像内锚定保留为布局改进。
|
||||
|
||||
已请求用户用实际鼠标展开、拖动、一次撤销。此项确认前不声称完整宿主验收通过,不发布安装包。状态见 verification/HostViewerControls1.9.0.json;原生自检结果见 verification/InstalledSelfTest.json。
|
||||
|
||||
## 用户明确的 70 修正
|
||||
|
||||
用户澄清:69 可调整参数,但整个面板无法拖动位置;其它工具藏在模块标题菜单里不清楚。70 增加标题整组移动与直接可见的十四工具按钮。图层选择按钮增加“图层 ▾”文字。默认基础参数先显示曝光/影调,再显示颜色参数;独立 UUID 和既有数学不变。
|
||||
|
||||
原版通用位置拖动依据:OSCView::setMoveVec 0x10005b5f8,drag=1 允许自身二维位移、drag=0 向父视图传递、drag=2 不移动自身;initialOSC 的 0x1000292b4、0x1000299e8 创建 drag=1 图像容器。mouseDrag 0x10000463c(ev_889e7b4ee2ff8413b326c083dd336e9d602608f2e4d59a35b398412b9ca671ad)在超过门槛后分发通用移动,仅滑杆 ID 另行写参数;mouseUp 0x100005724(ev_7ba43ef534545c3c16f1633f4ee7911a343b72289a8ad1ba6e6d86a96d1b12c5)补算最后位置,调用 addMoveVecToPosition;OSCView 0x10005b85c 固定位置并清临时位移。
|
||||
|
||||
接收实现按下保存标题原点和指针起点,超过门槛后整组重建绘制/命中位置,松开不触发收起。拖面板不调用参数桥接,不产生调色撤销。位置在当前会话保留,缩放/开合时按图像可见区域夹紧。十四按钮指本项目已有工具,未新增 mFilmLook 的渲染算法。
|
||||
|
||||
修正前 652 项原生检查通过;复审另修正被播放头变化打断时的拖动提示残留,并新增中断检查。最终以正式构建自检记录为准。
|
||||
@@ -0,0 +1,11 @@
|
||||
# 炫彩配色收敛
|
||||
|
||||
基线0328399f52a57493f2e56290c52a2b59b51a9598,正式1.8.3(62)。本轮用户明确否定模块各自的大红大绿,仅认可“保存预设”按钮。
|
||||
|
||||
最终方向:保留已认可保存按钮的原粉紫—青色渐变;所有模块统一为接近黑色的石墨底,轻微暖紫偏色,不恢复之前被否定的深蓝灰底。卡片只用低饱和近黑渐变、低对比细边;标题与图标统一银白/淡灰紫,不再给不同模块分配红、绿、橙等色。大面积颜色保持安静,粉紫—青色只用于主按钮、滑杆和顶部细线。颜色/曲线本身的语义RGB、色轮及真实媒体保持原色。
|
||||
|
||||
沿用已应用的界面设计技能;本次主要收敛色彩,使用克制的视觉系统,不新增动画、模糊或结构改动。参数、CMS、模板、直方图统计和显示合同不变。沿用605项既有检查,正式签名公证后在FCP检查真实界面、按钮/文字、直方图及预设不变。保留旧主题0–5、炫彩ID6和唯一正式路径。
|
||||
|
||||
不要用先前交接中“分模块饱和多色”的描述覆盖用户本轮新要求;它现在是被否定的历史方案。
|
||||
|
||||
候选63实看后用户明确认可底色,要求仅强化模块/图层按钮。保持底色与保存预设渐变不变,在模块标题小按钮加入统一、低强度粉青渐变和清晰细边,展开态更亮;三个右侧蒙版/删除/再加一层操作增加克制的按钮底和稍亮图标。不恢复大面积彩色卡片或按模块分配颜色。候选63未打包/发布。
|
||||
@@ -0,0 +1,11 @@
|
||||
# 1.8.4 配色与模块按钮验证
|
||||
|
||||
1.8.3的红/绿/橙模块表面被用户否定,候选63的统一低饱和近黑底色已由用户明确认可。最终64逐字保留63的完整paletteRGB与DYDrawThemeSurface,实现范围只追加模块标题的小面积轻粉青渐变/细边/更亮展开态,以及三个图层操作按钮的低对比底板与更亮图标。保存预设继续使用原渐变端点,未新增动画、透明玻璃或模糊。
|
||||
|
||||
选择克制视觉系统,保留同一套原生AppKit动作、标签、焦点与布局。605项已有检查用于验证模型、CMS、Metal与检查器回归;本轮无新增调色算法,也不为纯配色添加镜像测试。SwiftUI扫描不适用,因为检查器为Objective-C++/AppKit。
|
||||
|
||||
原生检查覆盖280/320/400栏宽、CMS nil/v2/v3不变、所有主题编号、直方图统计/通道/缓存。FCP实机检查正常栏宽的实际颜色、文本、模块展开/折叠、图层按钮可辨识和直方图显隐,完整预设按改动前后逐字节比较。
|
||||
|
||||
炫彩面板为不透明静态表面,正文不使用光晕。新按钮不改变颜色语义或仅靠颜色表示功能,保留眼睛/加号/减号及文字与帮助。未启用VoiceOver、改变系统显示辅助选项或进行Instruments采样;不声称全设备/全辅助技术覆盖或测得帧率。视觉满意度以用户实看反馈为准。
|
||||
|
||||
Apple Fidelity暂定84/100,受辅助技术证据上限约束:平台14、布局13、视觉13、交互17、材质13、辅助6、实现8;不是用户美学满意度分数,也不作为“Apple品质”宣称。相较前版已按用户反馈再次收敛,剩余辅助技术覆盖限制如上。
|
||||
@@ -0,0 +1,15 @@
|
||||
# 冰蓝柔光界面
|
||||
|
||||
2026-11-04。目标:将用户参考的浅冰蓝拟物语言应用到现有 FCP 调色检查器;按钮和模块边框用定向高光反射强化。最新请求取代先前深色底的视觉要求,原交接仅作历史资料。
|
||||
|
||||
采用 standard 交互:原生按钮、弹出菜单、滑杆、数值输入、折叠和蒙版动作不变。比较整卡彩色、仅标题描边、统一浮起冰蓝卡片三种层级,选统一卡片加局部粉彩强调。保留现有参数结构,避免彩色模块争抢注意力。支持 280/320/400 宽检查器与嵌套层。
|
||||
|
||||
新增稳定主题 ID7“冰蓝柔光”,旧 0–6 不改号;新用户默认7,已有明确选择保留。浅冰蓝实色底,深青文字;白色左上反光、冷蓝右下细边、柔和投影形成凸起,数值与滑轨用内凹深度,主操作用低饱和蓝紫—青渐变。展开态加强轮廓,按下态降低浮起感;无新动画或透明材质。增强对比度时改为明确边框,减少透明度时取消装饰阴影,文字不发光。
|
||||
|
||||
状态仍由已有模型与按钮 state 管理;主题只写独立偏好,不写工程调色。直方图算法、工作线程、采样频率、CMS、GPU、预设和模板保持原合同;图表配色适配浅色背景并保留 RGB 语义。
|
||||
|
||||
验证:现有原生检查、文字与控件对比、窄栏布局、正式公证安装后 FCP 实看和折叠/主题切换、完整预设前后一致。最后完成 PKG、Release 下载校验、独立远程检出和生成副本清理。VoiceOver 实听/完整系统辅助显示矩阵若未执行则明确记录。
|
||||
|
||||
用户已明确认可浅色版(“不错”),新要求补充深色同系列。保留ID7绘制与配色,新增ID8“曜石柔光”:中性炭黑、不分模块铺红绿彩底、浅色文字、冷白反射细边和局部青蓝光晕,深色数值凹槽。无文字光晕/动画。此轮最终1.8.5(66)包含双主题,65为已公证且认可的浅色候选,无单独发行包。
|
||||
|
||||
最新要求:删除其它主题,只留“浅色 / 深色”两个明确文字切换。替换9个彩色色签,移除旧palette与旧金色/霓虹绘制。内部保留7/8偏好ID兼容已认可选择,旧0–6读入回落深色,禁止再选择。最终构建67;66的已验包候选尚未上传Release,待最终包成功后清理。
|
||||
@@ -0,0 +1,21 @@
|
||||
# 冰蓝柔光验证
|
||||
|
||||
首次 Release 编译成功,原生预检608项中607通过;浅色文字在 calibrated RGB 转到 sRGB 后最低对比3.956,未达到4.5,交付脚本停止,原正式1.8.4未替换,也未提交Apple。已加深次要文字与行标签,并将强调色文字纳入对比检查,随后重跑完整预检。
|
||||
|
||||
修正后608项全部通过;新主题正文、次要文字、行标签、强调文字在7种表面上的最低sRGB对比4.613。主题切换不写调色或撤销栈;原生控件使用Aqua。0–6旧主题编号保留,新增7。宽280/320/400标题栏按钮布局及既有曲线/直方图/CMS检查通过。
|
||||
|
||||
正式1.8.5(65)已Accepted、票据及Gatekeeper通过后安装,608项正式安装自检通过。FCP12.4实际进程使用正式路径,观察浅冰蓝底、深青文字、白/冷蓝定向反射边、图层操作小凸起按钮、基础调整展开态及凹槽滑杆/数值框。曲线浅底叠层显示57,600采样,显隐有效。正常退出FCP并冷重开同版后冰蓝主题保留。完整预设前后8,590字节逐字节一致。
|
||||
|
||||
没有新增动画/透明材质;增强对比使用明确实边,减少透明度取消装饰阴影。没有执行VoiceOver实听、完整系统辅助显示矩阵或Instruments;无实测帧率声明。SwiftUI扫描不适用AppKit项目。LUT浏览器外观已适配但未单独打开实看。
|
||||
|
||||
设计复核第二遍已按文字对比修正,原生动作和密度保持。Apple Fidelity暂定85/100(平台14、布局13、视觉14、交互17、材质13、辅助6、实现8),受辅助技术/性能证据上限约束;不是用户美学认可,也不称达到90或Apple品质。
|
||||
|
||||
用户认可浅色版后追加曜石柔光(ID8)。浅色palette第7行及浮雕绘制主体与65逐字相同,新增深色提前分支,不覆写浅色参数。最终66预检611项全部通过;深色最低sRGB文字对比5.665,DarkAqua、无文字光晕、主题切换不写模型/撤销通过。光晕为静态NSShadow,仅围绕表面,辅助显示选项下关闭。
|
||||
|
||||
正式66:611项安装自检通过,FCP实际正式路径加载。深色卡片/按钮反射细边、局部青蓝表面光晕、浅色文字、基础调整展开/收起与滑杆数值凹槽实看;LUT浏览窗口深色配色正常,完成退出未应用LUT。7/8双主题切换,直方图57,600采样可用。前后完整预设8,590字节逐字节相同。深色8未做同版第二次冷重开;不将65浅色冷重开说成66深色冷重开。最终仍不声称完整VoiceOver/系统辅助显示/Instruments覆盖。
|
||||
|
||||
最终精简67:旧0–6主题palette与入口已删除,只留两个44pt文字按钮;内部7/8偏好ID兼容已有选择。两套浮雕绘制主体与66逐字相同。610项预检通过;旧金色/霓虹相关检查随功能退役,保留深浅对比度、模型不变与直方图检查,并核验旧模式不可再选。最终宿主与发行结果以下续记。
|
||||
|
||||
最终67正式位置签名/票据/Gatekeeper及610项安装检查通过,FCP实际载入67。顶部只有浅色/深色两个文字按钮,实看两模式并切换回深色,旧彩色色签消失。升级前正常退出/重开后深色偏好恢复。预设最终仍为8,590字节且与首次基线逐字节相同;直方图57,600采样可用。本轮无额外67同版第二次冷重开。
|
||||
|
||||
最终67:APP公证bf104b1f-5161-4970-8d8a-170989825747 Accepted;PKG签名、公证、票据、Gatekeeper与20项展开验包通过。Release386/附件30先草稿真实下载核验,再发布并再次完整下载核验。独立远程标签498文件、8源包和实际编译输入一致;无独立重编声明。候选66包及临时下载/clone/生成APP已按报告清理,未执行PKG安装脚本。
|
||||
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"passResult": true,
|
||||
"articleID": 15792,
|
||||
"url": "https://dayu.media/15792/",
|
||||
"status": "publish",
|
||||
"title": "大鱼调色 1.10.0 公测版:紧急 UI 更新,画布工具与独立工作区",
|
||||
"requestID": "dayu-color-1100-ui-20261104-01",
|
||||
"changedResourceFields": [
|
||||
"cao_downurl",
|
||||
"cao_original_filename"
|
||||
],
|
||||
"commercialAndVideoFieldsPreserved": true,
|
||||
"authorCategoriesTagsPreserved": true,
|
||||
"fcpxSettingsPreserved": true,
|
||||
"seo": {
|
||||
"title": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色1.10.0公测版:紧急UI更新,画布工具与独立工作区"
|
||||
},
|
||||
"description": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色1.10.0公测版紧急UI更新:纵向工具条、画布内曲线与色轮、独立示波器和LUT预览工作区,支持深浅色模式。适用于Apple Silicon、macOS14.6及以上,已在Final Cut Pro12.4实测。完整PKG已签名公证,售价50元,站内有效会员免费。"
|
||||
},
|
||||
"keywords": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色,Final Cut Pro,调色插件,FxPlug4,紧急UI更新,画布曲线,色轮,示波器,LUT预览,会员免费"
|
||||
}
|
||||
},
|
||||
"frontendChecks": [
|
||||
{
|
||||
"url": "https://dayu.media/15792/",
|
||||
"seoExact": true,
|
||||
"bodyImagesInOrder": true,
|
||||
"oldImagesAbsent": true
|
||||
},
|
||||
{
|
||||
"url": "https://dayu.media/15792/?ui-update-1100=20261104",
|
||||
"seoExact": true,
|
||||
"bodyImagesInOrder": true,
|
||||
"oldImagesAbsent": true
|
||||
}
|
||||
],
|
||||
"featuredMedia": {
|
||||
"id": 15843,
|
||||
"url": "https://dayu.media/wp-content/uploads/2026/11/1793804690-fd9bae1dc96ee30.png",
|
||||
"sha256": "c05470ec2b50de0cfdd246b26334aaa895bd288abdb080cad2d4312c120c9a5a",
|
||||
"bytes": 1722606
|
||||
},
|
||||
"bodyImages": [
|
||||
{
|
||||
"file": "dayu-color-1.10.0-interface-01.png",
|
||||
"bytes": 577587,
|
||||
"sha256": "4e948f0599700ddd13f2938a1aac892dea1b6ff60423c2ea15a72e50d5a9ec70",
|
||||
"status": "verified",
|
||||
"id": 15840,
|
||||
"url": "https://dayu.media/wp-content/uploads/2026/11/1793804584-5bc2fbe021e0e8f.png",
|
||||
"alt": "大鱼调色 1.10.0 深色模式:画布左侧纵向工具条、检查器与画布外示波器工作区",
|
||||
"title": "大鱼调色 1.10.0 深色模式",
|
||||
"downloadSHA256": "4e948f0599700ddd13f2938a1aac892dea1b6ff60423c2ea15a72e50d5a9ec70"
|
||||
},
|
||||
{
|
||||
"file": "dayu-color-1.10.0-interface-02-light.png",
|
||||
"bytes": 493551,
|
||||
"sha256": "e0f7ec34a839755efed1d67277e482c753e48aa770279cdb2b75a5963f16257f",
|
||||
"status": "verified",
|
||||
"id": 15841,
|
||||
"url": "https://dayu.media/wp-content/uploads/2026/11/1793804588-7ea8d6f6f860d66.png",
|
||||
"alt": "大鱼调色 1.10.0 浅色模式:浅色纵向工具条、调色检查器与画布外直方图工作区",
|
||||
"title": "大鱼调色 1.10.0 浅色模式",
|
||||
"downloadSHA256": "e0f7ec34a839755efed1d67277e482c753e48aa770279cdb2b75a5963f16257f"
|
||||
}
|
||||
],
|
||||
"package": {
|
||||
"version": "1.10.0",
|
||||
"build": 72,
|
||||
"bytes": 43090565,
|
||||
"sha256": "ee70461c9b2d2e0ddd78cbcb3371c3b1b36b7f0e5fc69bfccc7ac0f1a3e468d8",
|
||||
"downloadVerified": true
|
||||
},
|
||||
"rawPrivateResponses": "Local build cache only; not committed"
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <Metal/Metal.h>
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
struct Pixel{float r,g,b,a;};
|
||||
int main(int argc,const char **argv){@autoreleasepool{
|
||||
assert(argc==2);id<MTLDevice>device=MTLCreateSystemDefaultDevice();assert(device);NSError *error=nil;id<MTLLibrary>lib=[device newLibraryWithURL:[NSURL fileURLWithPath:@(argv[1])] error:&error];assert(lib);
|
||||
id<MTLComputePipelineState>pipeline=[device newComputePipelineStateWithFunction:[lib newFunctionWithName:@"dyScopeSample"] error:&error];assert(pipeline);
|
||||
auto td=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA32Float width:2 height:2 mipmapped:NO];td.storageMode=MTLStorageModeShared;td.usage=MTLTextureUsageShaderRead;id<MTLTexture>source=[device newTextureWithDescriptor:td];
|
||||
Pixel pixels[]={{4,-.25,.5,.5},{0,1,0,1},{0,0,1,1},{NAN,0,0,0}};[source replaceRegion:MTLRegionMake2D(0,0,2,2) mipmapLevel:0 withBytes:pixels bytesPerRow:sizeof(Pixel)*2];
|
||||
id<MTLBuffer>buffer=[device newBufferWithLength:320*180*sizeof(Pixel) options:MTLResourceStorageModeShared];id<MTLCommandQueue>queue=[device newCommandQueue];
|
||||
for(uint32_t flip=0;flip<2;flip++){
|
||||
auto cb=[queue commandBuffer];auto ce=[cb computeCommandEncoder];[ce setComputePipelineState:pipeline];[ce setTexture:source atIndex:0];[ce setBuffer:buffer offset:0 atIndex:0];[ce setBytes:&flip length:4 atIndex:1];[ce dispatchThreads:MTLSizeMake(320,180,1) threadsPerThreadgroup:MTLSizeMake(8,8,1)];[ce endEncoding];[cb commit];[cb waitUntilCompleted];assert(cb.status==MTLCommandBufferStatusCompleted);
|
||||
auto result=(const Pixel*)buffer.contents;if(!flip){assert(result[0].r==4&&result[0].g==-.25f&&result[0].a==.5f);assert(result[319].g==1);assert(result[179*320].b==1);assert(std::isnan(result[180*320-1].r));}
|
||||
else{assert(result[0].b==1);assert(std::isnan(result[319].r));assert(result[179*320].r==4&&result[179*320].a==.5f);assert(result[180*320-1].g==1);}
|
||||
}
|
||||
return 0;
|
||||
}}
|
||||
@@ -0,0 +1,11 @@
|
||||
#include "../大鱼调色/Plugin/DYScopeMath.hpp"
|
||||
#include <cassert>
|
||||
#include <limits>
|
||||
int main(){
|
||||
using namespace dyscope;RGBA pixels[]={{1,0,0,1},{0,1,0,1},{0,0,1,1},{1.3f,-.2f,.5f,.5f},{2,2,2,0},{NAN,0,0,1}};
|
||||
auto r=measure(pixels,3,2);assert(r.valid==4&&r.transparent==1&&r.nonfinite==1);assert(r.above==1&&r.below==1);assert(r.minimum==-.2f&&r.maximum==1.3f);
|
||||
assert(r.histogram[bin(.2126f)]==1);assert(r.histogram[bin(.7152f)]==1);assert(r.histogram[bin(.0722f)]==1);assert(r.wave[(Bins-1-bin(.2126f))*Width]==1);
|
||||
assert(bin(-100)==0&&bin(100)==Bins-1);assert(bin(std::numeric_limits<float>::max())==Bins-1&&bin(-std::numeric_limits<float>::max())==0);auto im=densityImage(r.wave,false);assert(im.size()==size_t(Width)*Bins*4);assert(im[((Bins-1-bin(.2126f))*Width)*4]>0);
|
||||
auto rgb=densityImage(r.parade,true);assert(rgb.size()==size_t(3)*Width*Bins*4);assert(rgb[(Bins-1-bin(1.f))*3*Width*4]>0);
|
||||
assert(measure(pixels,0,0).valid==0);return 0;
|
||||
}
|
||||
@@ -2,15 +2,15 @@
|
||||
"status": "verified",
|
||||
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"bundleID": "com.dayu.color",
|
||||
"version": "1.8.3",
|
||||
"build": "62",
|
||||
"version": "1.10.0",
|
||||
"build": "72",
|
||||
"team": "B3W25FX5H5",
|
||||
"notaryID": "706a58bb-2fa4-4b1e-b392-de60d93aef49",
|
||||
"notaryID": "c0209032-38d2-4434-8e37-7f911414c3c6",
|
||||
"notaryStatus": "Accepted",
|
||||
"gatekeeper": "/Library/Plug-Ins/FxPlug/大鱼调色.app: accepted\nsource=Notarized Developer ID",
|
||||
"sourceCommit": "3fd015224037df944b428684c43ec8ec7accea85",
|
||||
"sourceCommit": "80dec904bedf5f704b29d16325fa95d639f3a250",
|
||||
"templatePath": "/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef",
|
||||
"templateSHA256": "3f4f642146ae60710b865bd131c0d0be458e6430de54b50bd49dc9637643c891",
|
||||
"shaderSHA256": "38395fc34a3e3f222c34abc7b643df820f6a3c1a12eac52f2f9a6beaa0a7da76",
|
||||
"hostVerification": "verification/HostNeon1.8.3.json"
|
||||
"shaderSHA256": "bedde862e59d92dc2b0af19eba39ae35f77400a8553973b9180637f73dbb92e3",
|
||||
"hostVerification": "verification/HostWorkspace1.10.0.json"
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"version": "1.8.5",
|
||||
"build": "66",
|
||||
"host": "Final Cut Pro 12.4",
|
||||
"formalPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"compiledSource": "07a3f7bd4d32a544c9d045768d93ebfd30e8a48d",
|
||||
"nativeChecks": 611,
|
||||
"checks": {
|
||||
"light65PaletteAndReliefBodyPreservedByteIdentical": true,
|
||||
"neutralCharcoalSurfacesObserved": true,
|
||||
"lightTextAndReflectiveRimsObserved": true,
|
||||
"subtleCyanSurfaceGlowObserved": true,
|
||||
"insetFieldsAndSliderTracksObserved": true,
|
||||
"moduleExpandCollapse": true,
|
||||
"lightDarkThemeSwitch": true,
|
||||
"darkLUTBrowserOpenedAndClosedWithoutApplyingLUT": true,
|
||||
"histogram57600SamplesAvailable": true,
|
||||
"presetBeforeAfterByteIdentical": true
|
||||
},
|
||||
"preset": {
|
||||
"before": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/fcp-qa/soft65-before.json",
|
||||
"after": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/fcp-qa/soft66-after.json",
|
||||
"bytes": 8590,
|
||||
"sha256": "1f05b3e350dd5fbc054de155062aff87fdd4d46c6a762ee06650ad5bd3363982"
|
||||
},
|
||||
"limitations": [
|
||||
"Light theme cold reopen was verified on approved65;66 was loaded after formal host restart, but no second same-build cold reopen specifically after choosing dark8.",
|
||||
"No VoiceOver spoken check, full system display-setting matrix or Instruments profiling; static opaque drawing and reduced-effects paths reviewed.",
|
||||
"280/320/400 layout, nine themes, CMS nil/v2/v3 and histogram contracts use native diagnostics.",
|
||||
"LUT browser dark palette observed; light browser not separately observed.",
|
||||
"APP independently installed; PKG expansion verification does not execute installer scripts."
|
||||
],
|
||||
"passResult": true
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"version": "1.8.4",
|
||||
"build": "64",
|
||||
"host": "Final Cut Pro 12.4",
|
||||
"formalPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"compiledSource": "55b66a358cf4c52eeb6ad89acde822cb73be3137",
|
||||
"nativeChecks": 605,
|
||||
"checks": {
|
||||
"approvedCandidate63PaletteAndSurfaceCodeByteIdentical": true,
|
||||
"uniformGraphiteSurfacesObserved": true,
|
||||
"smallPinkCyanModuleHeadersAndExpandedStateObserved": true,
|
||||
"layerActionBackplatesVisible": true,
|
||||
"primaryActionGradientPreserved": true,
|
||||
"headerExpandCollapse": true,
|
||||
"themePersistedAcrossFormalHostRestart": true,
|
||||
"histogram57600SamplesAvailable": true,
|
||||
"settingsInitiallyCollapsed": true,
|
||||
"presetBeforeAfterByteIdentical": true
|
||||
},
|
||||
"preset": {
|
||||
"before": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/fcp-qa/refined63-before.json",
|
||||
"after": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/fcp-qa/refined64-after.json",
|
||||
"bytes": 8590,
|
||||
"sha256": "1f05b3e350dd5fbc054de155062aff87fdd4d46c6a762ee06650ad5bd3363982"
|
||||
},
|
||||
"limitations": [
|
||||
"AppKit normal-width FCP observation; 280/320/400 layouts and CMS nil/v2/v3 invariance use existing native diagnostics.",
|
||||
"No separate same-build cold reopen, VoiceOver/display-setting matrix or Instruments profiling this cosmetic pass. Formal host was restarted into this installed build.",
|
||||
"No rendering, histogram algorithm, template, CMS, parameter or preset-format changes; prior histogram and rendering acceptance retained.",
|
||||
"Package expansion will verify installer structure; APP independently installed, not reinstalled from PKG."
|
||||
],
|
||||
"passResult": true
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"version": "1.8.5",
|
||||
"build": "65",
|
||||
"host": "Final Cut Pro 12.4",
|
||||
"formalPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"compiledSource": "09e04ca6475cae87cc773eb33c983456d6099dd8",
|
||||
"nativeChecks": 608,
|
||||
"checks": {
|
||||
"iceBlueLightSurfaceObserved": true,
|
||||
"reflectiveWhiteBlueRimsObserved": true,
|
||||
"raisedLayerActionButtonsObserved": true,
|
||||
"insetNumberFieldsAndSliderTracksObserved": true,
|
||||
"softPrimaryActionGradientObserved": true,
|
||||
"moduleExpandCollapse": true,
|
||||
"lightThemePersistsAfterSameBuildColdReopen": true,
|
||||
"histogram57600SamplesAvailable": true,
|
||||
"histogramHideShow": true,
|
||||
"presetBeforeAfterByteIdentical": true
|
||||
},
|
||||
"preset": {
|
||||
"before": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/fcp-qa/soft65-before.json",
|
||||
"after": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/fcp-qa/soft65-after.json",
|
||||
"bytes": 8590,
|
||||
"sha256": "1f05b3e350dd5fbc054de155062aff87fdd4d46c6a762ee06650ad5bd3363982"
|
||||
},
|
||||
"limitations": [
|
||||
"FCP normal-width visual acceptance; 280/320/400 header layout and CMS nil/v2/v3 invariance use native diagnostics.",
|
||||
"No VoiceOver spoken validation, full system display-setting matrix or Instruments profiling; reduced-effects paths statically reviewed.",
|
||||
"LUT browser light palette code adapted but separate LUT browser window not manually opened in this pass.",
|
||||
"APP independently installed and tested; future PKG expansion does not mean its installer scripts were executed."
|
||||
],
|
||||
"passResult": true
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"version": "1.8.5",
|
||||
"build": "67",
|
||||
"host": "Final Cut Pro 12.4",
|
||||
"formalPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"compiledSource": "d39004c26af3c0c5853111faef7e40e6c66f6aa6",
|
||||
"nativeChecks": 610,
|
||||
"checks": {
|
||||
"onlyTwoLabeledAppearanceButtonsObserved": true,
|
||||
"legacyColorSwatchesAbsent": true,
|
||||
"lightAndDarkBothObserved": true,
|
||||
"bothReliefDrawingBodiesPreservedByteIdenticalTo66": true,
|
||||
"modeSwitchAndExclusiveSelection": true,
|
||||
"darkPreferenceRestoredOnFormalUpgradeRestart": true,
|
||||
"histogram57600SamplesAvailable": true,
|
||||
"presetBeforeAfterByteIdentical": true
|
||||
},
|
||||
"preset": {
|
||||
"before": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/fcp-qa/soft65-before.json",
|
||||
"after": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/fcp-qa/soft67-after.json",
|
||||
"bytes": 8590,
|
||||
"sha256": "1f05b3e350dd5fbc054de155062aff87fdd4d46c6a762ee06650ad5bd3363982"
|
||||
},
|
||||
"limitations": [
|
||||
"Formal host quit/restart loaded67 with saved dark preference; no second same-build cold reopen after final button clicks.",
|
||||
"Light65 same-build cold reopen, deep style and LUT browser66 acceptance retained as historical evidence; both surface drawing bodies unchanged.",
|
||||
"No VoiceOver spoken check, full system display-setting matrix or Instruments profiling; reduced-effects paths statically reviewed.",
|
||||
"280/320/400 widths and old appearance unselectable use native diagnostics.",
|
||||
"APP independently installed; PKG expansion does not execute its installer scripts."
|
||||
],
|
||||
"passResult": true
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"status": "verified",
|
||||
"version": "1.9.0",
|
||||
"build": "70",
|
||||
"sourceCommit": "30d413dc423a739f0c00fede41ffde39f3e11cf0",
|
||||
"installedPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"notaryStatus": "Accepted",
|
||||
"notaryID": "725eb423-bc88-407b-ba23-ce9e0c9f5666",
|
||||
"installedNativeChecks": 653,
|
||||
"installedNativePass": true,
|
||||
"host": "Final Cut Pro 12.4",
|
||||
"observed": [
|
||||
"FCP loaded the service from the unique formal FxPlug path",
|
||||
"Existing grading image rendered",
|
||||
"Custom inspector displays 1.9.0",
|
||||
"New grip title is visible inside the image"
|
||||
],
|
||||
"newNativeCoverage": [
|
||||
"Whole panel drag moves all child drawing and hit geometry",
|
||||
"Mouse-up final position and drag does not collapse",
|
||||
"All fourteen existing tools are directly selectable without grading writes",
|
||||
"Playhead interruption clears drag state",
|
||||
"Existing live scalar, independent layer, mask and undo checks remain passing"
|
||||
],
|
||||
"pending": [],
|
||||
"priorFeedback": "Build69 adjusted parameters but lacked whole-panel movement and hid other tools in a catalog; build70 corrects these two issues. See Viewer69Candidate.json and the research report.",
|
||||
"automationLimitation": "Physical panel move/tool switch accepted by the user. CUA is not used as proof of native OSC input; scalar/undo invariants are covered by the 653 installed native checks, with prior manual adjustment feedback recorded for build69.",
|
||||
"passResult": true,
|
||||
"physicalMouseConfirmation": {
|
||||
"date": "2026-11-04",
|
||||
"userAnswer": "可以移动,工具也都能切换",
|
||||
"scope": [
|
||||
"Move the complete panel by the title",
|
||||
"See and switch all fourteen tool buttons"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"status": "verified",
|
||||
"passResult": true,
|
||||
"version": "1.10.0",
|
||||
"build": 72,
|
||||
"compiledSource": "80dec904bedf5f704b29d16325fa95d639f3a250",
|
||||
"host": "Final Cut Pro 12.4",
|
||||
"installedPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"nativeChecks": 695,
|
||||
"notaryID": "c0209032-38d2-4434-8e37-7f911414c3c6",
|
||||
"observed": [
|
||||
"Formal signed/notarized build72 loaded from the fixed installation path.",
|
||||
"FCP draws the new vertical tool rail.",
|
||||
"Host-owned auxiliary window opens from the inspector button.",
|
||||
"Heading, scopes/LUT page selector and close button remain visible after the build72 clipping fix.",
|
||||
"Existing project image renders; no reset or LUT selection performed."
|
||||
],
|
||||
"automationLimit": "Native OSC/remote-view input is not reliably triggered by CUA; native model/GPU tests do not replace these physical host checks.",
|
||||
"packageRelease": "Host accepted; signed/notarized PKG and article update verified. Git Release still pending final attachment download verification.",
|
||||
"dataPreservation": "Existing timeline and grade retained; ColorFinale effect was not toggled or removed.",
|
||||
"physicalVerification": {
|
||||
"source": "User actual mouse confirmation in this chat",
|
||||
"answer": "三项都正常",
|
||||
"confirmed": [
|
||||
"Physical canvas curve point drag and one-step undo.",
|
||||
"Physical external LUT page and actual thumbnail preview.",
|
||||
"Live final-output scope refresh after a genuine host render."
|
||||
],
|
||||
"scope": "Canvas curve point drag and one-step undo; external LUT page/preview; final-output scope refresh after moving the playhead."
|
||||
}
|
||||
}
|
||||
+394
-13
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"bundlePath": "/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit",
|
||||
"checks": 605,
|
||||
"checks": 695,
|
||||
"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/F51D5731-45CD-40CC-9C6E-43173AAAA987"
|
||||
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/49D00F24-30A8-4E5C-B83B-6569DA0D71AE"
|
||||
},
|
||||
{
|
||||
"descriptors": 278,
|
||||
@@ -890,7 +890,7 @@
|
||||
"error": "未提供错误信息",
|
||||
"name": "renderer-export-33cube",
|
||||
"pass": true,
|
||||
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/F51D5731-45CD-40CC-9C6E-43173AAAA987/diagnostic-export.cube"
|
||||
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/49D00F24-30A8-4E5C-B83B-6569DA0D71AE/diagnostic-export.cube"
|
||||
},
|
||||
{
|
||||
"bytes": 1186074,
|
||||
@@ -910,7 +910,7 @@
|
||||
},
|
||||
{
|
||||
"heartbeats": 0,
|
||||
"maximumGapMS": 75.1614166656509,
|
||||
"maximumGapMS": 76.67800001217984,
|
||||
"name": "external-activation-main-loop-responsive",
|
||||
"pass": true
|
||||
},
|
||||
@@ -1187,6 +1187,125 @@
|
||||
"name": "primary-mask-blends-cst-only-in-selected-region",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "workspace-remote-attaches-within-host-permissions",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"closePixels": 5468,
|
||||
"headingPixels": 7980,
|
||||
"name": "workspace-offscreen-topbar-heading-pages-close-render-pixels",
|
||||
"pagesPixels": 21772,
|
||||
"pass": true,
|
||||
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/49D00F24-30A8-4E5C-B83B-6569DA0D71AE/workspace-topbar.png"
|
||||
},
|
||||
{
|
||||
"name": "workspace-content-and-scope-pane-explicitly-clip",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "workspace-oversized-scope-dirty-cannot-erase-topbar",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "workspace-follows-remote-container-resize",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"closePixels": 5468,
|
||||
"headingPixels": 7020,
|
||||
"name": "workspace-topbar-survives-resize-and-large-dirty-redraw",
|
||||
"pagesPixels": 21772,
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "workspace-reopens-existing-host-remote-window",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "workspace-closes-host-window-once-and-stops-scopes",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "workspace-host-close-cleans-without-recursive-close",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "workspace-new-scope-session-clears-old-frame",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "workspace-style1-preserves-other-lut-slots-one-undo",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "workspace-remove-style1-applies-once-after-async-boundary",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "workspace-async-playhead-change-keeps-new-frame-untouched",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "workspace-async-lut-conflict-preserves-user-change",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "workspace-async-color-context-conflict-preserves-state",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "workspace-close-cancels-pending-selection-without-write",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "workspace-independent-style-fixture-inserted",
|
||||
"node": "76CAED9A-B4B1-4170-8249-57431BB1F01C",
|
||||
"pass": true,
|
||||
"validDocument": true
|
||||
},
|
||||
{
|
||||
"commitWithinUndo": true,
|
||||
"error": "none",
|
||||
"name": "workspace-independent-style1-writes-target-node-inside-undo",
|
||||
"nodePaths": {
|
||||
"look0": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/49D00F24-30A8-4E5C-B83B-6569DA0D71AE/node.cube"
|
||||
},
|
||||
"pass": true,
|
||||
"rootStyle1": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/49D00F24-30A8-4E5C-B83B-6569DA0D71AE/user-new.cube",
|
||||
"undoStartsAfter": 3,
|
||||
"undoStartsBefore": 2,
|
||||
"written": true
|
||||
},
|
||||
{
|
||||
"name": "workspace-relative-lut-path-is-rejected-before-undo",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "宿主未保存此风格图层的 LUT,原来的选择已保留;请重试",
|
||||
"name": "workspace-node-host-rejection-is-not-reported-as-applied",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "workspace-deleted-node-does-not-write-another-layer",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "workspace-offscreen-fixtures-never-presented",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "workspace-final-output-sample-unpremultiplies-and-converts-real-icc",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "workspace-final-output-worker-publishes-real-scope-rasters",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "workspace-hidden-scope-capture-does-no-work",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "inserted-tool-documents-have-validated-anchors",
|
||||
"pass": true
|
||||
@@ -2141,7 +2260,7 @@
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"coveredPixels": 13508,
|
||||
"coveredPixels": 24076,
|
||||
"name": "native-osc-real-metal-overlay-transparent-around-controls",
|
||||
"pass": true
|
||||
},
|
||||
@@ -2163,6 +2282,14 @@
|
||||
"name": "native-osc-escape-discards-draft-without-host-edit",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "native-osc-mask-gesture-keeps-capture-when-crossing-the-open-viewer-panel",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "native-osc-mask-toolbar-stays-inside-small-letterboxed-image",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "inspector-add-pen-enters-empty-drawing-mode",
|
||||
"pass": true
|
||||
@@ -3108,21 +3235,42 @@
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "compact-six-stable-theme-choices",
|
||||
"name": "compact-only-light-dark-choices",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"minimumContrast": 7.243752441010932,
|
||||
"name": "compact-gold-labels-have-readable-contrast",
|
||||
"minimumContrast": 4.613149142137611,
|
||||
"name": "soft-light-text-contrast-at-least-4.5",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"brightCaptionPixels": 242,
|
||||
"name": "compact-gold-pull-down-draws-readable-caption",
|
||||
"name": "soft-native-controls-use-light-appearance",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "compact-gold-glow-respects-system-display-options",
|
||||
"name": "soft-theme-preserves-grade-and-undo",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"minimumContrast": 5.664966924459792,
|
||||
"name": "soft-dark-text-contrast-at-least-4.5",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "soft-dark-native-appearance-without-text-glow",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "soft-dark-theme-preserves-grade-and-undo",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "compact-removed-themes-cannot-be-selected",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"brightCaptionPixels": 248,
|
||||
"name": "compact-dark-pull-down-draws-readable-caption",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
@@ -3162,10 +3310,243 @@
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "neon-stable-theme-id-and-no-text-glow",
|
||||
"name": "relief-only-two-choices-and-no-text-glow",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-published-snapshot-is-immutable-and-frame-bound",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-drag-writes-before-mouse-up-asynchronously",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-continuous-drag-closes-one-host-undo-group",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-no-op-gesture-does-not-create-an-undo",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-nonfinite-values-are-rejected",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-values-are-clamped-to-the-existing-parameter-domain",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-external-parameter-edit-wins-and-closes-the-group",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-playhead-change-does-not-write-to-a-new-frame",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-stale-snapshot-cannot-overwrite-current-values",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-popup-writes-an-existing-discrete-value",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-popup-values-outside-the-enumeration-are-rejected",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-primary-master-eye-is-not-reactivated-by-the-bridge",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-primary-edit-preserves-master-bypass-and-configures-cst",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-external-primary-bypass-is-not-cleared-by-a-later-drag",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-new-frame-publication-closes-an-abandoned-gesture",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-invalid-node-and-wrong-module-descriptors-do-not-write",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-independent-layer-keeps-root-and-other-layers-isolated",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-deleted-layer-is-not-recreated-by-a-pending-drag",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-removed-base-is-not-written-after-its-removal",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-teardown-closes-a-live-undo-and-rejects-further-writes",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-batch-begin-only-reads-and-preserves-unused-curve-slot",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-curve-xy-are-live-in-one-host-action-before-mouse-up",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-batch-continuous-xy-drag-uses-one-undo",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-incomplete-nonfinite-and-foreign-key-samples-reject-the-entire-batch",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-batch-no-op-does-not-create-an-undo",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-external-y-edit-stops-both-axes-of-the-graphic-gesture",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-one-stale-original-value-rejects-the-entire-graphic-gesture",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-mixed-module-batch-is-rejected-before-any-write",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-independent-curve-xy-commit-together-with-root-isolation",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-single-value-entry-points-remain-compatible-after-batch-extension",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-rejected-second-field-restores-first-field-within-the-same-action",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-bridge-external-cst-configuration-conflict-stops-the-whole-color-wheel",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-vertical-rail-exposes-fourteen-tools-without-a-parameter-panel",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-tools-open-independent-panels-without-editing-the-grade",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-dragging-header-moves-panel-with-final-release-point-and-no-undo",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-label-and-knob-deadzone-do-not-create-edits",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-slider-preserves-grab-offset-and-updates-live",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-slider-captures-outside-and-closes-one-undo",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-base-tone-and-color-eyes-remain-independent",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-empty-removed-tool-never-terminates-another-panels-live-gesture",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-curve-opens-an-editable-graph-beside-existing-panel",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-curve-point-is-live-xy-not-a-scalar-only-control",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-curve-final-release-commits-both-axes-with-one-undo",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-curve-delete-deactivates-the-selected-slot",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-curve-channel-switch-is-view-state-with-no-undo",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-grading-wheel-edits-hue-and-saturation-in-one-gesture",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-graph-panel-retains-precise-parameter-view",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-graph-mode-and-page-buttons-never-overlap",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-closing-one-panel-preserves-other-graph-and-controls",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-floating-editor-layer-menu-selects-only-its-tool-type",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-playhead-change-clears-graphic-capture",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-missing-next-frame-snapshot-preserves-selected-independent-layer",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-new-frame-restores-the-same-independent-editor-target",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-deleted-layer-falls-back-to-surviving-same-tool",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-small-and-retina-canvases-never-hit-outside-visible-image",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-vertical-entry-remains-reachable-above-overlapping-small-panel",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-rail-is-anchored-to-image-and-not-letterbox",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "viewer-real-osc-draws-vertical-rail-curves-and-wheels-offscreen",
|
||||
"pass": true,
|
||||
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/49D00F24-30A8-4E5C-B83B-6569DA0D71AE/viewer-workspace.png"
|
||||
}
|
||||
],
|
||||
"runtimePath": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/F51D5731-45CD-40CC-9C6E-43173AAAA987",
|
||||
"runtimePath": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/49D00F24-30A8-4E5C-B83B-6569DA0D71AE",
|
||||
"scope": "Native model and renderer integration with real Metal/IOSurface textures and fake FxPlug host selectors; no GUI or live host document."
|
||||
}
|
||||
@@ -4,5 +4,15 @@
|
||||
"/Library/Plug-Ins/FxPlug/.dayu-color-previous-e7645188ecbb400ab7d3efe13cf5b8bb.app"
|
||||
],
|
||||
"scope": "Only generated backups identified by candidate delivery records; final build app and loose plugin cleaned by deliver.py. Formal PKG retained; user QA media and historical packages preserved.",
|
||||
"passResult": true
|
||||
"passResult": true,
|
||||
"downloadCopiesRemoved": [
|
||||
"/Volumes/备份/大鱼调色-1.8.3.pkg"
|
||||
],
|
||||
"temporaryRecoveryCloneRemoved": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/restore-neon-mv8fobx6",
|
||||
"generatedBuildAppRemaining": [],
|
||||
"generatedInstallBackupsRemaining": [],
|
||||
"formalPackage": "大鱼调色-1.8.3.pkg",
|
||||
"formalPackagePath": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.8.3.pkg",
|
||||
"releaseID": 384,
|
||||
"assetID": 28
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"remote": "https://dayu.media/git/dayu/dayu-color.git",
|
||||
"clone": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/restore-neon-mv8fobx6",
|
||||
"compiledSource": "3fd015224037df944b428684c43ec8ec7accea85",
|
||||
"gitFsck": "full strict passed",
|
||||
"trackedFilesVerified": 475,
|
||||
"scope": "Independent remote checkout and byte verification of all tracked files; build and live host acceptance use the fixed product build directory. No independent rebuild claimed.",
|
||||
"passResult": true,
|
||||
"releaseTag": "v1.8.3-neon-histogram-20261104",
|
||||
"releaseTagCommit": "a06a3a3914efb6970858baa9cfc6bed62549f09e",
|
||||
"dependencyArchivesVerified": [
|
||||
"OpenColorIO-2.5.2.tar.gz",
|
||||
"expat-2.7.2.tar.gz",
|
||||
"yaml-cpp-0.8.0.tar.gz",
|
||||
"Imath-3.2.1.tar.gz",
|
||||
"pystring-1.1.4.tar.gz",
|
||||
"minizip-ng-4.0.10.tar.gz",
|
||||
"zlib-1.3.1.tar.gz",
|
||||
"sse2neon-227cc413fb2d50b2a10073087be96b59d5364aea.tar.gz"
|
||||
],
|
||||
"compiledInputsMatchTag": true,
|
||||
"releaseTagCheckedOut": true,
|
||||
"temporaryCloneRemoved": true
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"status": "draft-download-required",
|
||||
"releaseID": 384,
|
||||
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.8.3-neon-histogram-20261104",
|
||||
"tag": "v1.8.3-neon-histogram-20261104",
|
||||
"commit": "a06a3a3914efb6970858baa9cfc6bed62549f09e",
|
||||
"assetID": 28,
|
||||
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.8.3-neon-histogram-20261104/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.8.3.pkg",
|
||||
"bytes": 43010609,
|
||||
"sha256": "518f54c12a6680c32be5cb4bd7d01b8a4c49e3d492a0d9d75ac5e46e3345da53"
|
||||
}
|
||||
+14
-14
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"package": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.8.3.pkg",
|
||||
"sha256": "518f54c12a6680c32be5cb4bd7d01b8a4c49e3d492a0d9d75ac5e46e3345da53",
|
||||
"bytes": 43010609,
|
||||
"package": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.10.0.pkg",
|
||||
"sha256": "ee70461c9b2d2e0ddd78cbcb3371c3b1b36b7f0e5fc69bfccc7ac0f1a3e468d8",
|
||||
"bytes": 43090565,
|
||||
"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.8.3",
|
||||
"build": "62"
|
||||
"version": "1.10.0",
|
||||
"build": "72"
|
||||
},
|
||||
{
|
||||
"source": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/pkg-inputs/大鱼调色",
|
||||
"payload": "Library/Application Support/PKGForge/Payload/com.dayu.color.installer.0f5903c7-b19d-4375-99d2-56e68fb2bd7e/CC1BE24D-1F08-475E-A494-5A27FFA6BA2C/大鱼调色"
|
||||
"payload": "Library/Application Support/PKGForge/Payload/com.dayu.color.installer.ae106381-cd3b-41eb-aad0-4c68bc644dbf/C6873B3A-3897-4DC7-BBB3-39146B102C22/大鱼调色"
|
||||
}
|
||||
],
|
||||
"signature": "Package \"大鱼调色-1.8.3.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-04 04:27:21 +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.8.3.pkg: accepted\nsource=Notarized Developer ID",
|
||||
"signature": "Package \"大鱼调色-1.10.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-04 14:43:02 +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.10.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": {
|
||||
"id": "5666e466-7ec5-49fb-beac-f7fc5b4e080c",
|
||||
"name": "大鱼调色-1.8.3.pkg",
|
||||
"name": "大鱼调色-1.10.0.pkg",
|
||||
"status": "Accepted",
|
||||
"createdDate": "2026-11-04T04:27:23.407Z",
|
||||
"id": "9604cc73-153c-4751-ac5b-2cca76b4c219",
|
||||
"createdDate": "2026-11-04T14:43:04.427Z",
|
||||
"message": "Successfully received submission info"
|
||||
},
|
||||
"appCompiledSource": "3fd015224037df944b428684c43ec8ec7accea85",
|
||||
"appBuild": "62",
|
||||
"appCompiledSource": "80dec904bedf5f704b29d16325fa95d639f3a250",
|
||||
"appBuild": "72",
|
||||
"packageBuilderRemote": "https://dayu.media/git/dayu/pkg-forge.git",
|
||||
"packageBuilderCommit": "eb53707c0e67d8ddeab8c1270bb079f1050cfafe",
|
||||
"templateSHA256": {
|
||||
@@ -59,6 +59,6 @@
|
||||
"large.png": "ab12611e8801cff86332ccc505a4cffa0c1120541c2efb9bb9908be2c9fe631a",
|
||||
"small.png": "41fec3138aee904fc39d6982e6fde809243ffec55298dbfe966f4f48d89caf8a"
|
||||
},
|
||||
"installedAppHostAcceptance": "verification/HostNeon1.8.3.json",
|
||||
"installedAppHostAcceptance": "verification/HostWorkspace1.10.0.json",
|
||||
"installScope": "本轮仅生成并验包,未再次执行系统安装;正式 APP 已有独立宿主验收。"
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"status": "installed-awaiting-host-verification",
|
||||
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"bundleID": "com.dayu.color",
|
||||
"version": "1.8.4",
|
||||
"build": "63",
|
||||
"team": "B3W25FX5H5",
|
||||
"notaryID": "319b2d03-2afc-4fed-bd0a-f3949fffc4f8",
|
||||
"notaryStatus": "Accepted",
|
||||
"gatekeeper": "/Library/Plug-Ins/FxPlug/大鱼调色.app: accepted\nsource=Notarized Developer ID",
|
||||
"sourceCommit": "998a9838849da62440e50d4232c3be6c18f504b4",
|
||||
"templatePath": "/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef",
|
||||
"templateSHA256": "3f4f642146ae60710b865bd131c0d0be458e6430de54b50bd49dc9637643c891",
|
||||
"shaderSHA256": "38395fc34a3e3f222c34abc7b643df820f6a3c1a12eac52f2f9a6beaa0a7da76",
|
||||
"previousInstallBackup": "/Library/Plug-Ins/FxPlug/.dayu-color-previous-63e3ea59f6744c2ea3d226642d4bef75.app"
|
||||
}
|
||||
文件差异过大,未显示。
加载差异
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"removedPreviousCandidateBackups": [
|
||||
"/Library/Plug-Ins/FxPlug/.dayu-color-previous-63e3ea59f6744c2ea3d226642d4bef75.app"
|
||||
],
|
||||
"scope": "Generated backups from this task only; user QA media and historical packages preserved.",
|
||||
"passResult": true,
|
||||
"downloadCopiesRemoved": [
|
||||
"/Volumes/备份/大鱼调色-1.8.4.pkg"
|
||||
],
|
||||
"temporaryRecoveryCloneRemoved": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/restore-refined-f98wbwo7",
|
||||
"generatedBuildAppRemaining": [],
|
||||
"generatedInstallBackupsRemaining": [],
|
||||
"formalPackagePath": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.8.4.pkg",
|
||||
"releaseID": 385,
|
||||
"assetID": 29,
|
||||
"finalInstalledSignatureTicketGatekeeper": true
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"remote": "https://dayu.media/git/dayu/dayu-color.git",
|
||||
"clone": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/restore-refined-f98wbwo7",
|
||||
"compiledSource": "55b66a358cf4c52eeb6ad89acde822cb73be3137",
|
||||
"gitFsck": "full strict passed",
|
||||
"scope": "Independent remote checkout and byte/dependency verification; no independent rebuild claimed.",
|
||||
"passResult": true,
|
||||
"releaseTag": "v1.8.4-refined-neon-20261104",
|
||||
"releaseTagCommit": "fe7ddbd6f89b4ee3c7af9dd61e94d99056f414e8",
|
||||
"trackedFilesVerified": 485,
|
||||
"dependencyArchivesVerified": [
|
||||
"OpenColorIO-2.5.2.tar.gz",
|
||||
"expat-2.7.2.tar.gz",
|
||||
"yaml-cpp-0.8.0.tar.gz",
|
||||
"Imath-3.2.1.tar.gz",
|
||||
"pystring-1.1.4.tar.gz",
|
||||
"minizip-ng-4.0.10.tar.gz",
|
||||
"zlib-1.3.1.tar.gz",
|
||||
"sse2neon-227cc413fb2d50b2a10073087be96b59d5364aea.tar.gz"
|
||||
],
|
||||
"compiledInputsMatchTag": true,
|
||||
"releaseTagCheckedOut": true,
|
||||
"temporaryCloneRemoved": true
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"status": "draft-download-required",
|
||||
"releaseID": 385,
|
||||
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.8.4-refined-neon-20261104",
|
||||
"tag": "v1.8.4-refined-neon-20261104",
|
||||
"commit": "fe7ddbd6f89b4ee3c7af9dd61e94d99056f414e8",
|
||||
"assetID": 29,
|
||||
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.8.4-refined-neon-20261104/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.8.4.pkg",
|
||||
"bytes": 43009859,
|
||||
"sha256": "59c8cee9282260ad97130b1d3d8dc6b09bdf8e8f82cb6c5937bf54ee5880e660"
|
||||
}
|
||||
+14
-14
@@ -3,24 +3,24 @@
|
||||
"repository": "dayu/dayu-color",
|
||||
"repositoryID": 52,
|
||||
"private": false,
|
||||
"tag": "v1.8.2-blackgold-20261104",
|
||||
"releaseCommit": "f4bacfbd75404a69f51127356fc861a44c0c27e9",
|
||||
"releaseID": 383,
|
||||
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.8.2-blackgold-20261104",
|
||||
"tag": "v1.8.5-light-dark-20261104",
|
||||
"releaseCommit": "def8c2f6386a3d34453912b9e8f96e37e192796c",
|
||||
"releaseID": 386,
|
||||
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.8.5-light-dark-20261104",
|
||||
"prerelease": true,
|
||||
"assetID": 27,
|
||||
"assetName": "大鱼调色-1.8.2.pkg",
|
||||
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.8.2-blackgold-20261104/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.8.2.pkg",
|
||||
"bytes": 43006067,
|
||||
"sha256": "cbabffc620ad851bd8ecddfaf797c46689722d0f772be409aaa29d0841a2eded",
|
||||
"assetID": 30,
|
||||
"assetName": "大鱼调色-1.8.5.pkg",
|
||||
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.8.5-light-dark-20261104/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.8.5.pkg",
|
||||
"bytes": 43010987,
|
||||
"sha256": "b4540c2be931d9e042ed1a6f2673c001e4b6e0ec67eef0bc22f4b3977af4952b",
|
||||
"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",
|
||||
"draftBrowserDownload": {
|
||||
"path": "/Volumes/备份/大鱼调色-1.8.2.pkg",
|
||||
"sha256": "cbabffc620ad851bd8ecddfaf797c46689722d0f772be409aaa29d0841a2eded",
|
||||
"bytes": 43006067,
|
||||
"sourceURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.8.2-blackgold-20261104/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.8.2.pkg",
|
||||
"actualVisitedURL": "https://dayu.media/git/attachments/45d8d142-9c34-4635-ab9f-2004c0d5a365"
|
||||
"path": "/Volumes/备份/大鱼调色-1.8.5.pkg",
|
||||
"sha256": "b4540c2be931d9e042ed1a6f2673c001e4b6e0ec67eef0bc22f4b3977af4952b",
|
||||
"bytes": 43010987,
|
||||
"sourceURL": "https://dayu.media/git/attachments/5730c6a8-ec4f-4700-bd0c-e7b3bc501462",
|
||||
"downloadedVia": "Existing signed-in Edge session; distinct completed download file"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"package": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.8.5.pkg",
|
||||
"sha256": "1cdf42978ebc75e9bd21fb8b83e65c60d935f7434f773e5b4a63c9e72c4d0102",
|
||||
"bytes": 43012795,
|
||||
"testUnsigned": false,
|
||||
"installationExecuted": false,
|
||||
"checks": [
|
||||
"PKG Developer ID Installer signature",
|
||||
"PKG stapled ticket and Gatekeeper install assessment",
|
||||
"must-close attached to root-authorized payload",
|
||||
"all four FCP/Motion host identifiers",
|
||||
"bundle relocation disabled",
|
||||
"desktop and Bundle ID preinstall guards",
|
||||
"postinstall contains actual FxPlug verification invocations",
|
||||
"GUI worker, registration repair and Finder reveal present",
|
||||
"successful completion and consecutive registration checks",
|
||||
"exact payload contents: 大鱼调色.app",
|
||||
"fixed FxPlug outer APP install path",
|
||||
"outer APP has one real verification action",
|
||||
"service path/identifier/registration version: com.dayu.color.XPC",
|
||||
"nonempty FxPlug service manifest",
|
||||
"payload APP signature, independent ticket and Gatekeeper",
|
||||
"exact payload contents: 大鱼调色",
|
||||
"login-user resource destination: ~/Movies/Motion Templates.localized/Effects.localized",
|
||||
"complete outer APP payload present",
|
||||
"welcome warns to save work and close hosts",
|
||||
"conclusion gives manual APP and host restart instructions"
|
||||
],
|
||||
"resources": [
|
||||
{
|
||||
"source": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"payload": "Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"bundleID": "com.dayu.color",
|
||||
"version": "1.8.5",
|
||||
"build": "66"
|
||||
},
|
||||
{
|
||||
"source": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/pkg-inputs/大鱼调色",
|
||||
"payload": "Library/Application Support/PKGForge/Payload/com.dayu.color.installer.92d6f922-ffdb-4f8a-a73e-3d8e8627080f/7078D1D0-8100-4D5D-BFFD-729D1B7018EB/大鱼调色"
|
||||
}
|
||||
],
|
||||
"signature": "Package \"大鱼调色-1.8.5.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-04 06:11:10 +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.8.5.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": {
|
||||
"message": "Successfully received submission info",
|
||||
"id": "4c69bfb8-4f9e-4c66-9a9e-d370d60e1dd5",
|
||||
"status": "Accepted",
|
||||
"createdDate": "2026-11-04T06:11:11.647Z",
|
||||
"name": "大鱼调色-1.8.5.pkg"
|
||||
},
|
||||
"appCompiledSource": "07a3f7bd4d32a544c9d045768d93ebfd30e8a48d",
|
||||
"appBuild": "66",
|
||||
"packageBuilderRemote": "https://dayu.media/git/dayu/pkg-forge.git",
|
||||
"packageBuilderCommit": "eb53707c0e67d8ddeab8c1270bb079f1050cfafe",
|
||||
"templateSHA256": {
|
||||
"大鱼调色.moef": "3f4f642146ae60710b865bd131c0d0be458e6430de54b50bd49dc9637643c891",
|
||||
"large.png": "ab12611e8801cff86332ccc505a4cffa0c1120541c2efb9bb9908be2c9fe631a",
|
||||
"small.png": "41fec3138aee904fc39d6982e6fde809243ffec55298dbfe966f4f48d89caf8a"
|
||||
},
|
||||
"installedAppHostAcceptance": "verification/HostDualSoft1.8.5.json",
|
||||
"installScope": "本轮仅生成并验包,未再次执行系统安装;正式 APP 已有独立宿主验收。",
|
||||
"supersededBeforeRelease": true,
|
||||
"supersededPackageHeldAt": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/superseded-1.8.5-66.pkg",
|
||||
"supersededPackageRemovedAfterFinalRelease": true
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"passResult": true,
|
||||
"scope": "Only this task’s verified generated copies and recovery clone; historical packages and private QA media preserved.",
|
||||
"removedFiles": [
|
||||
"/Volumes/备份/大鱼调色-1.8.5.pkg",
|
||||
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/superseded-1.8.5-66.pkg",
|
||||
"/tmp/dayu-soft-edit.py",
|
||||
"/tmp/dayu-soft-inspector.py",
|
||||
"/tmp/dayu-dark-relief.py",
|
||||
"/tmp/dayu-two-modes.py"
|
||||
],
|
||||
"removedRecoveryClone": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/restore-soft-anic10xc",
|
||||
"generatedBuildAppRemaining": [],
|
||||
"generatedInstallBackupsRemaining": [],
|
||||
"formalPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"formalPackagePath": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.8.5.pkg",
|
||||
"releaseID": 386,
|
||||
"assetID": 30,
|
||||
"finalInstalledSignatureTicketGatekeeper": true
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"status": "verified",
|
||||
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"bundleID": "com.dayu.color",
|
||||
"version": "1.8.5",
|
||||
"build": "65",
|
||||
"team": "B3W25FX5H5",
|
||||
"notaryID": "41523305-5eb7-4f24-b4d9-b39044c48387",
|
||||
"notaryStatus": "Accepted",
|
||||
"gatekeeper": "/Library/Plug-Ins/FxPlug/大鱼调色.app: accepted\nsource=Notarized Developer ID",
|
||||
"sourceCommit": "09e04ca6475cae87cc773eb33c983456d6099dd8",
|
||||
"templatePath": "/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef",
|
||||
"templateSHA256": "3f4f642146ae60710b865bd131c0d0be458e6430de54b50bd49dc9637643c891",
|
||||
"shaderSHA256": "38395fc34a3e3f222c34abc7b643df820f6a3c1a12eac52f2f9a6beaa0a7da76",
|
||||
"hostVerification": "verification/HostSoft1.8.5.json"
|
||||
}
|
||||
文件差异过大,未显示。
加载差异
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"remote": "https://dayu.media/git/dayu/dayu-color.git",
|
||||
"clone": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/restore-soft-anic10xc",
|
||||
"compiledSource": "d39004c26af3c0c5853111faef7e40e6c66f6aa6",
|
||||
"gitFsck": "full strict passed",
|
||||
"scope": "Independent remote checkout and byte/dependency verification; no independent rebuild claimed.",
|
||||
"passResult": true,
|
||||
"lightCandidateCompiledSource": "09e04ca6475cae87cc773eb33c983456d6099dd8",
|
||||
"dependencyArchivesVerified": [
|
||||
"OpenColorIO-2.5.2.tar.gz",
|
||||
"expat-2.7.2.tar.gz",
|
||||
"yaml-cpp-0.8.0.tar.gz",
|
||||
"Imath-3.2.1.tar.gz",
|
||||
"pystring-1.1.4.tar.gz",
|
||||
"minizip-ng-4.0.10.tar.gz",
|
||||
"zlib-1.3.1.tar.gz",
|
||||
"sse2neon-227cc413fb2d50b2a10073087be96b59d5364aea.tar.gz"
|
||||
],
|
||||
"releaseTag": "v1.8.5-light-dark-20261104",
|
||||
"releaseTagCommit": "def8c2f6386a3d34453912b9e8f96e37e192796c",
|
||||
"trackedFilesVerified": 498,
|
||||
"compiledInputsMatchTag": true,
|
||||
"releaseTagCheckedOut": true,
|
||||
"temporaryCloneRemoved": true
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"status": "draft-download-required",
|
||||
"releaseID": 386,
|
||||
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.8.5-light-dark-20261104",
|
||||
"tag": "v1.8.5-light-dark-20261104",
|
||||
"commit": "def8c2f6386a3d34453912b9e8f96e37e192796c",
|
||||
"assetID": 30,
|
||||
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.8.5-light-dark-20261104/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.8.5.pkg",
|
||||
"bytes": 43010987,
|
||||
"sha256": "b4540c2be931d9e042ed1a6f2673c001e4b6e0ec67eef0bc22f4b3977af4952b",
|
||||
"requestedBrowserURL": "https://dayu.media/git/attachments/5730c6a8-ec4f-4700-bd0c-e7b3bc501462"
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"status": "installed-awaiting-host-verification",
|
||||
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"bundleID": "com.dayu.color",
|
||||
"version": "1.9.0",
|
||||
"build": "68",
|
||||
"team": "B3W25FX5H5",
|
||||
"notaryID": "fa8512c4-c6e1-4822-a333-ef3d3e76235c",
|
||||
"notaryStatus": "Accepted",
|
||||
"gatekeeper": "/Library/Plug-Ins/FxPlug/大鱼调色.app: accepted\nsource=Notarized Developer ID",
|
||||
"sourceCommit": "cc037340bf45e769e86a721a4fec8db440cf467e",
|
||||
"templatePath": "/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef",
|
||||
"templateSHA256": "3f4f642146ae60710b865bd131c0d0be458e6430de54b50bd49dc9637643c891",
|
||||
"shaderSHA256": "38395fc34a3e3f222c34abc7b643df820f6a3c1a12eac52f2f9a6beaa0a7da76",
|
||||
"previousInstallBackup": "/Library/Plug-Ins/FxPlug/.dayu-color-previous-ed38e8c088e64ebfa3eac829b7fc04b1.app",
|
||||
"hostResult": "Not accepted: collapsed viewer entry was drawn in letterbox; correcting viewport anchoring before final delivery."
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"status": "installed-awaiting-host-verification",
|
||||
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"bundleID": "com.dayu.color",
|
||||
"version": "1.9.0",
|
||||
"build": "69",
|
||||
"team": "B3W25FX5H5",
|
||||
"notaryID": "bd821a49-f910-45f6-ad18-43d3b3398aab",
|
||||
"notaryStatus": "Accepted",
|
||||
"gatekeeper": "/Library/Plug-Ins/FxPlug/大鱼调色.app: accepted\nsource=Notarized Developer ID",
|
||||
"sourceCommit": "0ab448d04f4fa61af1a371e17806df67b78a380b",
|
||||
"templatePath": "/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef",
|
||||
"templateSHA256": "3f4f642146ae60710b865bd131c0d0be458e6430de54b50bd49dc9637643c891",
|
||||
"shaderSHA256": "38395fc34a3e3f222c34abc7b643df820f6a3c1a12eac52f2f9a6beaa0a7da76",
|
||||
"previousInstallBackup": "/Library/Plug-Ins/FxPlug/.dayu-color-previous-26e470123a7445029efa4dd24626dd3e.app",
|
||||
"hostResult": "User confirmed parameter adjustment; clarified the whole panel cannot move and the other tools are not discoverable. Superseded by build70; not packaged or released."
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"status": "notarized-installed-candidate-superseded-before-release",
|
||||
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"bundleID": "com.dayu.color",
|
||||
"version": "1.10.0",
|
||||
"build": "71",
|
||||
"team": "B3W25FX5H5",
|
||||
"notaryID": "5a78e3ed-2729-40ee-8962-f4c18a1c8e83",
|
||||
"notaryStatus": "Accepted",
|
||||
"gatekeeper": "/Library/Plug-Ins/FxPlug/大鱼调色.app: accepted\nsource=Notarized Developer ID",
|
||||
"sourceCommit": "5cf4ba75b3b39dafebcfb5178a97e61d9005b878",
|
||||
"templatePath": "/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef",
|
||||
"templateSHA256": "3f4f642146ae60710b865bd131c0d0be458e6430de54b50bd49dc9637643c891",
|
||||
"shaderSHA256": "bedde862e59d92dc2b0af19eba39ae35f77400a8553973b9180637f73dbb92e3",
|
||||
"previousInstallBackup": "/Library/Plug-Ins/FxPlug/.dayu-color-previous-f5faa3ad9588406299fbc75187b487ba.app",
|
||||
"hostIssue": "FCP remote workspace scope body painted above header; title/page switch/close controls obscured. Native 691 checks passed but did not detect sibling overdraw. Root view clipping fix required; build72 will supersede."
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"status": "accepted-app-copies-cleaned-release-package-pending",
|
||||
"formalPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"formalVersion": "1.9.0",
|
||||
"formalBuild": "70",
|
||||
"removedOldAppBackups": [
|
||||
{
|
||||
"path": "/Library/Plug-Ins/FxPlug/.dayu-color-previous-ed38e8c088e64ebfa3eac829b7fc04b1.app",
|
||||
"build": "67",
|
||||
"removed": true
|
||||
},
|
||||
{
|
||||
"path": "/Library/Plug-Ins/FxPlug/.dayu-color-previous-26e470123a7445029efa4dd24626dd3e.app",
|
||||
"build": "68",
|
||||
"removed": true
|
||||
},
|
||||
{
|
||||
"path": "/Library/Plug-Ins/FxPlug/.dayu-color-previous-7835c434a23c4136b7f09bae2ae96a4d.app",
|
||||
"build": "69",
|
||||
"removed": true
|
||||
}
|
||||
],
|
||||
"deliveryGeneratedCopiesAbsent": [
|
||||
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/DerivedData/Build/Products/Release/大鱼调色.app",
|
||||
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/DerivedData/Build/Products/Release/大鱼调色 XPC Service.pluginkit",
|
||||
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/notarization-submission.zip"
|
||||
],
|
||||
"userMediaAndPresetsPreserved": true,
|
||||
"scope": "Only known backup APPs created by this task were removed after installed host acceptance. Historical installers and user data were retained."
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"status": "remote-source-verified-awaiting-final-host-and-release",
|
||||
"commit": "30d413dc423a739f0c00fede41ffde39f3e11cf0",
|
||||
"remote": "https://dayu.media/git/dayu/dayu-color.git",
|
||||
"trackedFiles": 511,
|
||||
"fsck": true,
|
||||
"trackedWorkingTreeClean": true,
|
||||
"syntaxChecks": {
|
||||
"DYPlugIn.mm": {
|
||||
"passResult": true,
|
||||
"returncode": 0
|
||||
},
|
||||
"DYDiagnostics.mm": {
|
||||
"passResult": true,
|
||||
"returncode": 0
|
||||
}
|
||||
},
|
||||
"cxxStandard": "c++20",
|
||||
"sourceArchivesVerified": [
|
||||
"OpenColorIO-2.5.2.tar.gz",
|
||||
"expat-2.7.2.tar.gz",
|
||||
"yaml-cpp-0.8.0.tar.gz",
|
||||
"Imath-3.2.1.tar.gz",
|
||||
"pystring-1.1.4.tar.gz",
|
||||
"minizip-ng-4.0.10.tar.gz",
|
||||
"zlib-1.3.1.tar.gz",
|
||||
"sse2neon-227cc413fb2d50b2a10073087be96b59d5364aea.tar.gz"
|
||||
],
|
||||
"lfs": false,
|
||||
"submodules": false,
|
||||
"scope": "Independent remote clone, Git object and clean-checkout checks, eight dependency archive hashes, fresh syntax compilation of both plugin and diagnostic translation units. CMS dependency rebuild was not repeated."
|
||||
}
|
||||
二进制文件未显示。
|
之后 宽度: | 高度: | 大小: 426 KiB |
二进制文件未显示。
|
之后 宽度: | 高度: | 大小: 27 KiB |
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"status": "accepted-app-copies-cleaned-package-notarized-article-updated-release-pending",
|
||||
"formalPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"formalBuild": 72,
|
||||
"rollbackCopiesRetained": [],
|
||||
"sourceRecoveryCheckout": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/osc-recovery",
|
||||
"cacheAppPresent": false,
|
||||
"looseXPCPresent": false,
|
||||
"submissionZipPresent": false,
|
||||
"package1100Created": false,
|
||||
"release1100Published": false,
|
||||
"scope": "User physical host checks passed. Only the two task-created, identity-verified, unused build70/71 recovery apps were removed under the product lock. Formal build72 and historical packages retained.",
|
||||
"rollbackCopiesRemoved": [
|
||||
{
|
||||
"path": "/Library/Plug-Ins/FxPlug/.dayu-color-previous-f5faa3ad9588406299fbc75187b487ba.app",
|
||||
"build": "70",
|
||||
"removed": true
|
||||
},
|
||||
{
|
||||
"path": "/Library/Plug-Ins/FxPlug/.dayu-color-previous-f610e41f0ca64e88becf04d0b0510b02.app",
|
||||
"build": "71",
|
||||
"removed": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"status": "compiled-source-remotely-recovered-host-accepted",
|
||||
"remote": "https://dayu.media/git/dayu/dayu-color.git",
|
||||
"commit": "80dec904bedf5f704b29d16325fa95d639f3a250",
|
||||
"trackedFiles": 526,
|
||||
"fsck": true,
|
||||
"trackedWorkingTreeClean": true,
|
||||
"syntaxChecks": {
|
||||
"DYPlugIn.mm": {
|
||||
"passResult": true,
|
||||
"returncode": 0
|
||||
},
|
||||
"DYDiagnostics.mm": {
|
||||
"passResult": true,
|
||||
"returncode": 0
|
||||
},
|
||||
"DYColorWorkspace.mm": {
|
||||
"passResult": true,
|
||||
"returncode": 0
|
||||
},
|
||||
"DYRenderer.mm": {
|
||||
"passResult": true,
|
||||
"returncode": 0
|
||||
}
|
||||
},
|
||||
"cxxStandard": "c++20",
|
||||
"sourceArchivesVerified": [
|
||||
"OpenColorIO-2.5.2.tar.gz",
|
||||
"expat-2.7.2.tar.gz",
|
||||
"yaml-cpp-0.8.0.tar.gz",
|
||||
"Imath-3.2.1.tar.gz",
|
||||
"pystring-1.1.4.tar.gz",
|
||||
"minizip-ng-4.0.10.tar.gz",
|
||||
"zlib-1.3.1.tar.gz",
|
||||
"sse2neon-227cc413fb2d50b2a10073087be96b59d5364aea.tar.gz"
|
||||
],
|
||||
"lfs": false,
|
||||
"submodules": false,
|
||||
"scope": "Independent remote checkout, source/object and eight pinned archive hashes verified; fresh syntax compilation of plugin, diagnostics, workspace and renderer. Full CMS dependency rebuild not repeated. Formal build72 passed 695 native checks; user physical curve drag/undo, LUT preview and live scope refresh checks passed."
|
||||
}
|
||||
@@ -57,6 +57,7 @@
|
||||
"/Localized: Plugin/Localizable.strings",
|
||||
Plugin/DYAutoGrade.mm,
|
||||
Plugin/DYColorTables.mm,
|
||||
Plugin/DYColorWorkspace.mm,
|
||||
Plugin/DYDiagnostics.mm,
|
||||
Plugin/DYGrade.metal,
|
||||
Plugin/DYInspector.mm,
|
||||
@@ -67,6 +68,7 @@
|
||||
Plugin/DYModel.mm,
|
||||
Plugin/DYPlugIn.mm,
|
||||
Plugin/DYRenderer.mm,
|
||||
Plugin/DYScopeSample.mm,
|
||||
Plugin/DYTheme.mm,
|
||||
Plugin/DYToolState.mm,
|
||||
Plugin/DYTracking.metal,
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
#import <AppKit/AppKit.h>
|
||||
#import <FxPlug/FxPlugSDK.h>
|
||||
@class DYRenderer,DYLUTLibrary;
|
||||
/// One host-owned auxiliary window, bound to the supplied clip/layer manager.
|
||||
/// Close before that manager's underlying host/inspector is released.
|
||||
@interface DYColorWorkspace : NSObject
|
||||
- (instancetype)initWithManager:(id<PROAPIAccessing>)manager renderer:(DYRenderer *)renderer library:(DYLUTLibrary *)library title:(NSString *)title;
|
||||
- (void)showRelativeToView:(NSView *)anchor;
|
||||
- (void)close;
|
||||
@property(nonatomic,readonly) BOOL visible;
|
||||
@property(nonatomic,readonly) NSString *lastError;
|
||||
- (void)updatePalette;
|
||||
@end
|
||||
@@ -0,0 +1,232 @@
|
||||
#import "DYColorWorkspace.h"
|
||||
#import "DYRenderer.h"
|
||||
#import "DYLUTBrowser.h"
|
||||
#import "DYLUTLibrary.h"
|
||||
#import "DYTheme.h"
|
||||
#import "DYToolState.h"
|
||||
#include "DYScopeMath.hpp"
|
||||
#include <cmath>
|
||||
|
||||
@class DYWorkspaceRoot;
|
||||
@interface DYColorWorkspace (Internal)
|
||||
- (void)layoutWorkspace;
|
||||
- (void)scopeChanged:(NSNotification *)notification;
|
||||
@end
|
||||
@interface DYWorkspaceLifetime:NSObject
|
||||
@property(nonatomic,assign) DYColorWorkspace *owner;
|
||||
@end
|
||||
@implementation DYWorkspaceLifetime @end
|
||||
@interface DYWorkspaceRoot:NSView
|
||||
@property(nonatomic,assign) DYColorWorkspace *owner;
|
||||
@end
|
||||
@implementation DYWorkspaceRoot
|
||||
- (instancetype)initWithFrame:(NSRect)frame{if((self=[super initWithFrame:frame]))self.clipsToBounds=YES;return self;}
|
||||
- (BOOL)isFlipped{return YES;}
|
||||
- (BOOL)isOpaque{return YES;}
|
||||
- (void)drawRect:(NSRect)dirty{[DYThemeColor(@"background")setFill];NSRectFill(NSIntersectionRect(dirty,self.bounds));}
|
||||
- (void)resizeSubviewsWithOldSize:(NSSize)old{[super resizeSubviewsWithOldSize:old];[_owner layoutWorkspace];}
|
||||
@end
|
||||
@interface DYScopePlot:NSView
|
||||
@property(nonatomic,copy) NSDictionary *metadata;
|
||||
@property(nonatomic) NSInteger mode;
|
||||
@end
|
||||
@implementation DYScopePlot {
|
||||
NSImage *_wave,*_parade;
|
||||
}
|
||||
- (BOOL)isFlipped{return YES;}
|
||||
- (BOOL)isOpaque{return YES;}
|
||||
- (void)dealloc{[_metadata release];[_wave release];[_parade release];[super dealloc];}
|
||||
- (NSImage *)imageForData:(NSData *)data width:(NSUInteger)width{
|
||||
if(data.length!=width*dyscope::Bins*4)return nil;
|
||||
NSBitmapImageRep *rep=[[[NSBitmapImageRep alloc]initWithBitmapDataPlanes:nil pixelsWide:width pixelsHigh:dyscope::Bins bitsPerSample:8 samplesPerPixel:4 hasAlpha:YES isPlanar:NO colorSpaceName:NSDeviceRGBColorSpace bytesPerRow:width*4 bitsPerPixel:32]autorelease];
|
||||
if(!rep)return nil;memcpy(rep.bitmapData,data.bytes,data.length);NSImage *image=[[[NSImage alloc]initWithSize:NSMakeSize(width,dyscope::Bins)]autorelease];[image addRepresentation:rep];return image;
|
||||
}
|
||||
- (void)setMetadata:(NSDictionary *)metadata{
|
||||
if(_metadata==metadata)return;[_metadata release];_metadata=[metadata copy];[_wave release];_wave=[[self imageForData:metadata[@"waveform"] width:dyscope::Width]retain];[_parade release];_parade=[[self imageForData:metadata[@"parade"] width:3*dyscope::Width]retain];
|
||||
self.accessibilityLabel=[NSString stringWithFormat:@"%@,有效取样 %@,低于显示范围 %@,高于显示范围 %@",metadata[@"domain"]?:@"等待最终输出",metadata[@"valid"]?:@0,metadata[@"below"]?:@0,metadata[@"above"]?:@0];[self setNeedsDisplay:YES];
|
||||
}
|
||||
- (void)setMode:(NSInteger)mode{_mode=mode;[self setNeedsDisplay:YES];}
|
||||
- (void)drawRect:(NSRect)dirty{
|
||||
[[NSColor colorWithCalibratedWhite:.025 alpha:1]setFill];NSRectFill(self.bounds);
|
||||
NSRect plot=NSMakeRect(48,24,MAX(1,self.bounds.size.width-66),MAX(1,self.bounds.size.height-52));
|
||||
NSDictionary *text=@{NSFontAttributeName:[NSFont monospacedDigitSystemFontOfSize:10 weight:NSFontWeightRegular],NSForegroundColorAttributeName:[NSColor colorWithWhite:.64 alpha:1]};
|
||||
if(_mode<2){NSImage *image=_mode==1?_parade:_wave;[NSGraphicsContext saveGraphicsState];NSGraphicsContext.currentContext.imageInterpolation=NSImageInterpolationNone;[image drawInRect:plot fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1 respectFlipped:YES hints:nil];[NSGraphicsContext restoreGraphicsState];
|
||||
for(int percent : {-10,0,25,50,75,100,110}){CGFloat y=NSMaxY(plot)-(percent+10)/120.0*plot.size.height;[[NSColor colorWithWhite:(percent==0||percent==100)?.48:.3 alpha:.55]setStroke];NSBezierPath *line=[NSBezierPath bezierPath];[line moveToPoint:NSMakePoint(plot.origin.x,y)];[line lineToPoint:NSMakePoint(NSMaxX(plot),y)];[line stroke];[[NSString stringWithFormat:@"%d%%",percent]drawAtPoint:NSMakePoint(5,y-6) withAttributes:text];}
|
||||
if(_mode==1){for(int i=0;i<3;i++){CGFloat x=plot.origin.x+i*plot.size.width/3;[[@[@"R",@"G",@"B"]objectAtIndex:i]drawAtPoint:NSMakePoint(x+8,NSMaxY(plot)+7) withAttributes:text];if(i){[[NSColor colorWithWhite:.4 alpha:.6]setStroke];NSBezierPath *p=[NSBezierPath bezierPath];[p moveToPoint:NSMakePoint(x,plot.origin.y)];[p lineToPoint:NSMakePoint(x,NSMaxY(plot))];[p stroke];}}}
|
||||
else [@"画面横向位置" drawAtPoint:NSMakePoint(plot.origin.x,NSMaxY(plot)+7) withAttributes:text];
|
||||
}else{
|
||||
NSData *hist=_metadata[@"histogram"];if(hist.length==4*dyscope::Bins*sizeof(uint32_t)){
|
||||
const auto *bins=(const uint32_t*)hist.bytes;uint32_t maximum=1;for(unsigned i=0;i<4*dyscope::Bins;i++)maximum=std::max(maximum,bins[i]);
|
||||
NSArray *colors=@[[NSColor colorWithWhite:.82 alpha:.8],NSColor.systemRedColor,NSColor.systemGreenColor,NSColor.systemBlueColor];
|
||||
for(unsigned c=0;c<4;c++){[colors[c]setStroke];NSBezierPath *line=[NSBezierPath bezierPath];for(unsigned b=0;b<dyscope::Bins;b++){NSPoint pt=NSMakePoint(plot.origin.x+b*plot.size.width/(dyscope::Bins-1),NSMaxY(plot)-std::log1p(double(bins[c*dyscope::Bins+b]))/std::log1p(double(maximum))*plot.size.height);if(!b)[line moveToPoint:pt];else[line lineToPoint:pt];}[line stroke];}
|
||||
}[@"−10% R′G′B′ / Y′ · 对数计数 110%" drawAtPoint:NSMakePoint(plot.origin.x,NSMaxY(plot)+7) withAttributes:text];
|
||||
}
|
||||
if(!_metadata){NSString *s=@"等待最终输出帧\n请播放、移动时间线或调整颜色";NSMutableParagraphStyle *style=[[[NSMutableParagraphStyle alloc]init]autorelease];style.alignment=NSTextAlignmentCenter;[s drawInRect:NSInsetRect(plot,20,MAX(20,(plot.size.height-50)/2)) withAttributes:@{NSFontAttributeName:[NSFont systemFontOfSize:13],NSForegroundColorAttributeName:NSColor.secondaryLabelColor,NSParagraphStyleAttributeName:style}];}
|
||||
}
|
||||
@end
|
||||
|
||||
@interface DYColorWorkspace (){
|
||||
id<PROAPIAccessing> _manager;
|
||||
DYRenderer *_renderer;DYLUTLibrary *_library;DYLUTBrowser *_browser;
|
||||
DYWorkspaceRoot *_root;NSView *_scopePane,*_lutPane;
|
||||
DYScopePlot *_plot;
|
||||
NSTextField *_heading,*_description,*_status,*_lutExplanation;
|
||||
NSSegmentedControl *_pages;NSPopUpButton *_scopeMode;NSButton *_close,*_hostScopes;
|
||||
DYWorkspaceLifetime *_lifetime;
|
||||
NSProgress *_selectionTask;
|
||||
NSView *_remoteParent;NSWindow *_presentationWindow;
|
||||
NSString *_title,*_lastError;
|
||||
BOOL _visible,_opening,_closed,_closing;
|
||||
NSUInteger _session,_selectionID;
|
||||
}
|
||||
@end
|
||||
@implementation DYColorWorkspace
|
||||
- (instancetype)initWithManager:(id<PROAPIAccessing>)manager renderer:(DYRenderer *)renderer library:(DYLUTLibrary *)library title:(NSString *)title{
|
||||
if((self=[super init])){
|
||||
_manager=[manager retain];_renderer=[renderer retain];_library=[library retain];_title=[(title.length?title:@"大鱼调色")copy];_lifetime=[DYWorkspaceLifetime new];_lifetime.owner=self;
|
||||
_root=[[DYWorkspaceRoot alloc]initWithFrame:NSMakeRect(0,0,1000,650)];_root.identifier=@"DYColorWorkspace";_root.owner=self;_root.accessibilityLabel=@"大鱼调色辅助工作区";
|
||||
_heading=[[DYThemeLabel alloc]init];_heading.stringValue=[NSString stringWithFormat:@"%@ · 辅助工作区",_title];_heading.font=[NSFont systemFontOfSize:14 weight:NSFontWeightSemibold];[_root addSubview:_heading];
|
||||
_pages=[[NSSegmentedControl alloc]init];_pages.segmentCount=2;[_pages setLabel:@"示波器" forSegment:0];[_pages setLabel:@"风格1 LUT" forSegment:1];_pages.selectedSegment=0;_pages.target=self;_pages.action=@selector(pageChanged:);_pages.accessibilityLabel=@"辅助工作区页面";[_root addSubview:_pages];
|
||||
_close=[[DYThemeButton alloc]init];_close.title=@"关闭";_close.target=self;_close.action=@selector(closePressed:);_close.bezelStyle=NSBezelStyleRounded;[_root addSubview:_close];
|
||||
_scopePane=[[DYWorkspaceRoot alloc]init];_scopePane.clipsToBounds=YES;[_root addSubview:_scopePane];_lutPane=[[NSView alloc]init];[_root addSubview:_lutPane];_lutPane.hidden=YES;
|
||||
_scopeMode=[[DYThemePopUpButton alloc]init];[_scopeMode addItemsWithTitles:@[@"亮度波形",@"RGB 分列",@"直方图"]];_scopeMode.target=self;_scopeMode.action=@selector(scopeModeChanged:);_scopeMode.accessibilityLabel=@"示波器类型";[_scopePane addSubview:_scopeMode];
|
||||
_hostScopes=[[DYThemeButton alloc]init];_hostScopes.title=@"FCP 示波器";_hostScopes.bezelStyle=NSBezelStyleRounded;_hostScopes.target=self;_hostScopes.action=@selector(toggleHostScopes:);_hostScopes.toolTip=@"打开或关闭 Final Cut Pro 自带的视频示波器;下方是大鱼的显示参考示波器";[_scopePane addSubview:_hostScopes];
|
||||
_description=[[DYThemeLabel alloc]init];_description.font=[NSFont systemFontOfSize:11];[_scopePane addSubview:_description];
|
||||
_plot=[[DYScopePlot alloc]init];_plot.accessibilityRole=NSAccessibilityImageRole;[_scopePane addSubview:_plot];
|
||||
_status=[[DYThemeLabel alloc]init];_status.font=[NSFont systemFontOfSize:11];_status.maximumNumberOfLines=3;_status.lineBreakMode=NSLineBreakByWordWrapping;[_scopePane addSubview:_status];
|
||||
_lutExplanation=[[DYThemeLabel alloc]init];_lutExplanation.font=[NSFont systemFontOfSize:11];_lutExplanation.stringValue=[NSString stringWithFormat:@"应用位置:%@ · 风格1。缩略图以输入画面预览;示波器查看最终调色结果。",_title];[_root addSubview:_lutExplanation];_lutExplanation.hidden=YES;
|
||||
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(scopeChanged:) name:@"DYScopeDidChange" object:_renderer];
|
||||
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(previewChanged:) name:@"DYPreviewDidChange" object:_renderer];
|
||||
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(themeChanged:) name:DYThemeDidChange object:nil];
|
||||
[self updatePalette];[self scopeChanged:nil];[self layoutWorkspace];
|
||||
}return self;
|
||||
}
|
||||
- (void)dealloc{
|
||||
[self close];_lifetime.owner=nil;[NSNotificationCenter.defaultCenter removeObserver:self];_root.owner=nil;
|
||||
[_manager release];[_renderer release];[_library release];[_browser release];[_root release];[_scopePane release];[_lutPane release];[_plot release];[_heading release];[_description release];[_status release];[_lutExplanation release];[_pages release];[_scopeMode release];[_close release];[_hostScopes release];[_title release];[_lastError release];[_lifetime release];[super dealloc];
|
||||
}
|
||||
- (BOOL)visible{return _visible||_opening;}
|
||||
- (NSString *)lastError{return _lastError;}
|
||||
- (id<FxCustomParameterActionAPI_v4>)actionAPI{return [_manager apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];}
|
||||
- (void)reportError:(NSString *)message{
|
||||
[_lastError release];_lastError=[(message?:@"辅助工作区操作未完成")copy];_status.stringValue=_lastError;_status.toolTip=_lastError;
|
||||
[NSNotificationCenter.defaultCenter postNotificationName:@"DYColorWorkspaceError" object:self userInfo:@{@"message":_lastError}];
|
||||
}
|
||||
- (void)showRelativeToView:(NSView *)anchor{
|
||||
if(!NSThread.isMainThread){DYWorkspaceLifetime *token=_lifetime;dispatch_async(dispatch_get_main_queue(),^{[token.owner showRelativeToView:anchor];});return;}
|
||||
if(_opening)return;_closed=NO;_lifetime.owner=self;_opening=YES;NSUInteger session=++_session;
|
||||
[_lastError release];_lastError=nil;id<FxCustomParameterActionAPI_v4> action=[self actionAPI];
|
||||
if(!action){_opening=NO;[self reportError:@"宿主暂时无法打开辅助工作区,请重新选择当前效果后重试"];return;}
|
||||
DYWorkspaceLifetime *token=_lifetime;[action startAction:self];
|
||||
@try{
|
||||
id<FxRemoteWindowAPI_v3> v3=[_manager apiForProtocol:@protocol(FxRemoteWindowAPI_v3)];id<FxRemoteWindowAPI_v2> sizable=v3?:[_manager apiForProtocol:@protocol(FxRemoteWindowAPI_v2)];id<FxRemoteWindowAPI> remote=sizable?:[_manager apiForProtocol:@protocol(FxRemoteWindowAPI)];
|
||||
void(^reply)(FxXPView *,NSError *)=^(FxXPView *parent,NSError *error){void(^attach)(void)=^{DYColorWorkspace *owner=token.owner;if(!owner||owner->_closed||owner->_session!=session)return;owner->_opening=NO;
|
||||
if(!parent){[owner reportError:error.localizedDescription?:@"宿主未能创建辅助窗口"];return;}[owner attachToParent:parent];
|
||||
};if(NSThread.isMainThread)attach();else dispatch_sync(dispatch_get_main_queue(),attach);};
|
||||
if(sizable)[sizable remoteWindowWithMinimumSize:NSMakeSize(760,520) maximumSize:NSMakeSize(1800,1200) reply:reply];
|
||||
else if(remote)[remote remoteWindowOfSize:NSMakeSize(1000,650) reply:reply];
|
||||
else{_opening=NO;[self reportError:@"当前宿主未提供外部工具窗口接口"];}
|
||||
}@finally{[action endAction:self];}
|
||||
}
|
||||
- (void)attachToParent:(NSView *)parent{
|
||||
if(_remoteParent!=parent){if(_remoteParent)for(NSNotificationName name in @[NSViewFrameDidChangeNotification,NSViewBoundsDidChangeNotification])[NSNotificationCenter.defaultCenter removeObserver:self name:name object:_remoteParent];_remoteParent=parent;
|
||||
parent.postsFrameChangedNotifications=YES;parent.postsBoundsChangedNotifications=YES;for(NSNotificationName name in @[NSViewFrameDidChangeNotification,NSViewBoundsDidChangeNotification])[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(parentChanged:) name:name object:parent];
|
||||
}
|
||||
[_root removeFromSuperview];_root.frame=parent.bounds;_root.autoresizingMask=NSViewWidthSizable|NSViewHeightSizable;[parent addSubview:_root];_visible=YES;_root.hidden=NO;[_renderer setScopeEnabled:_pages.selectedSegment==0];[self scopeChanged:nil];[self parentChanged:nil];
|
||||
DYWorkspaceLifetime *token=_lifetime;NSUInteger session=_session;dispatch_async(dispatch_get_main_queue(),^{DYColorWorkspace *owner=token.owner;if(!owner||owner->_closed||owner->_session!=session)return;NSWindow *window=owner->_root.window;
|
||||
if(window!=owner->_presentationWindow){if(owner->_presentationWindow)[NSNotificationCenter.defaultCenter removeObserver:owner name:NSWindowWillCloseNotification object:owner->_presentationWindow];[owner->_presentationWindow release];owner->_presentationWindow=[window retain];if(window)[NSNotificationCenter.defaultCenter addObserver:owner selector:@selector(remoteClosed:) name:NSWindowWillCloseNotification object:window];}
|
||||
[owner parentChanged:nil];
|
||||
});
|
||||
}
|
||||
- (void)parentChanged:(NSNotification *)notification{
|
||||
if(!_visible||!_remoteParent)return;NSWindow *window=_remoteParent.window;
|
||||
if(window&&_remoteParent==window.contentView&&_remoteParent.superview){NSRect content=[window convertRectFromScreen:[window contentRectForFrameRect:window.frame]];NSPoint origin=[_remoteParent.superview convertPoint:content.origin fromView:nil];if(std::isfinite(origin.x)&&std::isfinite(origin.y)&&!NSEqualPoints(_remoteParent.frame.origin,origin))[_remoteParent setFrameOrigin:origin];}
|
||||
_root.frame=_remoteParent.bounds;[self layoutWorkspace];
|
||||
}
|
||||
- (void)layoutWorkspace{
|
||||
CGFloat w=_root.bounds.size.width,h=_root.bounds.size.height;
|
||||
_heading.frame=NSMakeRect(18,14,MAX(100,w-360),23);_pages.frame=NSMakeRect(MAX(150,w-320),12,228,27);_close.frame=NSMakeRect(MAX(0,w-80),12,64,27);
|
||||
_scopePane.frame=NSMakeRect(0,52,w,MAX(1,h-52));_lutPane.frame=NSMakeRect(0,80,w,MAX(1,h-80));_lutExplanation.frame=NSMakeRect(18,52,MAX(1,w-36),24);
|
||||
CGFloat ph=_scopePane.bounds.size.height;_scopeMode.frame=NSMakeRect(18,0,160,27);_hostScopes.frame=NSMakeRect(184,0,122,27);_description.frame=NSMakeRect(320,4,MAX(1,w-338),22);_plot.frame=NSMakeRect(18,39,MAX(1,w-36),MAX(1,ph-114));_status.frame=NSMakeRect(18,MAX(40,ph-64),MAX(1,w-36),58);
|
||||
}
|
||||
- (void)pageChanged:(id)sender{
|
||||
BOOL lut=_pages.selectedSegment==1;_scopePane.hidden=lut;_lutPane.hidden=!lut;_lutExplanation.hidden=!lut;[_renderer setScopeEnabled:_visible&&!lut];if(lut)[self ensureBrowser];else[self scopeChanged:nil];
|
||||
}
|
||||
- (void)toggleHostScopes:(id)sender{
|
||||
id<FxCustomParameterActionAPI_v4> action=[self actionAPI];NSError *error=nil;BOOL done=NO;if(action){[action startAction:self];@try{id<FxCommandAPI> commands=[_manager apiForProtocol:@protocol(FxCommandAPI)];done=[commands performCommand:kFxCommand_ToggleWaveforms error:&error];}@finally{[action endAction:self];}}
|
||||
if(!done)[self reportError:error.localizedDescription?:@"当前宿主无法切换 FCP 示波器"];
|
||||
}
|
||||
- (void)scopeModeChanged:(id)sender{_plot.mode=_scopeMode.indexOfSelectedItem;}
|
||||
- (void)scopeChanged:(NSNotification *)notification{
|
||||
if(notification&&!_visible)return;NSDictionary *data=[_renderer scopeMetadata];_plot.metadata=data;
|
||||
_description.toolTip=data?[NSString stringWithFormat:@"宿主输出配置:%@\n%@",data[@"source"],data[@"note"]]:nil;
|
||||
_description.stringValue=data?[NSString stringWithFormat:@"%@ · %@ · 320 × 180",data[@"domain"],data[@"region"]]:@"最终输出 · 等待宿主渲染";
|
||||
if(data){double t=[data[@"time"]doubleValue];NSString *frame=std::isfinite(t)?[NSString stringWithFormat:@"%.3f 秒",t]:@"静帧";
|
||||
_status.stringValue=[NSString stringWithFormat:@"%@\n%@ · 有效 %@ · 透明 %@ · 非有限 %@ · 超出 −10%%/110%% %@/%@",([data[@"converted"]boolValue]?@"最终画面 · sRGB 显示参考;非 HDR / IRE 精密测量":@"空间未知:显示宿主 RGB 数值参考;不用于 HDR / IRE 测量"),frame,data[@"valid"],data[@"transparent"],data[@"nonfinite"],data[@"below"],data[@"above"]];
|
||||
}else _status.stringValue=@"示波器采集当前效果的最终输出。播放、移动时间线或调整颜色后更新;透明像素不计入。";
|
||||
}
|
||||
- (void)previewChanged:(NSNotification *)notification{if(_visible&&_pages.selectedSegment==1)[_browser updatePreview:[_renderer lookLUTPreview]];}
|
||||
- (void)themeChanged:(NSNotification *)notification{[self updatePalette];}
|
||||
- (void)updatePalette{
|
||||
[_root setNeedsDisplay:YES];for(NSTextField *label in @[_heading,_description,_status,_lutExplanation])label.textColor=DYThemeColor(label==_heading?@"text":@"secondary");[_browser updatePalette:DYThemePalette()];
|
||||
}
|
||||
- (void)ensureBrowser{
|
||||
if(_browser.visible)return;[_browser release];_browser=nil;id<FxCustomParameterActionAPI_v4> action=[self actionAPI];if(!action){[self reportError:@"宿主暂时无法读取风格1"];return;}
|
||||
NSString *selected=nil;[action startAction:self];@try{selected=[DYReadAssets(_manager,action.currentTime).paths[@"look0"]copy];}@finally{[action endAction:self];}
|
||||
DYWorkspaceLifetime *token=_lifetime;
|
||||
_browser=[[DYLUTBrowser alloc]initWithLibrary:_library preview:[_renderer lookLUTPreview] selectedPath:selected palette:DYThemePalette() selection:^NSProgress *(NSString *path,void(^completion)(NSError *)){DYColorWorkspace *owner=token.owner;if(owner&&!owner->_closed)return [owner selectLUT:path completion:completion];if(completion)completion([NSError errorWithDomain:NSCocoaErrorDomain code:NSUserCancelledError userInfo:nil]);return nil;}];[selected release];
|
||||
[_browser embedInView:_lutPane close:^{DYColorWorkspace *owner=token.owner;if(owner&&!owner->_closing&&!owner->_closed){owner->_pages.selectedSegment=0;[owner pageChanged:nil];}}];
|
||||
}
|
||||
- (NSDictionary *)selectionContextAtTime:(CMTime)time{
|
||||
id<PROAPIAccessing> host=[_manager isKindOfClass:DYToolManager.class]?[(DYToolManager*)_manager host]:_manager;
|
||||
DYAssetState *local=DYReadAssets(_manager,time),*global=DYReadAssets(host,time);DYUniforms uniforms;DYReadUniforms(host,time,&uniforms);
|
||||
NSMutableDictionary *cm=[NSMutableDictionary dictionary];for(NSDictionary *descriptor in DYDescriptors()){NSString *key=descriptor[@"key"];NSInteger offset=[descriptor[@"offset"]integerValue];if(offset>=0&&([key hasPrefix:@"cm"]||[key isEqual:@"inputProfile"]||[key isEqual:@"inputSectionEnabled"]))cm[key]=@(*(float*)((uint8_t*)&uniforms+offset));}
|
||||
NSDictionary *state=@{@"look":local.paths[@"look0"]?:NSNull.null,@"colorManagement":global.colorManagement?:NSNull.null,@"inputPath":global.paths[@"input"]?:NSNull.null,@"colorParameters":cm};
|
||||
return @{@"time":[NSData dataWithBytes:&time length:sizeof(time)],@"state":state};
|
||||
}
|
||||
- (NSDictionary *)selectionContext{
|
||||
id<FxCustomParameterActionAPI_v4> action=[self actionAPI];if(!action)return nil;NSDictionary *context=nil;[action startAction:self];@try{context=[[self selectionContextAtTime:action.currentTime]copy];}@finally{[action endAction:self];}return [context autorelease];
|
||||
}
|
||||
- (NSProgress *)selectLUT:(NSString *)path completion:(void(^)(NSError *))completion{
|
||||
[_selectionTask cancel];[_selectionTask release];_selectionTask=nil;NSUInteger selection=++_selectionID,session=_session;DYWorkspaceLifetime *token=_lifetime;NSDictionary *expected=[self selectionContext];
|
||||
void(^prepared)(NSError *)=^(NSError *error){DYColorWorkspace *owner=token.owner;if(!owner||owner->_closed||owner->_session!=session||owner->_selectionID!=selection){if(completion)completion([NSError errorWithDomain:NSCocoaErrorDomain code:NSUserCancelledError userInfo:nil]);return;}
|
||||
[owner->_selectionTask release];owner->_selectionTask=nil;NSError *result=error;if(!result)[owner commitLUT:path expected:expected error:&result];if(result)[owner reportError:result.localizedDescription];if(completion)completion(result);
|
||||
};
|
||||
if(!path.length||!expected){NSProgress *done=[NSProgress discreteProgressWithTotalUnitCount:1];done.completedUnitCount=1;dispatch_async(dispatch_get_main_queue(),^{prepared(nil);});return done;}
|
||||
_selectionTask=[[_renderer prepareLUTPath:path completion:prepared]retain];return _selectionTask;
|
||||
}
|
||||
- (BOOL)commitLUT:(NSString *)path error:(NSError **)error{return [self commitLUT:path expected:[self selectionContext] error:error];}
|
||||
- (BOOL)commitLUT:(NSString *)path expected:(NSDictionary *)expected error:(NSError **)error{
|
||||
if(path.length&&(!path.isAbsolutePath||![[path.pathExtension lowercaseString]isEqual:@"cube"])){
|
||||
if(error)*error=[NSError errorWithDomain:@"com.dayu.color.workspace" code:1 userInfo:@{NSLocalizedDescriptionKey:@"LUT 必须是完整路径的 .cube 文件,原来的选择已保留"}];return NO;
|
||||
}
|
||||
id<FxCustomParameterActionAPI_v4> action=[self actionAPI];BOOL written=NO;NSString *failure=nil;if(!action)failure=@"宿主暂时无法应用 LUT,请重新选择当前效果后重试";
|
||||
else{id<FxCustomParameterActionAPI_v4> outer=[_manager isKindOfClass:DYToolManager.class]?[[(DYToolManager*)_manager host]apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)]:nil;
|
||||
if(outer)[outer startAction:self];[action startAction:self];id<FxUndoAPI> undo=nil;BOOL grouped=NO;NSDictionary *wantedPaths=nil;CMTime commitTime=kCMTimeInvalid;@try{
|
||||
CMTime time=action.currentTime,original=kCMTimeInvalid;NSData *encodedTime=expected[@"time"];if(encodedTime.length==sizeof(original))memcpy(&original,encodedTime.bytes,sizeof(original));
|
||||
if(!CMTIME_IS_NUMERIC(time)||!CMTIME_IS_NUMERIC(original)||CMTimeCompare(time,original)!=0)failure=@"播放头已改变,未将先前的 LUT 选择写到新画面;请重新选择";
|
||||
else if(![[self selectionContextAtTime:time][@"state"]isEqual:expected[@"state"]])failure=@"载入期间风格1或色彩管理已改变,已保留最新设置;请重新选择 LUT";
|
||||
if(!failure&&[_manager isKindOfClass:DYToolManager.class]){DYToolManager *node=(DYToolManager*)_manager;if(![node.type isEqual:@"look"]||!DYToolWithID(DYReadTools(node.host,time).document,node.nodeID)){failure=@"此风格图层已删除或不再可编辑,未修改其它图层";}}
|
||||
if(!failure&&![_manager isKindOfClass:DYToolManager.class]&&DYBaseToolRemoved(DYReadTools(_manager,time).document,@"look"))failure=@"基础风格工具已移除,请先恢复风格工具;未修改其它图层";
|
||||
if(!failure){DYAssetState *assets=[[DYReadAssets(_manager,time)copy]autorelease];if(!assets)assets=[[[DYAssetState alloc]init]autorelease];NSMutableDictionary *paths=[[assets.paths mutableCopy]autorelease]?:[NSMutableDictionary dictionary];if(path.length)paths[@"look0"]=path;else[paths removeObjectForKey:@"look0"];assets.paths=paths;
|
||||
wantedPaths=assets.paths;commitTime=time;undo=[_manager apiForProtocol:@protocol(FxUndoAPI)];grouped=[undo startUndoGroup:@"选择风格1 LUT"];written=DYWriteAssets(_manager,assets,time);if(!written)failure=@"宿主未接受此 LUT,原来的选择已保留";
|
||||
}
|
||||
}@finally{if(outer){[action endAction:self];
|
||||
// DYToolManager stages custom assets and commits its host document in
|
||||
// endAction. Its earlier setter BOOL does not report that final write.
|
||||
// Read the actual target while the outer host action still grants access.
|
||||
if(written){DYToolManager *node=(DYToolManager*)_manager;NSDictionary *stored=DYToolWithID(DYReadTools(node.host,commitTime).document,node.nodeID);if(!stored||![stored[@"paths"]isEqual:wantedPaths]){written=NO;failure=@"宿主未保存此风格图层的 LUT,原来的选择已保留;请重试";}}
|
||||
if(grouped)[undo endUndoGroup];[outer endAction:self];}else{if(grouped)[undo endUndoGroup];[action endAction:self];}}}
|
||||
if(written){if(path.length)[_library recordUsedPath:path];[NSNotificationCenter.defaultCenter postNotificationName:DYModelChanged object:[_manager isKindOfClass:DYToolManager.class]?[(DYToolManager*)_manager host]:_manager];}
|
||||
else if(error)*error=[NSError errorWithDomain:@"com.dayu.color.workspace" code:1 userInfo:@{NSLocalizedDescriptionKey:failure?:@"LUT 操作未完成"}];return written;
|
||||
}
|
||||
- (void)closePressed:(id)sender{[self close];}
|
||||
- (void)remoteClosed:(NSNotification *)notification{_closing=YES;[self close];_closing=NO;}
|
||||
- (void)close{
|
||||
if(_closed)return;BOOL hadPresentation=_visible||_opening||_remoteParent;_closed=YES;_visible=NO;_opening=NO;_session++;_selectionID++;[_selectionTask cancel];[_selectionTask release];_selectionTask=nil;[_renderer setScopeEnabled:NO];
|
||||
BOOL wasClosing=_closing;_closing=YES;[_browser close];[_browser release];_browser=nil;
|
||||
if(_remoteParent)for(NSNotificationName name in @[NSViewFrameDidChangeNotification,NSViewBoundsDidChangeNotification])[NSNotificationCenter.defaultCenter removeObserver:self name:name object:_remoteParent];_remoteParent=nil;
|
||||
if(_presentationWindow)[NSNotificationCenter.defaultCenter removeObserver:self name:NSWindowWillCloseNotification object:_presentationWindow];[_presentationWindow release];_presentationWindow=nil;[_root removeFromSuperview];
|
||||
if(hadPresentation&&!wasClosing){id<FxCustomParameterActionAPI_v4> action=[self actionAPI];if(action){[action startAction:self];@try{id<FxRemoteWindowAPI_v3> api=[_manager apiForProtocol:@protocol(FxRemoteWindowAPI_v3)];[api closeRemoteWindow];}@finally{[action endAction:self];}}}_closing=wasClosing;
|
||||
}
|
||||
@end
|
||||
@@ -15,24 +15,37 @@
|
||||
for(NSNumber *width in @[@280,@320,@400]){
|
||||
[view setFrameSize:NSMakeSize(width.doubleValue,780)];[view layoutSubtreeIfNeeded];NSArray *buttons=@[[view valueForKey:@"save"],[view valueForKey:@"load"],[view valueForKey:@"export"],settings];BOOL fit=YES;
|
||||
for(NSView *button in buttons){fit&=NSMinX(button.frame)>=0&&NSMaxX(button.frame)<=width.doubleValue&&button.frame.size.width>=66;for(NSView *other in buttons)if(button!=other)fit&=!NSIntersectsRect(button.frame,other.frame);}
|
||||
NSArray *themes=[view valueForKey:@"themeButtons"];NSView *brand=[view valueForKey:@"brand"];fit&=themes.count==7&&NSMaxX(brand.frame)<=NSMinX([themes.firstObject frame]);
|
||||
NSArray *themes=[view valueForKey:@"themeButtons"];NSView *brand=[view valueForKey:@"brand"];fit&=themes.count==2&&NSMaxX(brand.frame)<=NSMinX([themes.firstObject frame]);
|
||||
for(NSButton *mode in themes){fit&=mode.frame.size.width>=44&&NSMaxX(mode.frame)<=NSMinX([[view valueForKey:@"resetAll"]frame])&&mode.title.length>0;for(NSButton *other in themes)if(mode!=other)fit&=!NSIntersectsRect(mode.frame,other.frame);}
|
||||
run.record([NSString stringWithFormat:@"compact-header-controls-fit-%@",width],fit);
|
||||
}
|
||||
DYDiagnosticManager *fresh=[[[DYDiagnosticManager alloc]init]autorelease];DYCreateParameters(fresh,nil);run.record(@"compact-new-host-stays-original-flow",!DYReadAssets(fresh,kCMTimeZero).colorManagement);
|
||||
NSInteger previous=DYThemeIndex();@try{
|
||||
BOOL colors=DYThemeNames().count==7&&[DYThemeNames()[5]isEqual:@"黑金渐变"];
|
||||
for(NSInteger i=0;i<7;i++){DYSetThemeIndex(i);colors&=DYThemeIndex()==i&&DYThemePalette()[@"background"]&&DYThemePalette()[@"text"];}
|
||||
run.record(@"compact-six-stable-theme-choices",colors);
|
||||
DYSetThemeIndex(5);auto luminance=[](NSColor *color){NSColor *c=[color colorUsingColorSpace:NSColorSpace.sRGBColorSpace];auto linear=[](double x){return x<=.04045?x/12.92:pow((x+.055)/1.055,2.4);};return .2126*linear(c.redComponent)+.7152*linear(c.greenComponent)+.0722*linear(c.blueComponent);};
|
||||
double minimum=100;for(NSString *text in @[@"text",@"secondary"])for(NSString *surface in @[@"background",@"backgroundEnd",@"card",@"cardEnd",@"field",@"headerTop"])minimum=std::min(minimum,(luminance(DYThemePalette()[text])+.05)/(luminance(DYThemePalette()[surface])+.05));
|
||||
run.record(@"compact-gold-labels-have-readable-contrast",minimum>=4.5,@{@"minimumContrast":@(minimum)});
|
||||
BOOL colors=DYThemeNames().count==2&&[DYThemeNames()[0]isEqual:@"浅色"]&&[DYThemeNames()[1]isEqual:@"深色"];
|
||||
for(NSInteger i=7;i<=8;i++){DYSetThemeIndex(i);colors&=DYThemeIndex()==i&&DYThemePalette()[@"background"]&&DYThemePalette()[@"text"];}
|
||||
run.record(@"compact-only-light-dark-choices",colors);
|
||||
auto luminance=[](NSColor *color){NSColor *c=[color colorUsingColorSpace:NSColorSpace.sRGBColorSpace];auto linear=[](double x){return x<=.04045?x/12.92:pow((x+.055)/1.055,2.4);};return .2126*linear(c.redComponent)+.7152*linear(c.greenComponent)+.0722*linear(c.blueComponent);};
|
||||
NSDictionary *themeSnapshot=[view presetSnapshot];int themeUndo=host->_undoStarts;
|
||||
DYSetThemeIndex(7);double lightMinimum=100;
|
||||
for(NSString *text in @[@"text",@"secondary",@"slot15",@"accent"])for(NSString *surface in @[@"background",@"backgroundEnd",@"card",@"cardEnd",@"field",@"headerTop",@"headerBottom"])
|
||||
lightMinimum=std::min(lightMinimum,(luminance(DYThemePalette()[surface])+.05)/(luminance(DYThemePalette()[text])+.05));
|
||||
run.record(@"soft-light-text-contrast-at-least-4.5",lightMinimum>=4.5,@{@"minimumContrast":@(lightMinimum)});
|
||||
[view performSelector:@selector(themeChanged:) withObject:nil];
|
||||
run.record(@"soft-native-controls-use-light-appearance",[view.appearance.name isEqual:NSAppearanceNameAqua]&&DYThemeTextShadow()==nil);
|
||||
run.record(@"soft-theme-preserves-grade-and-undo",[themeSnapshot isEqual:[view presetSnapshot]]&&themeUndo==host->_undoStarts);
|
||||
DYSetThemeIndex(8);double darkMinimum=100;
|
||||
for(NSString *text in @[@"text",@"secondary",@"slot15",@"accent"])for(NSString *surface in @[@"background",@"backgroundEnd",@"card",@"cardEnd",@"field",@"headerTop",@"headerBottom"])
|
||||
darkMinimum=std::min(darkMinimum,(luminance(DYThemePalette()[text])+.05)/(luminance(DYThemePalette()[surface])+.05));
|
||||
run.record(@"soft-dark-text-contrast-at-least-4.5",darkMinimum>=4.5,@{@"minimumContrast":@(darkMinimum)});
|
||||
[view performSelector:@selector(themeChanged:) withObject:nil];
|
||||
run.record(@"soft-dark-native-appearance-without-text-glow",[view.appearance.name isEqual:NSAppearanceNameDarkAqua]&&DYThemeTextShadow()==nil);
|
||||
run.record(@"soft-dark-theme-preserves-grade-and-undo",[themeSnapshot isEqual:[view presetSnapshot]]&&themeUndo==host->_undoStarts);
|
||||
DYSetThemeIndex(6);run.record(@"compact-removed-themes-cannot-be-selected",DYThemeIndex()==8);
|
||||
DYThemePopUpButton *pullDown=[[[DYThemePopUpButton alloc]initWithFrame:NSMakeRect(0,0,240,28) pullsDown:YES]autorelease];[pullDown addItemWithTitle:@"+ 添加模块"];pullDown.font=[NSFont systemFontOfSize:11];
|
||||
NSBitmapImageRep *bitmap=[[[NSBitmapImageRep alloc]initWithBitmapDataPlanes:NULL pixelsWide:240 pixelsHigh:28 bitsPerSample:8 samplesPerPixel:4 hasAlpha:YES isPlanar:NO colorSpaceName:NSDeviceRGBColorSpace bytesPerRow:0 bitsPerPixel:0]autorelease];
|
||||
[NSGraphicsContext saveGraphicsState];[NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithBitmapImageRep:bitmap]];[pullDown drawRect:pullDown.bounds];[NSGraphicsContext restoreGraphicsState];NSUInteger glyphPixels=0;
|
||||
for(int y=6;y<23;y++)for(int x=9;x<90;x++){NSColor *c=[bitmap colorAtX:x y:y];if(c.redComponent>.55&&c.greenComponent>.35)glyphPixels++;}
|
||||
run.record(@"compact-gold-pull-down-draws-readable-caption",glyphPixels>30,@{@"brightCaptionPixels":@(glyphPixels)});
|
||||
BOOL reduced=NSWorkspace.sharedWorkspace.accessibilityDisplayShouldIncreaseContrast||NSWorkspace.sharedWorkspace.accessibilityDisplayShouldReduceTransparency;
|
||||
run.record(@"compact-gold-glow-respects-system-display-options",reduced?DYThemeTextShadow()==nil:DYThemeTextShadow().shadowBlurRadius<=2);
|
||||
run.record(@"compact-dark-pull-down-draws-readable-caption",glyphPixels>30,@{@"brightCaptionPixels":@(glyphPixels)});
|
||||
}@finally{DYSetThemeIndex(previous);}
|
||||
}
|
||||
// Histogram math is independent of UI palettes and never edits a host document.
|
||||
@@ -61,7 +74,7 @@
|
||||
run.record(@"histogram-channel-and-overlay-presentation-does-not-edit-grade",[before isEqual:[view presetSnapshot]]&&host->_undoStarts==0&&host->_undoEnds==0);
|
||||
[renderer invalidatePreview];[view performSelector:@selector(previewChanged:) withObject:nil];
|
||||
run.record(@"histogram-invalidation-clears-view-and-renderer",![renderer histogram]&&![graph valueForKey:@"histogram"]);
|
||||
NSInteger previous=DYThemeIndex();DYSetThemeIndex(6);
|
||||
run.record(@"neon-stable-theme-id-and-no-text-glow",[DYThemeNames()[6]isEqual:@"霓虹炫彩"]&&DYThemeTextShadow()==nil&&![DYThemePalette()[@"background"]isEqual:DYThemePalette()[@"backgroundEnd"]]);
|
||||
NSInteger previous=DYThemeIndex();DYSetThemeIndex(8);
|
||||
run.record(@"relief-only-two-choices-and-no-text-glow",DYThemeNames().count==2&&DYThemeTextShadow()==nil&&![DYThemePalette()[@"background"]isEqual:DYThemePalette()[@"backgroundEnd"]]);
|
||||
DYSetThemeIndex(previous);
|
||||
}
|
||||
@@ -21,6 +21,8 @@
|
||||
#include <cstring>
|
||||
#include <vector>
|
||||
#include "DYToolTrackingProbe.inc.h"
|
||||
#import "DYViewerParameterProbe.h"
|
||||
#import "DYViewerControlsProbe.h"
|
||||
|
||||
// Fake host objects implement the real selectors used by the model and renderer.
|
||||
// They never connect to a host document or enter the FxPrincipal service loop.
|
||||
@@ -90,6 +92,8 @@
|
||||
if(!_custom[@(pid)]||!value)return NO;_custom[@(pid)]=[[value copy]autorelease];return YES;
|
||||
}
|
||||
@end
|
||||
#include "DYWorkspaceDiagnosticHost.inc.h"
|
||||
|
||||
|
||||
@interface DYDiagnosticTile : FxImageTile {
|
||||
id<MTLTexture> _texture;
|
||||
@@ -494,6 +498,7 @@ extern "C" int DYRunDiagnostics(void) { @autoreleasepool {
|
||||
run.record(@"user-folder-all-luts-prepared-and-rendered",userCount>0&&allUserFrames,@{@"files":@(userCount),@"sourceFolder":userFolder,@"sourceFilesModified":@NO});
|
||||
}
|
||||
#include "DYToolDiagnostics.inc.h"
|
||||
#include "DYWorkspaceDiagnostics.inc.h"
|
||||
#include "DYToolInsertionDiagnostics.inc.h"
|
||||
#include "DYToolDeletionDiagnostics.inc.h"
|
||||
#include "DYFilmDiagnostics.inc.h"
|
||||
@@ -504,6 +509,8 @@ extern "C" int DYRunDiagnostics(void) { @autoreleasepool {
|
||||
#include "DYManagedDiagnostics.inc.h"
|
||||
#include "DYPrimaryDiagnostics.inc.h"
|
||||
#include "DYCompactUIDiagnostics.inc.h"
|
||||
#include "DYViewerParameterDiagnostics.inc.h"
|
||||
#include "DYViewerControlsDiagnostics.inc.h"
|
||||
[gpu release];
|
||||
} @catch(NSException *exception) {
|
||||
run.record(@"diagnostic-exception",false,@{@"exception":exception.name?:@"unknown",@"message":exception.reason?:@"unknown"});
|
||||
|
||||
@@ -272,6 +272,18 @@ kernel void dyAnalysis(texture2d<half> source [[texture(0)]],
|
||||
outRGBA[pixel.y * 320 + pixel.x] = float4(encoded, float(sample.a));
|
||||
}
|
||||
|
||||
// Sample the actual final host destination before returning its tile. Point
|
||||
// sampling avoids blending away nonfinite/out-of-range pixels. This is a
|
||||
// bounded display-reference sample, not a full-resolution precision scope.
|
||||
kernel void dyScopeSample(texture2d<float,access::read> source [[texture(0)]],
|
||||
device float4* outRGBA [[buffer(0)]],constant uint& flip [[buffer(1)]],
|
||||
uint2 pixel [[thread_position_in_grid]]) {
|
||||
if(pixel.x>=320||pixel.y>=180)return;
|
||||
uint2 xy=min(uint2((float2(pixel)+.5f)*float2(source.get_width(),source.get_height())/float2(320,180)),uint2(source.get_width()-1,source.get_height()-1));
|
||||
if(flip)xy.y=source.get_height()-1-xy.y;
|
||||
outRGBA[pixel.y*320+pixel.x]=source.read(xy);
|
||||
}
|
||||
|
||||
// Native auto-grade statistics consume the input-converted RGB8 preview.
|
||||
// Quantization before and after the LUT mirrors the reference NSImage path.
|
||||
kernel void dyInputAnalysis(texture2d<half> source [[texture(0)]],
|
||||
|
||||
+42
-42
@@ -11,6 +11,7 @@
|
||||
#import "DYLUTLibrary.h"
|
||||
#import "DYLUTBrowser.h"
|
||||
#import "DYRenderer.h"
|
||||
#import "DYColorWorkspace.h"
|
||||
#include "DYSpiderState.h"
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
#include <cmath>
|
||||
@@ -84,13 +85,15 @@ static NSString *DYNumber(double value,NSDictionary *d) {
|
||||
}
|
||||
- (void)drawBarInside:(NSRect)rect flipped:(BOOL)flipped {
|
||||
NSRect track=NSMakeRect(rect.origin.x,NSMidY(rect)-2.5,rect.size.width,5);
|
||||
if(DYThemeUsesRelief())DYDrawSoftControl(NSInsetRect(track,-.5,-1),3.5,YES,NO,NO);
|
||||
NSArray *colors=[self trackColors];if(colors){NSGradient *g=[[[NSGradient alloc]initWithColors:colors]autorelease];[g drawInBezierPath:[NSBezierPath bezierPathWithRoundedRect:track xRadius:2.5 yRadius:2.5] angle:0];return;}
|
||||
NSBezierPath *bar=[NSBezierPath bezierPathWithRoundedRect:track xRadius:2.5 yRadius:2.5];NSGradient *base=[[[NSGradient alloc]initWithStartingColor:DYThemePalette()[@"slot8"] endingColor:DYThemePalette()[@"slot9"]]autorelease];[base drawInBezierPath:bar angle:90];[[NSColor colorWithWhite:0 alpha:.28]setStroke];bar.lineWidth=.6;[bar stroke];
|
||||
NSBezierPath *bar=[NSBezierPath bezierPathWithRoundedRect:track xRadius:2.5 yRadius:2.5];NSGradient *base=[[[NSGradient alloc]initWithStartingColor:DYThemePalette()[@"slot8"] endingColor:DYThemePalette()[@"slot9"]]autorelease];[base drawInBezierPath:bar angle:90];[[(DYThemeIsLight()?DYAccent():NSColor.blackColor) colorWithAlphaComponent:DYThemeIsLight()?.20:.28]setStroke];bar.lineWidth=.6;[bar stroke];
|
||||
double fraction=(self.doubleValue-self.minValue)/fmax(.000001,self.maxValue-self.minValue);
|
||||
NSRect active=track;active.size.width*=fmax(0,fmin(1,fraction));NSGradient *g=[[[NSGradient alloc]initWithStartingColor:DYThemePalette()[@"activeTop"] endingColor:DYThemePalette()[@"activeBottom"]]autorelease];[g drawInBezierPath:[NSBezierPath bezierPathWithRoundedRect:active xRadius:2 yRadius:2] angle:DYThemeIndex()==6?0:90];
|
||||
NSRect active=track;active.size.width*=fmax(0,fmin(1,fraction));NSGradient *g=[[[NSGradient alloc]initWithStartingColor:DYThemePalette()[@"activeTop"] endingColor:DYThemePalette()[@"activeBottom"]]autorelease];[g drawInBezierPath:[NSBezierPath bezierPathWithRoundedRect:active xRadius:2 yRadius:2] angle:0];
|
||||
}
|
||||
- (void)drawKnob:(NSRect)knobRect {
|
||||
NSRect circle=NSInsetRect(knobRect,1,1);
|
||||
if(DYThemeIsLight()){DYDrawSoftControl(circle,MIN(circle.size.width,circle.size.height)/2,NO,NO,self.highlighted);return;}
|
||||
[DYThemeColor(@"knob") setFill];[[NSBezierPath bezierPathWithOvalInRect:circle] fill];
|
||||
[DYAccent() setStroke];NSBezierPath *ring=[NSBezierPath bezierPathWithOvalInRect:circle];ring.lineWidth=.7;[ring stroke];
|
||||
}
|
||||
@@ -100,7 +103,8 @@ static NSString *DYNumber(double value,NSDictionary *d) {
|
||||
@implementation DYNumberFieldCell
|
||||
- (void)drawWithFrame:(NSRect)frame inView:(NSView *)view {
|
||||
NSRect rect=NSInsetRect(frame,.5,.5);NSBezierPath *p=[NSBezierPath bezierPathWithRoundedRect:rect xRadius:2.5 yRadius:2.5];
|
||||
NSGradient *gradient=[[[NSGradient alloc]initWithStartingColor:DYThemePalette()[@"slot5"] endingColor:DYThemePalette()[@"slot4"]]autorelease];[gradient drawInBezierPath:p angle:90];[[DYThemePalette()[@"accent"]colorWithAlphaComponent:.65]setStroke];p.lineWidth=.9;[p stroke];
|
||||
if(DYThemeUsesRelief())DYDrawSoftControl(NSInsetRect(frame,1,2),5,YES,NO,NO);
|
||||
else{NSGradient *gradient=[[[NSGradient alloc]initWithStartingColor:DYThemePalette()[@"slot5"] endingColor:DYThemePalette()[@"slot4"]]autorelease];[gradient drawInBezierPath:p angle:90];[[DYThemePalette()[@"accent"]colorWithAlphaComponent:.65]setStroke];p.lineWidth=.9;[p stroke];}
|
||||
[NSGraphicsContext saveGraphicsState];[DYThemeTextShadow()set];[self drawInteriorWithFrame:NSInsetRect(frame,4,3) inView:view];[NSGraphicsContext restoreGraphicsState];
|
||||
}
|
||||
@end
|
||||
@@ -158,27 +162,13 @@ static NSArray *DYAccessibleSubviews(NSView *view, BOOL visibleOnly) {
|
||||
- (void)scrollWheel:(NSEvent*)event{if(!self.hasVerticalScroller){[self.nextResponder scrollWheel:event];return;}[super scrollWheel:event];}
|
||||
@end
|
||||
|
||||
static NSColor *DYModuleColor(NSString *key,BOOL end,CGFloat scale=1) {
|
||||
NSArray *keys=@[@"primary",@"spider",@"base",@"skin",@"look",@"hsl",@"curve",@"grading",@"primaries",@"levels",@"blackwhite",@"balance",@"mixer",@"film"];
|
||||
NSUInteger i=[keys indexOfObject:key?:@""];if(i==NSNotFound)i=0;
|
||||
static const CGFloat colors[][2][3]={
|
||||
{{.96,.18,.68},{.49,.17,1}},{{.03,.84,1},{.12,.32,1}},{{1,.35,.30},{1,.13,.67}},{{1,.70,.15},{1,.30,.39}},
|
||||
{{.66,.32,1},{1,.20,.69}},{{.12,.94,.48},{.01,.72,.77}},{{.04,.82,1},{.25,.35,1}},{{1,.22,.76},{.65,.20,1}},
|
||||
{{.30,.51,1},{.66,.26,1}},{{.23,.94,.56},{.01,.71,.68}},{{.70,.45,1},{.31,.31,1}},{{1,.37,.40},{1,.69,.20}},
|
||||
{{.08,.73,1},{.16,.95,.74}},{{1,.64,.16},{1,.22,.56}}
|
||||
};
|
||||
const CGFloat *c=colors[i][end?1:0];
|
||||
return [NSColor colorWithSRGBRed:c[0]*scale+(scale<1?.012:0) green:c[1]*scale+(scale<1?.006:0) blue:c[2]*scale+(scale<1?.025:0) alpha:1];
|
||||
}
|
||||
static NSColor *DYModuleAccent(NSString *key){return DYModuleColor(key,NO);}
|
||||
@interface DYCard : DYFlippedView @end
|
||||
@implementation DYCard
|
||||
- (void)drawRect:(NSRect)rect {
|
||||
NSBezierPath *path=[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(self.bounds,.5,.5) xRadius:11 yRadius:11];
|
||||
if(DYThemeIndex()==6){NSGradient *g=[[[NSGradient alloc]initWithStartingColor:DYModuleColor(self.identifier,NO,.23) endingColor:DYModuleColor(self.identifier,YES,.18)]autorelease];[g drawInBezierPath:path angle:20];[[DYModuleAccent(self.identifier)colorWithAlphaComponent:.55]setStroke];}else{DYDrawThemeSurface(path,YES);[DYThemeColor(@"border")setStroke];}
|
||||
path.lineWidth=1; [path stroke];
|
||||
if(DYThemeIndex()==6){[NSGraphicsContext saveGraphicsState];[path addClip];NSColor *accent=DYModuleAccent(self.identifier);NSGradient *edge=[[[NSGradient alloc]initWithStartingColor:[accent colorWithAlphaComponent:.85] endingColor:[DYThemeColor(@"accent")colorWithAlphaComponent:.12]]autorelease];[edge drawInRect:NSMakeRect(10,0,self.bounds.size.width-20,2) angle:0];[NSGraphicsContext restoreGraphicsState];}
|
||||
[[NSColor colorWithWhite:.52 alpha:1]setFill];[[NSBezierPath bezierPathWithOvalInRect:NSMakeRect(32,19,5,5)]fill];
|
||||
if(DYThemeUsesRelief())DYDrawSoftControl(NSInsetRect(self.bounds,3,3),12,NO,NO,NO);
|
||||
else{DYDrawThemeSurface(path,YES);[DYThemeColor(@"border")setStroke];path.lineWidth=1;[path stroke];}
|
||||
[(DYThemeIsLight()?DYThemeColor(@"secondary"):[NSColor colorWithWhite:.52 alpha:1])setFill];[[NSBezierPath bezierPathWithOvalInRect:NSMakeRect(32,19,5,5)]fill];
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -188,12 +178,11 @@ static NSColor *DYModuleAccent(NSString *key){return DYModuleColor(key,NO);}
|
||||
@implementation DYHeader
|
||||
- (void)drawRect:(NSRect)dirtyRect {
|
||||
NSRect r=NSInsetRect(self.bounds,.5,2);
|
||||
NSGradient *g=[[[NSGradient alloc]initWithStartingColor:DYThemeIndex()==6?DYModuleColor(self.identifier,NO,.34):DYThemePalette()[@"headerTop"] endingColor:DYThemeIndex()==6?DYModuleColor(self.identifier,YES,.27):DYThemePalette()[@"headerBottom"]]autorelease];
|
||||
[g drawInBezierPath:[NSBezierPath bezierPathWithRoundedRect:r xRadius:8 yRadius:8] angle:90];
|
||||
NSBezierPath *pill=[NSBezierPath bezierPathWithRoundedRect:r xRadius:7 yRadius:7];
|
||||
BOOL expanded=self.state==NSControlStateValueOn;DYDrawSoftControl(NSInsetRect(self.bounds,2,3),7,expanded,NO,self.cell.highlighted);
|
||||
NSDictionary *attributes=DYThemeTextAttributes(self.font,DYInk());
|
||||
[(self.state==NSControlStateValueOn?@"▾":@"▸") drawInRect:NSMakeRect(8,7,12,16) withAttributes:attributes];
|
||||
[self.title drawInRect:NSMakeRect(23,7,MAX(0,r.size.width-31),16) withAttributes:attributes];
|
||||
if(DYThemeIndex()==6){[DYModuleAccent(self.identifier)setFill];[[NSBezierPath bezierPathWithRoundedRect:NSMakeRect(2,8,2,14) xRadius:1 yRadius:1]fill];}
|
||||
}
|
||||
- (void)mouseDown:(NSEvent *)event {
|
||||
if(event.clickCount==2) [NSApp sendAction:self.doubleClickAction to:self.target from:self];
|
||||
@@ -208,7 +197,6 @@ static NSColor *DYModuleAccent(NSString *key){return DYModuleColor(key,NO);}
|
||||
- (void)dealloc {[_swatch release];[super dealloc];}
|
||||
- (void)drawRect:(NSRect)dirtyRect {
|
||||
NSRect r=NSInsetRect(self.bounds,3,3);[_swatch setFill];NSBezierPath *p=[NSBezierPath bezierPathWithRoundedRect:r xRadius:5 yRadius:5];[p fill];
|
||||
if([self.identifier isEqual:@"themeSwatch"]&&self.tag>=5){NSGradient *g=[[[NSGradient alloc]initWithStartingColor:self.tag==6?[NSColor colorWithSRGBRed:.8 green:.12 blue:1 alpha:1]:NSColor.blackColor endingColor:self.tag==6?NSColor.cyanColor:DYThemeSwatch(5)]autorelease];[g drawInBezierPath:p angle:45];}
|
||||
if([self.identifier isEqual:@"customColorSwatch"]){NSGradient *g=[[[NSGradient alloc]initWithColors:@[NSColor.systemRedColor,NSColor.systemYellowColor,NSColor.systemGreenColor,NSColor.systemCyanColor,NSColor.systemBlueColor,NSColor.systemPurpleColor]]autorelease];[g drawInBezierPath:p angle:45];[@"⌾" drawInRect:NSInsetRect(r,3,1) withAttributes:@{NSFontAttributeName:[NSFont boldSystemFontOfSize:16],NSForegroundColorAttributeName:NSColor.whiteColor}];}
|
||||
if(self.state==NSControlStateValueOn){[DYInk() setStroke];p.lineWidth=2;[p stroke];}
|
||||
}
|
||||
@@ -304,12 +292,12 @@ static NSArray *DYPresentationSections(void) {
|
||||
}
|
||||
- (void)drawRect:(NSRect)dirtyRect {
|
||||
NSRect r=[self plotRect];
|
||||
[(DYThemeIndex()==6?[NSColor colorWithSRGBRed:.025 green:.02 blue:.06 alpha:1]:DYThemeIndex()==5?DYThemeColor(@"card"):[NSColor colorWithSRGBRed:.025 green:.085 blue:.13 alpha:1]) setFill];[[NSBezierPath bezierPathWithRoundedRect:r xRadius:4 yRadius:4] fill];
|
||||
DYDrawSoftControl(r,5,YES,NO,NO);
|
||||
if(_histogramToggle.state==NSControlStateValueOn){
|
||||
const DYHistogram *h=_histogram.length==sizeof(DYHistogram)?(const DYHistogram*)_histogram.bytes:nullptr;
|
||||
if(h&&h->samples){
|
||||
uint32_t peak=1;for(int c=0;c<4;c++)if(_channel==0||c==_channel)for(int b=0;b<256;b++)peak=MAX(peak,h->bins[c][b]);
|
||||
NSArray *colors=@[NSColor.whiteColor,[NSColor colorWithSRGBRed:1 green:.23 blue:.37 alpha:1],[NSColor colorWithSRGBRed:.23 green:.94 blue:.50 alpha:1],[NSColor colorWithSRGBRed:.19 green:.51 blue:1 alpha:1]];
|
||||
NSArray *colors=DYThemeIsLight()?@[DYInk(),[NSColor colorWithSRGBRed:.78 green:.20 blue:.32 alpha:1],[NSColor colorWithSRGBRed:.13 green:.50 blue:.31 alpha:1],[NSColor colorWithSRGBRed:.18 green:.39 blue:.83 alpha:1]]:@[NSColor.whiteColor,[NSColor colorWithSRGBRed:1 green:.23 blue:.37 alpha:1],[NSColor colorWithSRGBRed:.23 green:.94 blue:.50 alpha:1],[NSColor colorWithSRGBRed:.19 green:.51 blue:1 alpha:1]];
|
||||
[NSGraphicsContext saveGraphicsState];NSRectClip(r);
|
||||
for(int c=3;c>=0;c--){if(_channel!=0&&c!=_channel)continue;
|
||||
NSBezierPath *area=[NSBezierPath bezierPath],*line=[NSBezierPath bezierPath];[area moveToPoint:NSMakePoint(NSMinX(r),NSMaxY(r))];
|
||||
@@ -318,7 +306,7 @@ static NSArray *DYPresentationSections(void) {
|
||||
}[NSGraphicsContext restoreGraphicsState];
|
||||
}else [@"等待画面 · 请移动播放头" drawAtPoint:NSMakePoint(r.origin.x+8,NSMaxY(r)-20) withAttributes:@{NSFontAttributeName:[NSFont systemFontOfSize:10],NSForegroundColorAttributeName:DYThemeColor(@"secondary")}];
|
||||
}
|
||||
[[NSColor colorWithWhite:1 alpha:.1] setStroke];NSBezierPath *grid=[NSBezierPath bezierPath];grid.lineWidth=.5;
|
||||
[[(DYThemeIsLight()?DYInk():NSColor.whiteColor) colorWithAlphaComponent:DYThemeIsLight()?.18:.1] setStroke];NSBezierPath *grid=[NSBezierPath bezierPath];grid.lineWidth=.5;
|
||||
for(int i=0;i<5;i++){CGFloat x=r.origin.x+r.size.width*i/4,y=r.origin.y+r.size.height*i/4;[grid moveToPoint:NSMakePoint(x,NSMinY(r))];[grid lineToPoint:NSMakePoint(x,NSMaxY(r))];[grid moveToPoint:NSMakePoint(NSMinX(r),y)];[grid lineToPoint:NSMakePoint(NSMaxX(r),y)];}[grid stroke];
|
||||
std::vector<NSPoint> p; p.push_back(NSMakePoint(0,0));
|
||||
NSArray *points=[self activePoints];for(NSDictionary *point in points)p.push_back(NSMakePoint([point[@"x"] doubleValue],[point[@"y"] doubleValue]));p.push_back(NSMakePoint(1,1));
|
||||
@@ -341,11 +329,11 @@ static NSArray *DYPresentationSections(void) {
|
||||
NSPoint q=NSMakePoint(r.origin.x+x*r.size.width,r.origin.y+(1-fmax(0,fmin(1,y)))*r.size.height);
|
||||
if(sample==0)[curve moveToPoint:q];else[curve lineToPoint:q];
|
||||
}
|
||||
NSColor *color=_channel==0?(DYThemeIndex()==6?NSColor.whiteColor:DYAccent()):_channel==1?[NSColor systemRedColor]:_channel==2?[NSColor systemGreenColor]:[NSColor systemBlueColor];[color setStroke];[curve stroke];
|
||||
NSColor *color=_channel==0?(DYThemeIsLight()?DYInk():DYAccent()):_channel==1?[NSColor systemRedColor]:_channel==2?[NSColor systemGreenColor]:[NSColor systemBlueColor];[color setStroke];[curve stroke];
|
||||
for(NSDictionary *point in points) {NSPoint q=[self positionOfPoint:point];[color setFill];[[NSBezierPath bezierPathWithOvalInRect:NSMakeRect(q.x-4,q.y-4,8,8)] fill];[DYInk() setStroke];[[NSBezierPath bezierPathWithOvalInRect:NSMakeRect(q.x-4,q.y-4,8,8)] stroke];}
|
||||
NSDictionary *axis=@{NSFontAttributeName:[NSFont monospacedDigitSystemFontOfSize:8 weight:NSFontWeightRegular],NSForegroundColorAttributeName:DYThemeColor(@"secondary")};
|
||||
[@"0" drawAtPoint:NSMakePoint(NSMinX(r),NSMaxY(r)+2) withAttributes:axis];[@"128" drawAtPoint:NSMakePoint(NSMidX(r)-7,NSMaxY(r)+2) withAttributes:axis];[@"255" drawAtPoint:NSMakePoint(NSMaxX(r)-14,NSMaxY(r)+2) withAttributes:axis];
|
||||
[@"点击添加 · 拖动调整 · 双击删除" drawAtPoint:NSMakePoint(16,self.bounds.size.height-16) withAttributes:@{NSFontAttributeName:[NSFont systemFontOfSize:9],NSForegroundColorAttributeName:[NSColor colorWithWhite:.7 alpha:1]}];
|
||||
[@"点击添加 · 拖动调整 · 双击删除" drawAtPoint:NSMakePoint(16,self.bounds.size.height-16) withAttributes:@{NSFontAttributeName:[NSFont systemFontOfSize:9],NSForegroundColorAttributeName:DYThemeColor(@"secondary")}];
|
||||
}
|
||||
- (void)sendValues:(NSDictionary *)values {
|
||||
NSMutableDictionary *merged=[[_values mutableCopy] autorelease];[merged addEntriesFromDictionary:values];[self setValues:merged];
|
||||
@@ -469,6 +457,7 @@ static NSImage *DYWheelImage(void) {
|
||||
DYRenderer *_renderer;
|
||||
DYLUTLibrary *_library;
|
||||
DYLUTBrowser *_browser;
|
||||
DYColorWorkspace *_workspace;NSButton *_workspaceButton;
|
||||
NSArray *_themeButtons;
|
||||
NSMutableDictionary *_tabs;
|
||||
NSInteger _visibleLooks;
|
||||
@@ -503,7 +492,7 @@ static NSImage *DYWheelImage(void) {
|
||||
self.clipsToBounds=YES;
|
||||
self.wantsLayer=YES; self.layer.masksToBounds=YES;
|
||||
self.layer.backgroundColor=[DYThemePalette()[@"background"] CGColor];
|
||||
self.appearance=[NSAppearance appearanceNamed:NSAppearanceNameDarkAqua];
|
||||
self.appearance=[NSAppearance appearanceNamed:DYThemeIsLight()?NSAppearanceNameAqua:NSAppearanceNameDarkAqua];
|
||||
_brand=[DYLabel(@"◒ 大鱼调色",16) retain]; _brand.font=[NSFont boldSystemFontOfSize:16];_brand.textColor=DYInk();
|
||||
_subtitle=[DYLabel([[NSBundle bundleForClass:self.class]objectForInfoDictionaryKey:@"CFBundleShortVersionString"]?:@"1.1.5",9) retain]; _subtitle.textColor=DYThemeColor(@"secondary");
|
||||
_websiteLink=[[DYWebsiteLink alloc]initWithFrame:NSZeroRect];_websiteLink.title=@"更多插件访问 https://dayu.media";
|
||||
@@ -515,11 +504,12 @@ static NSImage *DYWheelImage(void) {
|
||||
_export=[DYButton(@"导出 LUT",self,@selector(exportLUT:)) retain];
|
||||
_colorSettings=[DYButton(@"颜色设置",self,@selector(toggleColorSettings:))retain];[_colorSettings setButtonType:NSButtonTypePushOnPushOff];_colorSettings.toolTip=@"展开或收起高级颜色设置;默认使用原有流程";_colorSettings.accessibilityLabel=@"颜色设置";_colorSettings.accessibilityValue=@"已收起";
|
||||
_save.identifier=@"primaryAction";
|
||||
_workspaceButton=[DYButton(@"◫ 工作区 · 示波器 / LUT",self,@selector(openWorkspace:))retain];_workspaceButton.accessibilityLabel=@"打开示波器与 LUT 工作区";
|
||||
_addModule=[[DYThemePopUpButton alloc]initWithFrame:NSZeroRect pullsDown:YES];_addModule.font=[NSFont systemFontOfSize:11];_addModule.accessibilityLabel=@"添加模块";[_addModule addItemWithTitle:@"+ 添加模块"];
|
||||
for(NSDictionary *section in DYPresentationSections()){NSMenuItem *item=[[[NSMenuItem alloc]initWithTitle:section[@"title"] action:@selector(addModule:) keyEquivalent:@""]autorelease];item.target=self;item.representedObject=section[@"key"];[_addModule.menu addItem:item];}
|
||||
for(NSView *v in @[_brand,_subtitle,_websiteLink,_resetAll,_save,_load,_export,_colorSettings,_addModule]){[self addSubview:v];v.hidden=_embedded;}
|
||||
for(NSView *v in @[_brand,_subtitle,_websiteLink,_resetAll,_save,_load,_export,_colorSettings,_addModule,_workspaceButton]){[self addSubview:v];v.hidden=_embedded;}
|
||||
NSMutableArray *themes=[NSMutableArray array];for(NSInteger i=0;i<DYThemeNames().count;i++){
|
||||
DYSwatchButton *b=[[[DYSwatchButton alloc]initWithFrame:NSZeroRect]autorelease];[b setButtonType:NSButtonTypePushOnPushOff];b.swatch=DYThemeSwatch(i);b.tag=i;b.identifier=@"themeSwatch";b.target=self;b.action=@selector(selectTheme:);b.title=@"";b.bordered=NO;
|
||||
NSButton *b=DYButton(DYThemeNames()[i],self,@selector(selectTheme:));[b setButtonType:NSButtonTypePushOnPushOff];b.tag=i+7;b.identifier=@"appearanceToggle";
|
||||
b.toolTip=[DYThemeNames()[i] stringByAppendingString:@"主题"];b.accessibilityLabel=b.toolTip;[self addSubview:b];b.hidden=_embedded;[themes addObject:b];
|
||||
}_themeButtons=[themes copy];
|
||||
_scroll=[[DYInspectorScrollView alloc] initWithFrame:NSZeroRect];
|
||||
@@ -537,6 +527,7 @@ static NSImage *DYWheelImage(void) {
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(modelChanged:) name:@"DYModelChanged" object:_manager];
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(themeChanged:) name:DYThemeDidChange object:nil];
|
||||
[NSWorkspace.sharedWorkspace.notificationCenter addObserver:self selector:@selector(themeChanged:) name:NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification object:nil];
|
||||
if(!_embedded)[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(openWorkspace:) name:@"DYColorWorkspaceRequested" object:_manager];
|
||||
if(_renderer)[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(previewChanged:) name:@"DYPreviewDidChange" object:_renderer];
|
||||
[self themeChanged:nil];
|
||||
[self setAccessibilityLabel:@"大鱼调色检查器"];
|
||||
@@ -545,7 +536,7 @@ static NSImage *DYWheelImage(void) {
|
||||
DYBetaSpanEnd(beta,nil);return self;
|
||||
}
|
||||
- (void)dealloc {
|
||||
[self graphicGesture:NO title:nil];_spiderPanel.delegate=nil;
|
||||
[self graphicGesture:NO title:nil];_spiderPanel.delegate=nil;[_workspace close];[_workspace release];[_workspaceButton release];
|
||||
for(id graphic in _graphics)if([graphic isKindOfClass:DYPrimaryBalanceWheel.class])[(DYPrimaryBalanceWheel*)graphic setDelegate:nil];
|
||||
for(NSProgress *p in _assetLoads.allValues)[p cancel];[_assetLoads release];[_assetLoadIDs release];[_menuScan cancel];[_menuScan release];[_pendingAssetMenuCommand release];
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];[NSWorkspace.sharedWorkspace.notificationCenter removeObserver:self];
|
||||
@@ -556,7 +547,8 @@ static NSImage *DYWheelImage(void) {
|
||||
[super dealloc];
|
||||
}
|
||||
- (BOOL)isFlipped { return YES; }
|
||||
- (void)drawRect:(NSRect)rect {DYDrawThemeSurface([NSBezierPath bezierPathWithRect:self.bounds],NO);if(DYThemeIndex()==6&&![self.identifier isEqual:@"inspectorBackground"]){NSGradient *g=[[[NSGradient alloc]initWithStartingColor:DYThemePalette()[@"activeTop"] endingColor:DYThemePalette()[@"activeBottom"]]autorelease];[g drawInRect:NSMakeRect(0,0,self.bounds.size.width,2) angle:0];}}
|
||||
- (void)drawRect:(NSRect)rect {DYDrawThemeSurface([NSBezierPath bezierPathWithRect:self.bounds],NO);}
|
||||
|
||||
- (BOOL)isAccessibilityElement { return YES; }
|
||||
- (NSAccessibilityRole)accessibilityRole { return NSAccessibilityGroupRole; }
|
||||
- (NSArray *)accessibilityChildren { return DYAccessibleSubviews(self,NO); }
|
||||
@@ -565,7 +557,7 @@ static NSImage *DYWheelImage(void) {
|
||||
- (NSSize)intrinsicContentSize { return NSMakeSize(360,780); }
|
||||
- (void)viewDidMoveToWindow {
|
||||
[super viewDidMoveToWindow];
|
||||
if(!self.window){[self graphicGesture:NO title:nil];[self cancelAssetLoads];}
|
||||
if(!self.window){[self graphicGesture:NO title:nil];[self cancelAssetLoads];[_workspace close];}
|
||||
if(self.window) {
|
||||
[self refresh];
|
||||
NSAccessibilityPostNotification(self,NSAccessibilityLayoutChangedNotification);
|
||||
@@ -581,15 +573,22 @@ static NSImage *DYWheelImage(void) {
|
||||
_colorSettings.accessibilityValue=_colorSettingsExpanded?@"已展开":@"已收起";[self setNeedsLayout:YES];[self layoutSubtreeIfNeeded];
|
||||
[_document scrollPoint:NSZeroPoint];NSAccessibilityPostNotification(self,NSAccessibilityLayoutChangedNotification);
|
||||
}
|
||||
- (void)openWorkspace:(id)sender {
|
||||
if(_embedded||!self.window||!_renderer)return;
|
||||
[_browser close];
|
||||
if(!_workspace)_workspace=[[DYColorWorkspace alloc]initWithManager:_manager renderer:_renderer library:_library title:@"大鱼调色 · 当前片段"];
|
||||
[_workspace showRelativeToView:self];
|
||||
}
|
||||
- (void)openWebsite:(id)sender {[[NSWorkspace sharedWorkspace]openURL:[NSURL URLWithString:@"https://dayu.media"]];}
|
||||
- (void)redrawTree:(NSView *)view { [view setNeedsDisplay:YES];for(NSView *child in view.subviews)[self redrawTree:child]; }
|
||||
- (void)themeChanged:(NSNotification *)notification {
|
||||
for(NSDictionary *card in _cards){NSColor *accent=DYThemeIndex()==6?DYModuleAccent(card[@"section"][@"key"]):DYAccent();for(NSString *key in @[@"enabled",@"maskButton",@"repeatButton",@"removeButton"])[card[key]setContentTintColor:accent];}
|
||||
self.appearance=[NSAppearance appearanceNamed:DYThemeIsLight()?NSAppearanceNameAqua:NSAppearanceNameDarkAqua];
|
||||
for(NSDictionary *card in _cards){NSColor *accent=DYAccent();for(NSString *key in @[@"enabled",@"maskButton",@"repeatButton",@"removeButton"])[card[key]setContentTintColor:accent];}
|
||||
self.layer.backgroundColor=[DYThemePalette()[@"background"] CGColor];
|
||||
for(NSButton *b in _themeButtons)b.state=b.tag==DYThemeIndex()?NSControlStateValueOn:NSControlStateValueOff;
|
||||
_websiteLink.attributedTitle=[[[NSAttributedString alloc]initWithString:_websiteLink.title attributes:DYThemeTextAttributes(_websiteLink.font,DYAccent())]autorelease];
|
||||
for(NSDictionary *r in _controls.allValues)[r[@"field"] setBackgroundColor:DYThemeColor(@"field")];
|
||||
[_browser updatePalette:DYThemePalette()];[self redrawTree:self];
|
||||
[_browser updatePalette:DYThemePalette()];[_workspace updatePalette];[self redrawTree:self];
|
||||
}
|
||||
- (void)tabChanged:(NSControl *)sender {
|
||||
if([sender isKindOfClass:NSSegmentedControl.class])_tabs[sender.identifier]=@([(NSSegmentedControl *)sender selectedSegment]);
|
||||
@@ -714,10 +713,10 @@ static NSImage *DYWheelImage(void) {
|
||||
id<PROAPIAccessing> host=_embedded?[(DYToolManager*)_manager host]:_manager;
|
||||
NSString *nodeID=_embedded?[(DYToolManager*)_manager nodeID]:[@"base:" stringByAppendingString:key];
|
||||
DYToolMaskPanel *maskPanel=[[[DYToolMaskPanel alloc]initWithManager:host nodeID:nodeID]autorelease];[card addSubview:maskPanel];[body insertObject:maskPanel atIndex:0];record[@"maskPanel"]=maskPanel;
|
||||
NSButton *mask=DYButton(@"",self,@selector(toolMask:));mask.tag=index;mask.bordered=NO;mask.image=[NSImage imageWithSystemSymbolName:@"circle.dashed.inset.filled" accessibilityDescription:@"添加蒙版"];mask.toolTip=@"添加本工具的独立蒙版";mask.accessibilityLabel=[section[@"title"]stringByAppendingString:@"添加蒙版"];[card addSubview:mask];record[@"maskButton"]=mask;
|
||||
NSButton *mask=DYButton(@"",self,@selector(toolMask:));mask.tag=index;mask.bordered=NO;mask.identifier=@"layerAction";mask.image=[NSImage imageWithSystemSymbolName:@"circle.dashed.inset.filled" accessibilityDescription:@"添加蒙版"];mask.toolTip=@"添加本工具的独立蒙版";mask.accessibilityLabel=[section[@"title"]stringByAppendingString:@"添加蒙版"];[card addSubview:mask];record[@"maskButton"]=mask;
|
||||
DYMaskCountBadge *maskBadge=[[[DYMaskCountBadge alloc]initWithFrame:NSZeroRect]autorelease];maskBadge.hidden=YES;maskBadge.accessibilityLabel=[section[@"title"] stringByAppendingString:@"蒙版数量"];[card addSubview:maskBadge];record[@"maskBadge"]=maskBadge;
|
||||
NSButton *repeat=DYButton(@"",self,@selector(repeatTool:));repeat.tag=index;repeat.bordered=NO;repeat.image=[NSImage imageWithSystemSymbolName:@"plus.square.on.square" accessibilityDescription:@"再加一层"];repeat.toolTip=@"紧接当前工具插入一层初始化工具";repeat.accessibilityLabel=[section[@"title"]stringByAppendingString:@"再加一层"];[card addSubview:repeat];record[@"repeatButton"]=repeat;
|
||||
NSButton *remove=DYButton(@"",self,@selector(removeTool:));remove.tag=index;remove.bordered=NO;remove.image=[NSImage imageWithSystemSymbolName:@"minus.square" accessibilityDescription:@"删除此层"];remove.toolTip=@"删除此层并还原参数、LUT 与蒙版";remove.accessibilityLabel=[section[@"title"]stringByAppendingString:_embedded?@"删除此层":@"删除模块"];[card addSubview:remove];record[@"removeButton"]=remove;
|
||||
NSButton *repeat=DYButton(@"",self,@selector(repeatTool:));repeat.tag=index;repeat.bordered=NO;repeat.identifier=@"layerAction";repeat.image=[NSImage imageWithSystemSymbolName:@"plus.square.on.square" accessibilityDescription:@"再加一层"];repeat.toolTip=@"紧接当前工具插入一层初始化工具";repeat.accessibilityLabel=[section[@"title"]stringByAppendingString:@"再加一层"];[card addSubview:repeat];record[@"repeatButton"]=repeat;
|
||||
NSButton *remove=DYButton(@"",self,@selector(removeTool:));remove.tag=index;remove.bordered=NO;remove.identifier=@"layerAction";remove.image=[NSImage imageWithSystemSymbolName:@"minus.square" accessibilityDescription:@"删除此层"];remove.toolTip=@"删除此层并还原参数、LUT 与蒙版";remove.accessibilityLabel=[section[@"title"]stringByAppendingString:_embedded?@"删除此层":@"删除模块"];[card addSubview:remove];record[@"removeButton"]=remove;
|
||||
[_cards addObject:record];
|
||||
index++;
|
||||
}
|
||||
@@ -759,12 +758,12 @@ static NSImage *DYWheelImage(void) {
|
||||
[super layout];
|
||||
CGFloat w=MAX(280,self.bounds.size.width),h=self.bounds.size.height;
|
||||
_brand.frame=NSMakeRect(16,14,112,26);_subtitle.frame=NSMakeRect(130,21,40,13);_subtitle.hidden=_embedded||w<380;
|
||||
for(NSInteger i=0;i<_themeButtons.count;i++)[_themeButtons[i]setFrame:NSMakeRect(w-147+i*16,17,16,22)];
|
||||
for(NSInteger i=0;i<_themeButtons.count;i++)[_themeButtons[i]setFrame:NSMakeRect(w-130+i*47,16,44,25)];
|
||||
_resetAll.frame=NSMakeRect(w-33,16,23,24);
|
||||
_websiteLink.frame=NSMakeRect(16,41,w-32,20);
|
||||
CGFloat gap=7;BOOL compact=w<320;CGFloat bw=(w-32-gap*(compact?1:3))/(compact?2:4);
|
||||
NSArray *actions=@[_save,_load,_export,_colorSettings];for(NSUInteger i=0;i<actions.count;i++)[actions[i]setFrame:NSMakeRect(16+(bw+gap)*(compact?i%2:i),74+(compact?i/2*34:0),bw,27)];
|
||||
CGFloat top=compact?178:144;_addModule.frame=NSMakeRect(16,top-36,w-32,27);
|
||||
CGFloat top=(compact?178:144)+34;_workspaceButton.frame=NSMakeRect(16,top-70,w-32,27);_addModule.frame=NSMakeRect(16,top-36,w-32,27);
|
||||
_scroll.frame=_embedded?NSMakeRect(0,0,w,h):NSMakeRect(0,top,w,MAX(80,h-top));
|
||||
CGFloat cw=MAX(244,_scroll.contentSize.width-32),y=8;
|
||||
if(_managedPanel&&!_managedPanel.hidden){_managedPanel.frame=NSMakeRect(28,y,cw-24,_managedPanel.contentHeight);y+=_managedPanel.contentHeight+12;}
|
||||
@@ -1063,6 +1062,7 @@ static NSImage *DYWheelImage(void) {
|
||||
if([panel runModal]==NSModalResponseOK&&self.window)[self setAssetPath:panel.URL.path forKey:key];
|
||||
}
|
||||
- (void)browseAsset:(NSButton *)sender {
|
||||
[_workspace close];
|
||||
[_browser close];[_browser release];_browser=nil;
|
||||
id<FxCustomParameterActionAPI_v4> a=[self actionAPI];if(!a)return;[a startAction:self];NSString *selected=nil;@try{selected=[DYReadAssets(_manager,a.currentTime).paths[sender.identifier]copy];}@finally{[a endAction:self];}
|
||||
__block DYInspector *owner=self;NSString *key=[[sender.identifier copy]autorelease];
|
||||
|
||||
@@ -19,6 +19,9 @@ typedef NSProgress * (^DYLUTSelectionHandler)(NSString *path,void (^completion)(
|
||||
/// Attach to the FxRemoteWindow API's supplied parent; the caller owns that API.
|
||||
/// Completion, double-click and close dismiss through closeAction exactly once.
|
||||
- (void)showInRemoteParent:(NSView *)parent close:(void (^)(void))closeAction;
|
||||
/// Embedded content inside another remote tool workspace. It follows only the
|
||||
/// supplied container and does not take ownership of the enclosing window.
|
||||
- (void)embedInView:(NSView *)parent close:(void (^)(void))closeAction;
|
||||
- (void)updatePalette:(NSDictionary *)palette;
|
||||
/// Replace the source frame after the renderer captures a new playhead image.
|
||||
/// Passing identical bytes keeps the current thumbnail jobs and cache intact.
|
||||
|
||||
+11
-5
@@ -163,7 +163,7 @@ static void DYBrowserGeometrySample(NSView *root,NSString *phase){
|
||||
NSCache *_thumbnailCache;
|
||||
dispatch_queue_t _previewQueue;
|
||||
DYBrowserWork *_work;
|
||||
BOOL _closed,_sizing,_visible,_remoteMode,_importing,_layingOut,_detached;
|
||||
BOOL _closed,_sizing,_visible,_remoteMode,_importing,_layingOut,_detached,_embedded;
|
||||
NSProgress *_libraryTask,*_selectionTask;
|
||||
NSTimer *_progressTimer;
|
||||
NSUInteger _libraryGeneration,_selectionGeneration;
|
||||
@@ -271,6 +271,9 @@ static NSButton *BrowserButton(NSString *title,id target,SEL action){NSButton *b
|
||||
if([NSUserDefaults.standardUserDefaults boolForKey:@"DYBrowserGeometryDiagnostics"])dispatch_after(dispatch_time(DISPATCH_TIME_NOW,NSEC_PER_SEC),dispatch_get_main_queue(),^{if(!_closed)DYBrowserGeometrySample(_root,@"settled");});
|
||||
NSAccessibilityPostNotification(parent,NSAccessibilityLayoutChangedNotification);
|
||||
}
|
||||
- (void)embedInView:(NSView *)parent close:(void (^)(void))closeAction{
|
||||
_embedded=YES;[self showInRemoteParent:parent close:closeAction];_done.title=@"返回示波器";
|
||||
}
|
||||
- (void)fitRemoteParent{
|
||||
NSView *parent=_root.superview;if(_closed||!_remoteMode||!parent)return;
|
||||
// A scaled-display ViewBridge service can hand us its top-level content
|
||||
@@ -279,7 +282,7 @@ static NSButton *BrowserButton(NSString *title,id target,SEL action){NSButton *b
|
||||
// container. Align that content origin using AppKit's coordinate APIs;
|
||||
// leave the host's window, content size and bridge resize policy intact.
|
||||
NSWindow *window=parent.window;
|
||||
if(window&&parent==window.contentView&&parent.superview){
|
||||
if(!_embedded&&window&&parent==window.contentView&&parent.superview){
|
||||
NSRect screenContent=[window contentRectForFrameRect:window.frame];
|
||||
NSRect windowContent=[window convertRectFromScreen:screenContent];
|
||||
NSPoint origin=[parent.superview convertPoint:windowContent.origin fromView:nil];
|
||||
@@ -293,6 +296,7 @@ static NSButton *BrowserButton(NSString *title,id target,SEL action){NSButton *b
|
||||
DYBrowserGeometrySample(_root,notification.name);
|
||||
}
|
||||
- (void)configurePresentationWindow{
|
||||
if(_embedded)return;
|
||||
NSWindow *window=_root.window;if(!window||window==self.window)return;
|
||||
if(_presentationWindow!=window){[_presentationWindow release];_presentationWindow=[window retain];
|
||||
for(NSNotificationName name in @[NSWindowDidMoveNotification,NSWindowDidResizeNotification])[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(presentationGeometryChanged:) name:name object:window];
|
||||
@@ -400,10 +404,12 @@ static NSButton *BrowserButton(NSString *title,id target,SEL action){NSButton *b
|
||||
|
||||
- (void)updatePalette:(NSDictionary *)palette{
|
||||
NSMutableDictionary *browserPalette=[NSMutableDictionary dictionaryWithDictionary:palette?:@{}];
|
||||
browserPalette[@"background"]=[NSColor colorWithCalibratedRed:.035 green:.08 blue:.12 alpha:1];
|
||||
NSColor *background=[palette[@"background"]colorUsingColorSpace:NSColorSpace.sRGBColorSpace];
|
||||
BOOL light=background&&background.redComponent>.7&&background.greenComponent>.7;
|
||||
// Keep the supplied neutral surface in both relief themes.
|
||||
[_palette release];_palette=[browserPalette copy];_root.palette=_palette;_folderDocument.palette=_palette;_gridDocument.palette=_palette;
|
||||
self.window.backgroundColor=DYBrowserColor(_palette,@"background");self.window.appearance=[NSAppearance appearanceNamed:NSAppearanceNameDarkAqua];
|
||||
_root.appearance=[NSAppearance appearanceNamed:NSAppearanceNameDarkAqua];
|
||||
self.window.backgroundColor=DYBrowserColor(_palette,@"background");self.window.appearance=[NSAppearance appearanceNamed:light?NSAppearanceNameAqua:NSAppearanceNameDarkAqua];
|
||||
_root.appearance=[NSAppearance appearanceNamed:light?NSAppearanceNameAqua:NSAppearanceNameDarkAqua];
|
||||
for(NSTextField *label in @[_titleLabel,_countLabel,_statusLabel,_sizeLabel,_emptyLabel])label.textColor=DYBrowserColor(_palette,label==_titleLabel?@"text":@"secondary");
|
||||
for(NSButton *button in @[_importFiles,_importFolder,_reveal,_refresh,_none,_done,_layoutMenu])button.contentTintColor=DYBrowserColor(_palette,@"accent");
|
||||
_search.textColor=DYBrowserColor(_palette,@"text");_search.backgroundColor=DYBrowserColor(_palette,@"field");
|
||||
|
||||
+4
-2
@@ -12,6 +12,7 @@
|
||||
#import <os/log.h>
|
||||
#include "MaskCore/DYTracker.hpp"
|
||||
#include <atomic>
|
||||
#include "DYViewerParameterBridge.inc.h"
|
||||
#include "DYToolHostDeclarations.inc.h"
|
||||
#include "DYToolFlow.inc.h"
|
||||
@implementation DYPlugIn {
|
||||
@@ -29,12 +30,12 @@
|
||||
- (NSView*)createViewForParameterID:(UInt32)pid{[self scheduleToolCanvasRegistration];return pid==DYInspectorParameterID?[[DYInspector alloc]initWithAPIManager:_apiManager renderer:_renderer]:[[NSView alloc]initWithFrame:NSZeroRect];}
|
||||
- (BOOL)parameterChanged:(UInt32)pid atTime:(CMTime)t error:(NSError**)e{if(pid==DYToolsParameterID)[self adoptToolCanvasDocument:DYReadTools(_apiManager,t).document];if(pid==DYToolsParameterID||pid==2013||pid==2014||(pid>=2236&&pid<2400)||pid==DYAssetsParameterID)[_renderer invalidatePreview];dispatch_async(dispatch_get_main_queue(),^{[NSNotificationCenter.defaultCenter postNotificationName:DYModelChanged object:self.apiManager];});return YES;}
|
||||
- (BOOL)pluginState:(NSData**)state atTime:(CMTime)t quality:(FxQuality)q error:(NSError**)e{
|
||||
DYUniforms u;DYReadUniforms(_apiManager,t,&u);CMTime frameDuration=kCMTimeInvalid,origin=kCMTimeZero;id<FxTimingAPI_v4>timing=[_apiManager apiForProtocol:@protocol(FxTimingAPI_v4)];if([timing respondsToSelector:@selector(frameDuration:)])[timing frameDuration:&frameDuration];if([timing respondsToSelector:@selector(startTimeForEffect:)])[timing startTimeForEffect:&origin];int64_t frame=DYFilmFrameIndex(t,frameDuration,origin);u.filmFrameKey=DYFilmFrameKey(frame,u.film.grainHold,u.film.grainSeed);DYAssetState*a=DYReadAssets(_apiManager,t);DYToolDocument *tools=DYReadTools(_apiManager,t);[self adoptToolCanvasDocument:tools.document];double copyAuto=0;[[_apiManager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)]getFloatValue:©Auto fromParameter:8800 atTime:t];NSMutableDictionary *snapshot=DYMutablePlist(DYToolRenderSnapshot(tools.document,t));for(NSMutableDictionary *node in snapshot[@"layers"]){DYUniforms layer=DYToolUniforms(node);if([node[@"type"]isEqual:@"film"])node[@"filmFrameKey"]=@(DYFilmFrameKey(frame,layer.film.grainHold,layer.film.grainSeed));}NSInteger primaries=-1;id<FxColorGamutAPI_v2>gamut=[_apiManager apiForProtocol:@protocol(FxColorGamutAPI_v2)];if([gamut respondsToSelector:@selector(colorPrimaries)])primaries=gamut.colorPrimaries;NSDictionary*s=@{@"colorManagement":a.colorManagement?:@{},@"hostPrimaries":@(primaries),@"schema":@2,@"tools":snapshot,@"copyAuto":@(copyAuto>.5),@"uniforms":[NSData dataWithBytes:&u length:sizeof(u)],@"paths":a.paths?:@{},@"spider":a.spiderMesh?:[NSData data]};*state=[NSPropertyListSerialization dataWithPropertyList:s format:NSPropertyListBinaryFormat_v1_0 options:0 error:e];return *state!=nil;
|
||||
DYUniforms u;DYReadUniforms(_apiManager,t,&u);CMTime frameDuration=kCMTimeInvalid,origin=kCMTimeZero;id<FxTimingAPI_v4>timing=[_apiManager apiForProtocol:@protocol(FxTimingAPI_v4)];if([timing respondsToSelector:@selector(frameDuration:)])[timing frameDuration:&frameDuration];if([timing respondsToSelector:@selector(startTimeForEffect:)])[timing startTimeForEffect:&origin];int64_t frame=DYFilmFrameIndex(t,frameDuration,origin);u.filmFrameKey=DYFilmFrameKey(frame,u.film.grainHold,u.film.grainSeed);DYAssetState*a=DYReadAssets(_apiManager,t);DYToolDocument *tools=DYReadTools(_apiManager,t);[self adoptToolCanvasDocument:tools.document];[_viewerParameterBridge publishUniforms:&u document:tools.document atTime:t];double copyAuto=0;[[_apiManager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)]getFloatValue:©Auto fromParameter:8800 atTime:t];NSMutableDictionary *snapshot=DYMutablePlist(DYToolRenderSnapshot(tools.document,t));for(NSMutableDictionary *node in snapshot[@"layers"]){DYUniforms layer=DYToolUniforms(node);if([node[@"type"]isEqual:@"film"])node[@"filmFrameKey"]=@(DYFilmFrameKey(frame,layer.film.grainHold,layer.film.grainSeed));}NSInteger primaries=-1;id<FxColorGamutAPI_v2>gamut=[_apiManager apiForProtocol:@protocol(FxColorGamutAPI_v2)];if([gamut respondsToSelector:@selector(colorPrimaries)])primaries=gamut.colorPrimaries;NSDictionary*s=@{@"colorManagement":a.colorManagement?:@{},@"hostPrimaries":@(primaries),@"schema":@2,@"tools":snapshot,@"copyAuto":@(copyAuto>.5),@"uniforms":[NSData dataWithBytes:&u length:sizeof(u)],@"paths":a.paths?:@{},@"spider":a.spiderMesh?:[NSData data]};*state=[NSPropertyListSerialization dataWithPropertyList:s format:NSPropertyListBinaryFormat_v1_0 options:0 error:e];return *state!=nil;
|
||||
}
|
||||
- (BOOL)destinationImageRect:(FxRect*)rect sourceImages:(NSArray<FxImageTile*>*)src destinationImage:(FxImageTile*)dst pluginState:(NSData*)s atTime:(CMTime)t error:(NSError**)e{if(!src.count)return NO;*rect=src[0].imagePixelBounds;return YES;}
|
||||
- (BOOL)sourceTileRect:(FxRect*)rect sourceImageIndex:(NSUInteger)i sourceImages:(NSArray<FxImageTile*>*)src destinationTileRect:(FxRect)dstRect destinationImage:(FxImageTile*)dst pluginState:(NSData*)s atTime:(CMTime)t error:(NSError**)e{if(i>=src.count)return NO;*rect=src[i].imagePixelBounds;return YES;}
|
||||
- (BOOL)renderDestinationImage:(FxImageTile*)dst sourceImages:(NSArray<FxImageTile*>*)src pluginState:(NSData*)s atTime:(CMTime)t error:(NSError**)e{
|
||||
if(!src.count||!src[0].ioSurface||!dst.ioSurface||!s.length)return NO;NSDictionary*p=[NSPropertyListSerialization propertyListWithData:s options:NSPropertyListImmutable format:NULL error:e];if(![p isKindOfClass:NSDictionary.class])return NO;NSData*b=p[@"uniforms"];if(![@[@1,@2]containsObject:p[@"schema"]]||![b isKindOfClass:NSData.class]||b.length!=sizeof(DYUniforms)||![p[@"paths"]isKindOfClass:NSDictionary.class])return NO;DYUniforms u;[b getBytes:&u length:sizeof(u)];uint64_t beta=!_betaFirstRenderStarted.exchange(true)?DYBetaSpanBegin(@"first_render",nil):0;BOOL ok=[_renderer renderSource:src[0] destination:dst uniforms:u paths:p[@"paths"] spider:p[@"spider"] tools:p[@"tools"] colorManagement:p[@"colorManagement"] hostPrimaries:p[@"hostPrimaries"]?[p[@"hostPrimaries"]integerValue]:-1 error:e];DYBetaSpanEnd(beta,@{@"status":ok?@"passed":@"failed"});if(!ok)DYBetaEvent(@"render_error",@{@"error_domain":(e&&*e)?(*e).domain:@"unknown",@"error_code":@((e&&*e)?(*e).code:0)});if(ok){if(_toolCaptureEnabled&&!_trackingActive.load()){dy::GrayFrame frame=[self toolGrayFrame:src[0] error:nil];if(frame.valid()){@synchronized(self){_toolSourceFrame=std::move(frame);_toolSourceTime=t;}}}BOOL analyze=NO;@synchronized(self){if(![p[@"copyAuto"]boolValue])_copyAnalyzed=NO;else if(!_copyAnalyzed){_copyAnalyzed=YES;analyze=YES;}}if(analyze){NSDictionary*values=DYAutoGrade([_renderer preview]);if(values)dispatch_async(dispatch_get_main_queue(),^{[self applyValues:values];});}}return ok;
|
||||
if(!src.count||!src[0].ioSurface||!dst.ioSurface||!s.length)return NO;NSDictionary*p=[NSPropertyListSerialization propertyListWithData:s options:NSPropertyListImmutable format:NULL error:e];if(![p isKindOfClass:NSDictionary.class])return NO;NSData*b=p[@"uniforms"];if(![@[@1,@2]containsObject:p[@"schema"]]||![b isKindOfClass:NSData.class]||b.length!=sizeof(DYUniforms)||![p[@"paths"]isKindOfClass:NSDictionary.class])return NO;DYUniforms u;[b getBytes:&u length:sizeof(u)];uint64_t beta=!_betaFirstRenderStarted.exchange(true)?DYBetaSpanBegin(@"first_render",nil):0;BOOL ok=[_renderer renderSource:src[0] destination:dst uniforms:u paths:p[@"paths"] spider:p[@"spider"] tools:p[@"tools"] colorManagement:p[@"colorManagement"] hostPrimaries:p[@"hostPrimaries"]?[p[@"hostPrimaries"]integerValue]:-1 error:e];DYBetaSpanEnd(beta,@{@"status":ok?@"passed":@"failed"});if(!ok)DYBetaEvent(@"render_error",@{@"error_domain":(e&&*e)?(*e).domain:@"unknown",@"error_code":@((e&&*e)?(*e).code:0)});if(ok){[_renderer captureScopeTile:dst atTime:t];if(_toolCaptureEnabled&&!_trackingActive.load()){dy::GrayFrame frame=[self toolGrayFrame:src[0] error:nil];if(frame.valid()){@synchronized(self){_toolSourceFrame=std::move(frame);_toolSourceTime=t;}}}BOOL analyze=NO;@synchronized(self){if(![p[@"copyAuto"]boolValue])_copyAnalyzed=NO;else if(!_copyAnalyzed){_copyAnalyzed=YES;analyze=YES;}}if(analyze){NSDictionary*values=DYAutoGrade([_renderer preview]);if(values)dispatch_async(dispatch_get_main_queue(),^{[self applyValues:values];});}}return ok;
|
||||
}
|
||||
- (void)alert:(NSString*)message{dispatch_async(dispatch_get_main_queue(),^{NSAlert*a=[NSAlert new];a.messageText=@"大鱼调色";a.informativeText=message?:@"操作未完成";[a runModal];[a release];});}
|
||||
- (void)exportRequested:(NSNotification*)n{
|
||||
@@ -44,4 +45,5 @@
|
||||
- (void)autoRequested:(NSNotification*)n{NSData*frame=[_renderer preview];[self applyValues:[n.name isEqual:@"DYAutoGrade"]?DYAutoGrade(frame):DYAutoWhiteBalance(frame)];}
|
||||
- (void)whiteBalanceRequested:(NSNotification*)n{NSColor*c=[n.userInfo[@"color"]colorUsingColorSpace:NSColorSpace.sRGBColorSpace];if(!c)return;float temp=0,tint=0;if([DYColorTables neutralizeColor:(vector_float3){(float)c.redComponent,(float)c.greenComponent,(float)c.blueComponent} temperature:&temp tint:&tint])[self applyValues:@{@"temperature":@(temp),@"tint":@(tint)}];else [self alert:@"所选颜色过暗,请选择白色或中性灰区域。"];}
|
||||
@end
|
||||
#include "DYViewerControls.inc.h"
|
||||
#include "DYToolOSC.inc.h"
|
||||
@@ -20,6 +20,16 @@
|
||||
/// Analysis preview retains the host texture's original row order separately.
|
||||
- (NSData*)lookLUTPreview;
|
||||
- (void)invalidatePreview;
|
||||
/// Final-output scopes run only while the auxiliary workspace is visible.
|
||||
- (void)setScopeEnabled:(BOOL)enabled;
|
||||
/// Call after the final destination render succeeds, while the tile is valid.
|
||||
/// Only the small GPU readback waits here; conversion/statistics are coalesced
|
||||
/// on a worker. No main-queue wait or host API is performed by this method.
|
||||
- (void)captureScopeTile:(FxImageTile *)tile atTime:(CMTime)time;
|
||||
/// Straight float RGBA, 320x180, visually top row first. Consult metadata domain.
|
||||
- (NSData *)scopePreview;
|
||||
/// Includes waveform/parade RGBA8 rasters, histogram and honest color-domain labels.
|
||||
- (NSDictionary *)scopeMetadata;
|
||||
- (NSDictionary*)colorContext;
|
||||
- (BOOL)renderSource:(FxImageTile*)source destination:(FxImageTile*)destination uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths spider:(NSData*)spider tools:(NSDictionary*)tools colorManagement:(NSDictionary*)state hostPrimaries:(NSInteger)primaries error:(NSError**)error;
|
||||
- (BOOL)exportLUT:(NSURL*)url uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths spider:(NSData*)spider tools:(NSDictionary*)tools colorManagement:(NSDictionary*)state error:(NSError**)error;
|
||||
|
||||
+13
-3
@@ -18,6 +18,8 @@
|
||||
#include <zlib.h>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
#include "DYScopeMath.hpp"
|
||||
#import "DYScopeSample.h"
|
||||
static BOOL fail(NSError**e,NSString*m){if(e)*e=[NSError errorWithDomain:@"com.dayu.color" code:1 userInfo:@{NSLocalizedDescriptionKey:m?:@"Metal 调色失败"}];return NO;}
|
||||
// MRC NSError out-parameters must outlive every nested render pool. Preserve
|
||||
// the same pointer across nested closures, then autorelease in the caller pool.
|
||||
@@ -111,15 +113,23 @@ static NSArray *DYPrimaryActiveFinishing(DYUniforms u,NSDictionary *paths,NSData
|
||||
BOOL _exporting;
|
||||
NSDictionary *_toolDocument,*_colorContext,*_exportManagedState;
|
||||
BOOL _managedFinishing;
|
||||
dispatch_queue_t _scopeQueue;
|
||||
BOOL _scopeEnabled,_scopeWorkerRunning;
|
||||
NSUInteger _scopeGeneration;
|
||||
DYScopeSample *_scopePending;
|
||||
NSData *_scopePreview;
|
||||
NSDictionary *_scopeMetadata;
|
||||
DYColorProfile *_scopeProfile;
|
||||
}
|
||||
@end
|
||||
@implementation DYRenderer
|
||||
#include "DYScopeCapture.inc.h"
|
||||
#include "DYFilmRender.inc.h"
|
||||
#include "DYPrimaryRender.inc.h"
|
||||
#include "DYManagedRender.inc.h"
|
||||
#include "DYToolRender.inc.h"
|
||||
- (instancetype)init{if((self=[super init])){_previewLock=[NSObject new];_devices=[NSMutableDictionary new];_luts=[NSMutableDictionary new];_preparedLUTs=[NSMutableDictionary new];_activeLUTPaths=[NSSet new];_lutPreparationQueue=dispatch_queue_create("com.dayu.color.lut-upload",DISPATCH_QUEUE_SERIAL);dispatch_set_target_queue(_lutPreparationQueue,dispatch_get_global_queue(QOS_CLASS_USER_INITIATED,0));_tables=[DYColorTables new];}return self;}
|
||||
- (void)dealloc{[_devices release];[_luts release];[_preparedLUTs release];[_activeLUTPaths release];dispatch_release(_lutPreparationQueue);[_tables release];[_preview release];[_lookLUTPreview release];[_histogram release];[_colorContext release];[_previewLock release];[super dealloc];}
|
||||
- (instancetype)init{if((self=[super init])){_previewLock=[NSObject new];_scopeQueue=dispatch_queue_create("com.dayu.color.final-output-scopes",DISPATCH_QUEUE_SERIAL);_devices=[NSMutableDictionary new];_luts=[NSMutableDictionary new];_preparedLUTs=[NSMutableDictionary new];_activeLUTPaths=[NSSet new];_lutPreparationQueue=dispatch_queue_create("com.dayu.color.lut-upload",DISPATCH_QUEUE_SERIAL);dispatch_set_target_queue(_lutPreparationQueue,dispatch_get_global_queue(QOS_CLASS_USER_INITIATED,0));_tables=[DYColorTables new];}return self;}
|
||||
- (void)dealloc{[_scopePending release];[_scopePreview release];[_scopeMetadata release];[_scopeProfile release];dispatch_release(_scopeQueue);[_devices release];[_luts release];[_preparedLUTs release];[_activeLUTPaths release];dispatch_release(_lutPreparationQueue);[_tables release];[_preview release];[_lookLUTPreview release];[_histogram release];[_colorContext release];[_previewLock release];[super dealloc];}
|
||||
- (void)trimPreparedLUTsKeeping:(NSString *)path {
|
||||
if(_preparedLUTs.count<=12)return;
|
||||
for(NSString *key in _preparedLUTs.allKeys)if(![_activeLUTPaths containsObject:key]&&![key isEqualToString:path])[_preparedLUTs removeObjectForKey:key];
|
||||
@@ -153,7 +163,7 @@ static NSArray *DYPrimaryActiveFinishing(DYUniforms u,NSDictionary *paths,NSData
|
||||
NSURL*url=[[NSBundle bundleForClass:self.class]URLForResource:@"default" withExtension:@"metallib"];
|
||||
id<MTLLibrary>lib=[d newLibraryWithURL:url error:err];if(!lib){[d release];return nil;}
|
||||
id<MTLCommandQueue>q=[d newCommandQueue];entry=[NSMutableDictionary dictionaryWithDictionary:@{@"device":d,@"library":lib,@"queue":q,@"pipelines":[NSMutableDictionary dictionary]}];
|
||||
for(NSString*fn in @[@"dyUnpremultiply",@"dyWhitesSceneStatistics",@"dyLUTExportKernel",@"dyInputAnalysis",@"dyColorManagement",@"dyToolBlend",@"dyToolSkin",@"dyFilmPoint",@"dyFilmNoise",@"dyFilmSparseBlur",@"dyFilmBloomEdges",@"dyFilmMix",@"dyFilmPrint"]){id<MTLFunction>f=[lib newFunctionWithName:fn];if(!f){fail(err,[fn stringByAppendingString:@" 缺失"]);[lib release];[q release];[d release];return nil;}uint64_t pipelineSpan=DYBetaSpanBegin(@"gpu_pipeline",@{@"pipeline":fn,@"gpu":d.name?:@"unknown"});id<MTLComputePipelineState>p=[d newComputePipelineStateWithFunction:f error:err];DYBetaSpanEnd(pipelineSpan,@{@"status":p?@"passed":@"failed"});[f release];if(!p){[lib release];[q release];[d release];return nil;}entry[fn]=p;[p release];}
|
||||
for(NSString*fn in @[@"dyUnpremultiply",@"dyWhitesSceneStatistics",@"dyLUTExportKernel",@"dyInputAnalysis",@"dyScopeSample",@"dyColorManagement",@"dyToolBlend",@"dyToolSkin",@"dyFilmPoint",@"dyFilmNoise",@"dyFilmSparseBlur",@"dyFilmBloomEdges",@"dyFilmMix",@"dyFilmPrint"]){id<MTLFunction>f=[lib newFunctionWithName:fn];if(!f){fail(err,[fn stringByAppendingString:@" 缺失"]);[lib release];[q release];[d release];return nil;}uint64_t pipelineSpan=DYBetaSpanBegin(@"gpu_pipeline",@{@"pipeline":fn,@"gpu":d.name?:@"unknown"});id<MTLComputePipelineState>p=[d newComputePipelineStateWithFunction:f error:err];DYBetaSpanEnd(pipelineSpan,@{@"status":p?@"passed":@"failed"});[f release];if(!p){[lib release];[q release];[d release];return nil;}entry[fn]=p;[p release];}
|
||||
float identity[32];for(int z=0;z<2;z++)for(int y=0;y<2;y++)for(int x=0;x<2;x++){int i=((z*2+y)*2+x)*4;identity[i]=x;identity[i+1]=y;identity[i+2]=z;identity[i+3]=1;}id<MTLTexture>neutral=texture3D(d,identity,2);if(!neutral){fail(err,@"无法分配中性 LUT");return nil;}entry[@"identity"]=neutral;
|
||||
// Preparing before the first frame may use registry 0. Reuse those pipelines
|
||||
// when the host subsequently supplies that device's actual registry ID.
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
// Included in DYRenderer's implementation; final destination sampling is kept
|
||||
// separate from the earlier input-analysis thumbnail used by auto-grade/LUTs.
|
||||
- (void)setScopeEnabled:(BOOL)enabled{
|
||||
@synchronized(_previewLock){if(_scopeEnabled==enabled)return;_scopeEnabled=enabled;_scopeGeneration++;[_scopePending release];_scopePending=nil;if(enabled){[_scopePreview release];_scopePreview=nil;[_scopeMetadata release];_scopeMetadata=nil;}}
|
||||
}
|
||||
- (NSData *)scopePreview{@synchronized(_previewLock){return [[_scopePreview retain]autorelease];}}
|
||||
- (NSDictionary *)scopeMetadata{@synchronized(_previewLock){return [[_scopeMetadata retain]autorelease];}}
|
||||
- (void)captureScopeTile:(FxImageTile *)tile atTime:(CMTime)time{
|
||||
NSUInteger generation;@synchronized(_previewLock){if(!_scopeEnabled||_exporting||!tile)return;generation=_scopeGeneration;}
|
||||
@autoreleasepool{@try{
|
||||
NSDictionary *entry=nil,*context=nil;@synchronized(self){entry=[[self device:tile.deviceRegistryID error:nil]retain];context=[_colorContext copy];}
|
||||
id<MTLDevice>device=entry[@"device"];id<MTLTexture>texture=[tile metalTextureForDevice:device];
|
||||
if(!entry||!texture||!texture.width||!texture.height||texture.framebufferOnly){[entry release];[context release];return;}
|
||||
id<MTLBuffer>buffer=[device newBufferWithLength:dyscope::Width*dyscope::Height*sizeof(dyscope::RGBA) options:MTLResourceStorageModeShared];
|
||||
id<MTLCommandBuffer>command=[entry[@"queue"]commandBuffer];id<MTLComputeCommandEncoder>encoder=[command computeCommandEncoder];
|
||||
if(!buffer||!encoder){[buffer release];[entry release];[context release];return;}
|
||||
uint32_t flip=tile.imageOrigin==kFxImageOrigin_BOTTOM_LEFT;[encoder setComputePipelineState:entry[@"dyScopeSample"]];[encoder setTexture:texture atIndex:0];[encoder setBuffer:buffer offset:0 atIndex:0];[encoder setBytes:&flip length:sizeof(flip) atIndex:1];
|
||||
[encoder dispatchThreads:MTLSizeMake(dyscope::Width,dyscope::Height,1) threadsPerThreadgroup:MTLSizeMake(8,8,1)];[encoder endEncoding];[command commit];
|
||||
// The host may recycle its destination as soon as render returns. Complete
|
||||
// only this 320x180 readback while that ownership is still guaranteed.
|
||||
// CPU profile conversion, plotting and UI notification do not block render.
|
||||
[command waitUntilCompleted];
|
||||
if(command.status!=MTLCommandBufferStatusCompleted){[buffer release];[entry release];[context release];return;}
|
||||
DYScopeSample *sample=[DYScopeSample new];sample.pixels=[NSData dataWithBytes:buffer.contents length:buffer.length];sample.generation=generation;
|
||||
CGColorSpaceRef sourceSpace=DYManagedTileSpace(tile,[context[@"primaries"]integerValue]);sample.space=sourceSpace;if(sourceSpace)CGColorSpaceRelease(sourceSpace);
|
||||
FxRect bounds=tile.tilePixelBounds,image=tile.imagePixelBounds;BOOL whole=bounds.left==image.left&&bounds.right==image.right&&bounds.top==image.top&&bounds.bottom==image.bottom;
|
||||
sample.metadata=@{@"time":@(CMTimeGetSeconds(time)),@"timeValue":@(time.value),@"timeScale":@(time.timescale),@"source":context[@"destination"]?:@"宿主 RGB",@"wholeImage":@(whole),@"region":whole?@"整帧取样":@"仅当前宿主输出分块",@"width":@(dyscope::Width),@"height":@(dyscope::Height)};
|
||||
[buffer release];[entry release];[context release];
|
||||
BOOL start=NO;@synchronized(_previewLock){if(_scopeEnabled&&generation==_scopeGeneration){[_scopePending release];_scopePending=[sample retain];if(!_scopeWorkerRunning){_scopeWorkerRunning=YES;start=YES;}}}[sample release];
|
||||
if(start)dispatch_async(_scopeQueue,^{[self processPendingScopeSamples];});
|
||||
}@catch(NSException *exception){/* Scope diagnostics must never fail rendering. */}}
|
||||
}
|
||||
- (void)processPendingScopeSamples{
|
||||
for(;;){@autoreleasepool{
|
||||
DYScopeSample *sample=nil;@synchronized(_previewLock){sample=_scopePending;_scopePending=nil;if(!sample){_scopeWorkerRunning=NO;return;}}
|
||||
const auto *raw=(const dyscope::RGBA*)sample.pixels.bytes;size_t count=sample.pixels.length/sizeof(dyscope::RGBA);std::vector<DYCompositeRGBA> pixels(count);uint64_t invalid=0;
|
||||
for(size_t i=0;i<count;i++){
|
||||
const auto&p=raw[i];BOOL finite=std::isfinite(p.r)&&std::isfinite(p.g)&&std::isfinite(p.b)&&std::isfinite(p.a);
|
||||
if(!finite){invalid++;pixels[i]={0,0,0,0};continue;}
|
||||
if(p.a<=1e-6f){pixels[i]={0,0,0,0};continue;}
|
||||
pixels[i]={p.r/p.a,p.g/p.a,p.b/p.a,p.a};
|
||||
if(!(std::isfinite(pixels[i].r)&&std::isfinite(pixels[i].g)&&std::isfinite(pixels[i].b))){invalid++;pixels[i]={0,0,0,0};}
|
||||
}
|
||||
NSError *error=nil;BOOL converted=NO;CGColorSpaceRef target=CGColorSpaceCreateWithName(kCGColorSpaceExtendedSRGB);
|
||||
if(sample.space&&target){
|
||||
if(!_scopeProfile||!CFEqual(_scopeProfile.source,sample.space)){[_scopeProfile release];_scopeProfile=[[DYColorProfile alloc]initWithSource:sample.space target:target error:&error];}
|
||||
if(_scopeProfile){auto result=[_scopeProfile convertPixels:pixels alpha:dycm::Alpha::Straight budget:32ull*1024*1024 cancelled:nullptr error:&error];if(result){pixels=std::move(*result);converted=YES;}}
|
||||
}if(target)CGColorSpaceRelease(target);
|
||||
std::vector<dyscope::RGBA> reference;reference.reserve(pixels.size());for(const auto&p:pixels)reference.push_back({p.r,p.g,p.b,p.a});
|
||||
auto measurements=dyscope::measure(reference);measurements.nonfinite+=invalid;
|
||||
auto wave=dyscope::densityImage(measurements.wave,false),parade=dyscope::densityImage(measurements.parade,true);
|
||||
NSMutableDictionary *metadata=[[sample.metadata mutableCopy]autorelease];
|
||||
metadata[@"domain"]=converted?@"sRGB 显示参考":@"宿主 RGB(未换算)";
|
||||
metadata[@"note"]=converted?@"最终输出 · ICC 转扩展 sRGB · R′G′B′ 百分比;非 HDR / IRE 精密测量":(error?[NSString stringWithFormat:@"RGB 原值参考 · %@;波形按 709 权重参考,非 IRE",error.localizedDescription]:@"最终输出 · 空间未知;RGB 原值 / 709 权重波形参考,非显示 / HDR / IRE 测量");
|
||||
metadata[@"converted"]=@(converted);metadata[@"minimum"]=@(measurements.minimum);metadata[@"maximum"]=@(measurements.maximum);metadata[@"valid"]=@(measurements.valid);metadata[@"transparent"]=@(measurements.transparent>=invalid?measurements.transparent-invalid:0);metadata[@"nonfinite"]=@(measurements.nonfinite);metadata[@"below"]=@(measurements.below);metadata[@"above"]=@(measurements.above);
|
||||
metadata[@"waveform"]=[NSData dataWithBytes:wave.data() length:wave.size()];metadata[@"parade"]=[NSData dataWithBytes:parade.data() length:parade.size()];metadata[@"histogram"]=[NSData dataWithBytes:measurements.histogram.data() length:sizeof(measurements.histogram)];
|
||||
BOOL publish=NO;@synchronized(_previewLock){if(_scopeEnabled&&sample.generation==_scopeGeneration){[_scopePreview release];_scopePreview=[[NSData alloc]initWithBytes:pixels.data() length:pixels.size()*sizeof(DYCompositeRGBA)];[_scopeMetadata release];_scopeMetadata=[metadata copy];publish=YES;}}
|
||||
NSUInteger generation=sample.generation;[sample release];
|
||||
if(publish)dispatch_async(dispatch_get_main_queue(),^{BOOL active=NO;@synchronized(_previewLock){active=_scopeEnabled&&generation==_scopeGeneration;}if(active)[NSNotificationCenter.defaultCenter postNotificationName:@"DYScopeDidChange" object:self];});
|
||||
}}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
#pragma once
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <span>
|
||||
#include <vector>
|
||||
|
||||
// Display-reference measurements only. Values remain unclipped; the plot
|
||||
// covers -10%...110% and explicitly counts samples beyond that range.
|
||||
namespace dyscope {
|
||||
inline constexpr unsigned Width=320,Height=180,Bins=256;
|
||||
inline constexpr float Low=-.1f,High=1.1f;
|
||||
struct RGBA { float r,g,b,a; };
|
||||
struct Result {
|
||||
std::vector<uint32_t> wave=std::vector<uint32_t>(Width*Bins),parade=std::vector<uint32_t>(3*Width*Bins);
|
||||
std::array<uint32_t,4*Bins> histogram{};
|
||||
uint64_t valid=0,transparent=0,nonfinite=0,below=0,above=0;
|
||||
float minimum=0,maximum=0;
|
||||
};
|
||||
inline unsigned bin(float v){if(!(v>Low))return 0;if(v>=High)return Bins-1;return unsigned(std::clamp(std::lround((v-Low)/(High-Low)*(Bins-1)),0l,long(Bins-1)));}
|
||||
inline Result measure(std::span<const RGBA> pixels,unsigned width=Width,unsigned height=Height){
|
||||
Result r;if(!width||!height||pixels.size()!=size_t(width)*height)return r;bool first=true;
|
||||
for(unsigned y=0;y<height;y++)for(unsigned x=0;x<width;x++){
|
||||
const auto&p=pixels[size_t(y)*width+x];
|
||||
if(!(std::isfinite(p.r)&&std::isfinite(p.g)&&std::isfinite(p.b)&&std::isfinite(p.a))){r.nonfinite++;continue;}
|
||||
if(p.a<=1e-6f){r.transparent++;continue;}
|
||||
float values[4]={.2126f*p.r+.7152f*p.g+.0722f*p.b,p.r,p.g,p.b};unsigned column=std::min(Width-1,unsigned(uint64_t(x)*Width/width));
|
||||
for(unsigned c=0;c<4;c++){
|
||||
float v=values[c];unsigned b=bin(v);r.histogram[c*Bins+b]++;
|
||||
if(!c)r.wave[(Bins-1-b)*Width+column]++;
|
||||
else r.parade[(Bins-1-b)*(3*Width)+(c-1)*Width+column]++;
|
||||
}
|
||||
float lo=std::min({p.r,p.g,p.b}),hi=std::max({p.r,p.g,p.b});if(first){r.minimum=lo;r.maximum=hi;first=false;}else{r.minimum=std::min(r.minimum,lo);r.maximum=std::max(r.maximum,hi);}
|
||||
r.below+=lo<Low;r.above+=hi>High;r.valid++;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
inline std::vector<uint8_t> densityImage(std::span<const uint32_t> counts,bool parade){
|
||||
std::vector<uint8_t> out(counts.size()*4);uint32_t maximum=0;for(uint32_t n:counts)maximum=std::max(maximum,n);
|
||||
float divisor=std::log1p(float(maximum));unsigned width=parade?3*Width:Width;
|
||||
for(size_t i=0;i<counts.size();i++){
|
||||
float intensity=counts[i]&&divisor>0?std::pow(std::log1p(float(counts[i]))/divisor,.65f):0;
|
||||
unsigned channel=parade?unsigned(i%width)/Width:3;uint8_t v=uint8_t(std::lround(intensity*255));
|
||||
out[i*4]=channel==0||channel==3?v:uint8_t(v*.14f);out[i*4+1]=channel==1||channel==3?v:uint8_t(v*.14f);out[i*4+2]=channel==2||channel==3?v:uint8_t(v*.14f);out[i*4+3]=255;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreGraphics/CoreGraphics.h>
|
||||
@interface DYScopeSample : NSObject
|
||||
@property(nonatomic,copy) NSData *pixels;
|
||||
@property(nonatomic,copy) NSDictionary *metadata;
|
||||
@property(nonatomic) NSUInteger generation;
|
||||
@property(nonatomic) CGColorSpaceRef space;
|
||||
@end
|
||||
@@ -0,0 +1,5 @@
|
||||
#import "DYScopeSample.h"
|
||||
@implementation DYScopeSample
|
||||
- (void)setSpace:(CGColorSpaceRef)space{if(_space==space)return;if(_space)CGColorSpaceRelease(_space);_space=space?CGColorSpaceRetain(space):nil;}
|
||||
- (void)dealloc{[_pixels release];[_metadata release];if(_space)CGColorSpaceRelease(_space);[super dealloc];}
|
||||
@end
|
||||
+4
-1
@@ -6,7 +6,10 @@ FOUNDATION_EXPORT NSInteger DYThemeIndex(void);
|
||||
FOUNDATION_EXPORT void DYSetThemeIndex(NSInteger index);
|
||||
FOUNDATION_EXPORT NSDictionary<NSString *, NSColor *> *DYThemePalette(void);
|
||||
FOUNDATION_EXPORT NSColor *DYThemeColor(NSString *role);
|
||||
FOUNDATION_EXPORT NSColor *DYThemeSwatch(NSInteger index);
|
||||
FOUNDATION_EXPORT BOOL DYThemeIsLight(void);
|
||||
FOUNDATION_EXPORT BOOL DYThemeUsesRelief(void);
|
||||
// Opaque relief with a directional reflective rim; native controls retain their actions.
|
||||
FOUNDATION_EXPORT void DYDrawSoftControl(NSRect rect, CGFloat radius, BOOL recessed, BOOL emphasized, BOOL pressed);
|
||||
|
||||
// Shared AppKit controls keep native actions, focus, and accessibility.
|
||||
FOUNDATION_EXPORT NSShadow *DYThemeTextShadow(void);
|
||||
|
||||
+84
-39
@@ -11,7 +11,7 @@ static NSColor *rgb(double r,double g,double b){return [NSColor colorWithCalibra
|
||||
- (instancetype)init {
|
||||
if((self=[super init])) {
|
||||
_defaults=[[NSUserDefaults alloc]initWithSuiteName:preferenceDomain];
|
||||
[_defaults registerDefaults:@{@"themeIndex":@6}];
|
||||
[_defaults registerDefaults:@{@"themeIndex":@7}];
|
||||
[[NSDistributedNotificationCenter defaultCenter]addObserver:self selector:@selector(externalChange:) name:distributedChange object:preferenceDomain suspensionBehavior:NSNotificationSuspensionBehaviorDeliverImmediately];
|
||||
}
|
||||
return self;
|
||||
@@ -23,73 +23,118 @@ static NSColor *rgb(double r,double g,double b){return [NSColor colorWithCalibra
|
||||
}
|
||||
@end
|
||||
static DYThemeStore *store(void){static DYThemeStore *s;static dispatch_once_t once;dispatch_once(&once,^{s=[DYThemeStore new];});return s;}
|
||||
NSArray<NSString *> *DYThemeNames(void){return @[@"深空灰",@"冰川蓝",@"薰衣草紫",@"翡翠绿",@"琥珀橙",@"黑金渐变",@"霓虹炫彩"];}
|
||||
NSInteger DYThemeIndex(void){NSInteger i=[store().defaults integerForKey:@"themeIndex"];return i>=0&&i<7?i:6;}
|
||||
static const double paletteRGB[7][17][3]={
|
||||
{{0.11,0.12,0.14},{0.075,0.08,0.095},{0.17,0.18,0.21},{0.12,0.13,0.15},{0.27,0.29,0.33},{0.2,0.22,0.25},{0.36,0.39,0.44},{0.25,0.28,0.32},{0.21,0.23,0.26},{0.15,0.17,0.2},{0.78,0.83,0.9},{0.55,0.61,0.7},{1.0,1.0,1.0},{0.78,0.82,0.88},{0.96,0.97,0.98},{0.86,0.89,0.92},{0.67,0.72,0.77}},
|
||||
{{0.031,0.086,0.148},{0.025,0.075,0.13},{0.07,0.155,0.235},{0.045,0.12,0.19},{0.115,0.22,0.33},{0.07,0.15,0.24},{0.15,0.33,0.5},{0.08,0.24,0.36},{0.23,0.32,0.41},{0.18,0.26,0.35},{0.38,0.76,1.0},{0.23,0.64,0.97},{0.96,0.98,1.0},{0.62,0.7,0.76},{0.88,0.96,1.0},{0.82,0.9,0.96},{0.58,0.7,0.78}},
|
||||
{{0.11,0.09,0.17},{0.07,0.06,0.12},{0.18,0.14,0.28},{0.13,0.1,0.21},{0.27,0.22,0.42},{0.2,0.16,0.31},{0.43,0.34,0.68},{0.31,0.23,0.52},{0.22,0.18,0.31},{0.15,0.12,0.23},{0.78,0.71,1.0},{0.5,0.42,0.93},{0.95,0.9,1.0},{0.63,0.5,0.95},{0.98,0.95,1.0},{0.9,0.86,0.97},{0.7,0.66,0.82}},
|
||||
{{0.08,0.17,0.1},{0.05,0.12,0.07},{0.12,0.27,0.15},{0.09,0.2,0.11},{0.16,0.35,0.2},{0.12,0.27,0.15},{0.21,0.57,0.31},{0.14,0.4,0.21},{0.14,0.27,0.16},{0.1,0.2,0.11},{0.54,0.96,0.64},{0.22,0.75,0.35},{0.91,1.0,0.93},{0.28,0.8,0.42},{0.95,1.0,0.96},{0.86,0.96,0.88},{0.66,0.8,0.68}},
|
||||
{{0.23,0.15,0.08},{0.16,0.1,0.05},{0.35,0.22,0.11},{0.26,0.16,0.08},{0.45,0.28,0.14},{0.36,0.22,0.1},{0.72,0.44,0.18},{0.56,0.32,0.12},{0.29,0.18,0.09},{0.2,0.12,0.06},{0.98,0.67,0.31},{0.86,0.47,0.17},{1.0,0.86,0.57},{0.93,0.59,0.22},{1.0,0.96,0.9},{0.97,0.9,0.82},{0.8,0.7,0.58}},
|
||||
{{.065,.060,.050},{.012,.012,.012},{.12,.105,.075},{.045,.042,.035},{.105,.092,.065},{.15,.125,.075},{.17,.14,.085},{.075,.065,.045},{.23,.20,.14},{.10,.09,.065},{.98,.82,.42},{.72,.51,.18},{1,.90,.65},{.88,.74,.43},{1,.86,.48},{.96,.82,.49},{.79,.70,.48}},
|
||||
{{.15,.04,.24},{.075,.018,.14},{.20,.055,.29},{.13,.025,.23},{.14,.045,.25},{.18,.07,.30},{.23,.07,.34},{.09,.065,.25},{.27,.17,.39},{.13,.07,.23},{.90,.20,.83},{.02,.79,.94},{.93,.97,1},{.55,.80,.90},{.95,.97,1},{.86,.91,.96},{.72,.78,.85}}
|
||||
// Appearance IDs 7/8 preserve the approved light/dark preferences. Legacy
|
||||
// colorful IDs are intentionally unavailable and fall back to dark on read.
|
||||
NSArray<NSString *> *DYThemeNames(void){return @[@"浅色",@"深色"];}
|
||||
NSInteger DYThemeIndex(void){NSInteger i=[store().defaults integerForKey:@"themeIndex"];return i==7||i==8?i:8;}
|
||||
void DYSetThemeIndex(NSInteger index){if(index!=7&&index!=8)return;[store().defaults setInteger:index forKey:@"themeIndex"];[store().defaults synchronize];[[NSNotificationCenter defaultCenter]postNotificationName:DYThemeDidChange object:nil];[[NSDistributedNotificationCenter defaultCenter]postNotificationName:distributedChange object:preferenceDomain userInfo:nil deliverImmediately:YES];}
|
||||
static const double paletteRGB[2][17][3]={
|
||||
{{.89,.94,.97},{.84,.91,.95},{.94,.98,1},{.90,.95,.98},{.83,.90,.95},{.91,.96,.99},{.95,.985,1},{.83,.91,.96},{.74,.84,.90},{.88,.94,.97},{.52,.61,.89},{.29,.74,.80},{.96,.99,1},{.40,.55,.65},{.12,.28,.34},{.17,.32,.39},{.20,.33,.41}},
|
||||
{{.10,.105,.12},{.055,.056,.065},{.17,.18,.20},{.115,.119,.135},{.065,.073,.09},{.13,.14,.16},{.18,.19,.22},{.105,.11,.13},{.25,.27,.31},{.10,.11,.13},{.62,.55,.91},{.25,.75,.82},{.88,.94,.98},{.55,.64,.72},{.94,.96,.99},{.85,.89,.94},{.65,.70,.77}}
|
||||
};
|
||||
NSColor *DYThemeSwatch(NSInteger index){static const double values[7][3]={{.30,.33,.38},{.28,.72,1},{.58,.52,1},{.30,.86,.52},{1,.61,.28},{.96,.77,.36},{.65,.38,1}};index=MAX(0,MIN(6,index));return rgb(values[index][0],values[index][1],values[index][2]);}
|
||||
void DYSetThemeIndex(NSInteger index){if(index<0||index>6)return;[store().defaults setInteger:index forKey:@"themeIndex"];[store().defaults synchronize];[[NSNotificationCenter defaultCenter]postNotificationName:DYThemeDidChange object:nil];[[NSDistributedNotificationCenter defaultCenter]postNotificationName:distributedChange object:preferenceDomain userInfo:nil deliverImmediately:YES];}
|
||||
NSDictionary<NSString *,NSColor *> *DYThemePalette(void){
|
||||
static NSArray *palettes;static dispatch_once_t once;dispatch_once(&once,^{
|
||||
NSMutableArray *all=[NSMutableArray array];
|
||||
for(NSInteger index=0;index<7;index++){
|
||||
for(NSInteger index=0;index<2;index++){
|
||||
const double (*p)[3]=paletteRGB[index];NSMutableDictionary *d=[NSMutableDictionary dictionary];
|
||||
for(int i=0;i<17;i++)d[[NSString stringWithFormat:@"slot%d",i]]=rgb(p[i][0],p[i][1],p[i][2]);
|
||||
NSColor *accent=index==0?rgb(.72,.77,.84):index==1?rgb(.22,.67,1):index==6?rgb(.08,.79,.94):DYThemeSwatch(index);
|
||||
[d addEntriesFromDictionary:@{@"background":d[@"slot1"],@"card":d[@"slot3"],@"border":[accent colorWithAlphaComponent:.38],@"text":d[@"slot14"],@"secondary":d[@"slot16"],@"accent":accent,@"field":d[@"slot4"],@"headerTop":d[@"slot6"],@"headerBottom":d[@"slot7"],@"track":d[@"slot8"],@"activeTop":d[@"slot10"],@"activeBottom":d[@"slot11"],@"knob":d[@"slot12"]}];d[@"backgroundEnd"]=index==5?rgb(.085,.078,.060):d[@"background"];d[@"cardEnd"]=index==5?rgb(.085,.075,.052):d[@"card"];if(index==6){d[@"backgroundEnd"]=rgb(.01,.16,.20);d[@"cardEnd"]=rgb(.035,.12,.25);d[@"border"]=[rgb(.47,.37,.88)colorWithAlphaComponent:.55];} [all addObject:[[d copy]autorelease]];
|
||||
NSColor *accent=index==0?rgb(.20,.35,.44):rgb(.62,.80,.88);
|
||||
[d addEntriesFromDictionary:@{@"background":d[@"slot1"],@"card":d[@"slot3"],@"text":d[@"slot14"],@"secondary":d[@"slot16"],@"accent":accent,@"field":d[@"slot4"],@"headerTop":d[@"slot6"],@"headerBottom":d[@"slot7"],@"track":d[@"slot8"],@"activeTop":d[@"slot10"],@"activeBottom":d[@"slot11"],@"knob":d[@"slot12"]}];
|
||||
d[@"backgroundEnd"]=index==0?rgb(.90,.95,.98):rgb(.085,.09,.10);
|
||||
d[@"cardEnd"]=index==0?rgb(.86,.93,.97):rgb(.15,.16,.18);
|
||||
d[@"border"]=index==0?rgb(.55,.70,.79):rgb(.39,.56,.65);
|
||||
[all addObject:[[d copy]autorelease]];
|
||||
}palettes=[all copy];
|
||||
});return palettes[DYThemeIndex()];
|
||||
});return palettes[DYThemeIndex()==7?0:1];
|
||||
}
|
||||
NSColor *DYThemeColor(NSString *role){
|
||||
static NSDictionary *colors;static dispatch_once_t once;dispatch_once(&once,^{
|
||||
NSMutableDictionary *all=[NSMutableDictionary dictionary];for(NSString *key in DYThemePalette())all[key]=[NSColor colorWithName:[@"Dayu." stringByAppendingString:key] dynamicProvider:^NSColor *(NSAppearance *appearance){return DYThemePalette()[key];}];colors=[all copy];
|
||||
});return colors[role]?:NSColor.whiteColor;
|
||||
}
|
||||
|
||||
NSShadow *DYThemeTextShadow(void) {
|
||||
NSWorkspace *workspace=NSWorkspace.sharedWorkspace;
|
||||
if(DYThemeIndex()!=5||workspace.accessibilityDisplayShouldIncreaseContrast||workspace.accessibilityDisplayShouldReduceTransparency)return nil;
|
||||
NSShadow *shadow=[[[NSShadow alloc]init]autorelease];shadow.shadowColor=[DYThemeColor(@"accent")colorWithAlphaComponent:.30];shadow.shadowBlurRadius=1.8;shadow.shadowOffset=NSZeroSize;return shadow;
|
||||
}
|
||||
NSDictionary *DYThemeTextAttributes(NSFont *font,NSColor *color) {
|
||||
NSMutableDictionary *attributes=[NSMutableDictionary dictionaryWithDictionary:@{NSFontAttributeName:font,NSForegroundColorAttributeName:color}];
|
||||
NSShadow *shadow=DYThemeTextShadow();if(shadow)attributes[NSShadowAttributeName]=shadow;return attributes;
|
||||
}
|
||||
NSShadow *DYThemeTextShadow(void) {return nil;}
|
||||
NSDictionary *DYThemeTextAttributes(NSFont *font,NSColor *color) {return @{NSFontAttributeName:font,NSForegroundColorAttributeName:color};}
|
||||
void DYDrawThemeSurface(NSBezierPath *path,BOOL card) {
|
||||
NSDictionary *palette=DYThemePalette();NSString *role=card?@"card":@"background";
|
||||
if(DYThemeIndex()==6&&!card){NSGradient *g=[[[NSGradient alloc]initWithColors:@[palette[role],rgb(.035,.035,.21),palette[@"backgroundEnd"]]]autorelease];[g drawInBezierPath:path angle:25];}
|
||||
else if(DYThemeIndex()>=5){NSGradient *gradient=[[[NSGradient alloc]initWithStartingColor:palette[role] endingColor:palette[card?@"cardEnd":@"backgroundEnd"]]autorelease];[gradient drawInBezierPath:path angle:35];}
|
||||
else {[palette[role]setFill];[path fill];}
|
||||
NSDictionary *palette=DYThemePalette();NSGradient *g=[[[NSGradient alloc]initWithStartingColor:palette[card?@"card":@"background"] endingColor:palette[card?@"cardEnd":@"backgroundEnd"]]autorelease];[g drawInBezierPath:path angle:35];
|
||||
}
|
||||
BOOL DYThemeIsLight(void) {return DYThemeIndex()==7;}
|
||||
BOOL DYThemeUsesRelief(void) {return DYThemeIndex()==7||DYThemeIndex()==8;}
|
||||
// Draw the rim as a filled ring, so the highlight follows the entire rounded
|
||||
// outline rather than glowing around text or requiring additional view layers.
|
||||
static void softGradient(NSBezierPath *path,NSArray *colors) {
|
||||
NSRect r=path.bounds;BOOL flipped=NSGraphicsContext.currentContext.isFlipped;
|
||||
NSGradient *gradient=[[[NSGradient alloc]initWithColors:colors]autorelease];
|
||||
[NSGraphicsContext saveGraphicsState];[path addClip];
|
||||
[gradient drawFromPoint:NSMakePoint(NSMinX(r),flipped?NSMinY(r):NSMaxY(r)) toPoint:NSMakePoint(NSMaxX(r),flipped?NSMaxY(r):NSMinY(r)) options:NSGradientDrawsBeforeStartingLocation|NSGradientDrawsAfterEndingLocation];
|
||||
[NSGraphicsContext restoreGraphicsState];
|
||||
}
|
||||
void DYDrawSoftControl(NSRect rect,CGFloat radius,BOOL recessed,BOOL emphasized,BOOL pressed) {
|
||||
BOOL strong=NSWorkspace.sharedWorkspace.accessibilityDisplayShouldIncreaseContrast;
|
||||
BOOL quiet=strong||NSWorkspace.sharedWorkspace.accessibilityDisplayShouldReduceTransparency;
|
||||
if(DYThemeIndex()==8){
|
||||
NSBezierPath *shape=[NSBezierPath bezierPathWithRoundedRect:rect xRadius:radius yRadius:radius];
|
||||
NSColor *top=recessed||pressed?rgb(.045,.05,.065):rgb(.17,.18,.205);
|
||||
NSColor *bottom=recessed||pressed?rgb(.095,.11,.13):rgb(.10,.105,.12);
|
||||
if(emphasized){top=pressed?rgb(.25,.22,.43):rgb(.35,.27,.62);bottom=pressed?rgb(.10,.29,.35):rgb(.12,.40,.48);}
|
||||
if(!quiet&&!recessed&&!pressed){
|
||||
[NSGraphicsContext saveGraphicsState];NSShadow *glow=[[[NSShadow alloc]init]autorelease];
|
||||
glow.shadowColor=[rgb(.36,.72,.83)colorWithAlphaComponent:emphasized?.42:.21];glow.shadowOffset=NSZeroSize;glow.shadowBlurRadius=emphasized?4:3;[glow set];[top setFill];[shape fill];[NSGraphicsContext restoreGraphicsState];
|
||||
}
|
||||
softGradient(shape,@[top,bottom]);
|
||||
NSBezierPath *rim=[NSBezierPath bezierPathWithRoundedRect:rect xRadius:radius yRadius:radius];CGFloat width=strong?1.3:1;
|
||||
[rim appendBezierPath:[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(rect,width,width) xRadius:MAX(0,radius-width) yRadius:MAX(0,radius-width)]];rim.windingRule=NSWindingRuleEvenOdd;
|
||||
if(strong){[rgb(.65,.79,.88)setFill];[rim fill];}
|
||||
else softGradient(rim,recessed||pressed?@[rgb(.15,.22,.29),rgb(.41,.59,.69)]:@[rgb(.70,.82,.91),rgb(.28,.40,.51),rgb(.16,.24,.29),rgb(.38,.53,.61)]);
|
||||
return;
|
||||
}
|
||||
NSBezierPath *shape=[NSBezierPath bezierPathWithRoundedRect:rect xRadius:radius yRadius:radius];
|
||||
NSColor *top=recessed||pressed?rgb(.79,.87,.93):rgb(.96,.985,1);
|
||||
NSColor *bottom=recessed||pressed?rgb(.91,.96,.99):rgb(.85,.92,.97);
|
||||
if(emphasized){top=pressed?rgb(.66,.73,.90):rgb(.76,.77,.96);bottom=pressed?rgb(.50,.77,.83):rgb(.55,.85,.90);}
|
||||
if(!quiet&&!recessed&&!pressed){
|
||||
BOOL flipped=NSGraphicsContext.currentContext.isFlipped;
|
||||
for(int light=0;light<2;light++){
|
||||
[NSGraphicsContext saveGraphicsState];NSShadow *shadow=[[[NSShadow alloc]init]autorelease];
|
||||
shadow.shadowColor=light?[NSColor colorWithWhite:1 alpha:.90]:[rgb(.37,.55,.66)colorWithAlphaComponent:.28];
|
||||
CGFloat d=light?-1.5:2;shadow.shadowOffset=NSMakeSize(d,flipped?d:-d);shadow.shadowBlurRadius=light?2.5:3.5;[shadow set];[top setFill];[shape fill];[NSGraphicsContext restoreGraphicsState];
|
||||
}
|
||||
}
|
||||
softGradient(shape,@[top,bottom]);
|
||||
NSBezierPath *rim=[NSBezierPath bezierPathWithRoundedRect:rect xRadius:radius yRadius:radius];
|
||||
CGFloat width=strong?1.3:1;[rim appendBezierPath:[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(rect,width,width) xRadius:MAX(0,radius-width) yRadius:MAX(0,radius-width)]];rim.windingRule=NSWindingRuleEvenOdd;
|
||||
if(strong){[rgb(.33,.49,.60)setFill];[rim fill];}
|
||||
else softGradient(rim,recessed||pressed?@[rgb(.56,.71,.81),rgb(.98,1,1)]:@[NSColor.whiteColor,rgb(.80,.89,.95),rgb(.55,.72,.83),rgb(.96,.99,1)]);
|
||||
// The inner hairline gives a visible lower edge even with reduced effects.
|
||||
NSBezierPath *inner=[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(rect,1.5,1.5) xRadius:MAX(0,radius-1.5) yRadius:MAX(0,radius-1.5)];
|
||||
[[rgb(.40,.60,.73)colorWithAlphaComponent:strong?.35:.12]setStroke];inner.lineWidth=.5;[inner stroke];
|
||||
}
|
||||
@implementation DYThemeLabel
|
||||
- (void)drawRect:(NSRect)rect {[NSGraphicsContext saveGraphicsState];[DYThemeTextShadow()set];[super drawRect:rect];[NSGraphicsContext restoreGraphicsState];}
|
||||
- (void)drawRect:(NSRect)rect {[super drawRect:rect];}
|
||||
@end
|
||||
@interface DYThemeButtonCell : NSButtonCell @end
|
||||
@implementation DYThemeButtonCell
|
||||
- (NSRect)drawTitle:(NSAttributedString*)title withFrame:(NSRect)frame inView:(NSView*)view {
|
||||
if(DYThemeIndex()<5)return [super drawTitle:title withFrame:frame inView:view];
|
||||
NSMutableAttributedString *gold=[[title mutableCopy]autorelease];[gold addAttributes:DYThemeTextAttributes(self.font?:[NSFont systemFontOfSize:11],[DYThemeColor(@"text")colorWithAlphaComponent:self.enabled?1:.45]) range:NSMakeRange(0,gold.length)];return [super drawTitle:gold withFrame:frame inView:view];
|
||||
BOOL selected=[view.identifier isEqual:@"appearanceToggle"]&&self.state==NSControlStateValueOn;
|
||||
NSMutableAttributedString *styled=[[title mutableCopy]autorelease];
|
||||
NSFont *font=selected?[NSFont boldSystemFontOfSize:11]:(self.font?:[NSFont systemFontOfSize:11]);
|
||||
[styled addAttributes:DYThemeTextAttributes(font,[DYThemeColor(@"text")colorWithAlphaComponent:self.enabled?1:.45]) range:NSMakeRange(0,styled.length)];return [super drawTitle:styled withFrame:frame inView:view];
|
||||
}
|
||||
- (void)drawBezelWithFrame:(NSRect)frame inView:(NSView*)view {
|
||||
if(DYThemeIndex()<5||!self.bordered){[super drawBezelWithFrame:frame inView:view];return;}
|
||||
NSBezierPath *path=[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(frame,1,2) xRadius:6 yRadius:6];if(DYThemeIndex()==6&&[view.identifier isEqual:@"primaryAction"]){NSGradient *g=[[[NSGradient alloc]initWithColors:@[DYThemePalette()[@"activeTop"],DYThemePalette()[@"activeBottom"]]]autorelease];[g drawInBezierPath:path angle:0];}else DYDrawThemeSurface(path,YES);[[DYThemeColor(@"accent")colorWithAlphaComponent:self.highlighted?.8:.32]setStroke];path.lineWidth=self.highlighted?1.5:1;[path stroke];
|
||||
if(!self.bordered){[super drawBezelWithFrame:frame inView:view];return;}
|
||||
BOOL selected=[view.identifier isEqual:@"appearanceToggle"]&&self.state==NSControlStateValueOn;
|
||||
DYDrawSoftControl(NSInsetRect(frame,2,3),7,selected,[view.identifier isEqual:@"primaryAction"],self.highlighted);
|
||||
}
|
||||
@end
|
||||
@implementation DYThemeButton
|
||||
+ (Class)cellClass {return DYThemeButtonCell.class;}
|
||||
- (void)drawRect:(NSRect)rect {
|
||||
if([self.identifier isEqual:@"layerAction"])DYDrawSoftControl(NSInsetRect(self.bounds,2,2),6,NO,NO,self.cell.highlighted);
|
||||
[super drawRect:rect];
|
||||
}
|
||||
@end
|
||||
@implementation DYThemePopUpButton
|
||||
- (void)drawRect:(NSRect)rect {
|
||||
if(DYThemeIndex()<5){[super drawRect:rect];return;}
|
||||
NSRect bounds=NSInsetRect(self.bounds,1,2);NSBezierPath *path=[NSBezierPath bezierPathWithRoundedRect:bounds xRadius:6 yRadius:6];DYDrawThemeSurface(path,YES);
|
||||
[[DYThemeColor(@"accent")colorWithAlphaComponent:self.enabled?.38:.18]setStroke];path.lineWidth=1;[path stroke];
|
||||
NSRect bounds=NSInsetRect(self.bounds,2,3);NSBezierPath *path=[NSBezierPath bezierPathWithRoundedRect:bounds xRadius:6 yRadius:6];DYDrawSoftControl(bounds,6,NO,NO,self.cell.highlighted);
|
||||
NSMutableDictionary *attributes=[NSMutableDictionary dictionaryWithDictionary:DYThemeTextAttributes(self.font?:[NSFont systemFontOfSize:11],[DYThemeColor(@"text")colorWithAlphaComponent:self.enabled?1:.45])];NSMutableParagraphStyle *paragraph=[[[NSMutableParagraphStyle alloc]init]autorelease];paragraph.lineBreakMode=NSLineBreakByTruncatingTail;attributes[NSParagraphStyleAttributeName]=paragraph;
|
||||
CGFloat y=NSMidY(self.bounds)-(self.font?:[NSFont systemFontOfSize:11]).pointSize*.62;
|
||||
[(self.pullsDown?[self itemAtIndex:0].title:(self.selectedItem.title?:@""))drawInRect:NSMakeRect(9,y,MAX(0,self.bounds.size.width-29),18) withAttributes:attributes];
|
||||
|
||||
@@ -10,3 +10,25 @@
|
||||
int undo=base->_undoStarts;BOOL update=NO;[osc mouseDownAtPositionX:320 positionY:212.5 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];[osc mouseDraggedAtPositionX:348 positionY:196.75 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];[osc mouseUpAtPositionX:348 positionY:196.75 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];drain();NSDictionary *moved=DYReadTools(base,kCMTimeZero).document[@"baseMasks"][@"hsl"][0];DYMaskParameters p=DYMaskAtTime(moved,kCMTimeZero);run.record(@"native-osc-drag-writes-independent-normalized-geometry",fabs(p.centerX-.55)<1e-5&&fabs(p.centerY-.55)<1e-5,@{@"x":@(p.centerX),@"y":@(p.centerY)});run.record(@"native-osc-drag-commits-one-undo-after-callback",base->_undoStarts==undo+1&&base->_undoStarts==base->_undoEnds);
|
||||
NSDictionary *before=[DYReadTools(base,kCMTimeZero).document copy];[plugin adoptToolCanvasDocument:before];[osc mouseDownAtPositionX:348 positionY:196.75 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];[osc mouseDraggedAtPositionX:370 positionY:180 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];BOOL handled=NO;[osc keyDownAtPositionX:370 positionY:180 keyPressed:27 modifiers:0 forceUpdate:&update didHandle:&handled atTime:kCMTimeZero];drain();run.record(@"native-osc-escape-discards-draft-without-host-edit",[before isEqual:DYReadTools(base,kCMTimeZero).document]&&base->_undoStarts==undo+1);[before release];[osc release];[plugin release];
|
||||
}
|
||||
{
|
||||
DYDiagnosticManager*base=[[[DYDiagnosticManager alloc]init]autorelease];DYCreateParameters(base,&error);DYToolCanvasProbe*host=[[[DYToolCanvasProbe alloc]init]autorelease];host->_base=base;host->_time=kCMTimeZero;
|
||||
NSMutableDictionary*doc=DYMutablePlist(DYReadTools(base,kCMTimeZero).document);NSDictionary*mask=DYNewMask(DYMaskRectangle);doc[@"baseMasks"][@"hsl"]=[NSMutableArray arrayWithObject:mask];DYWriteTools(base,doc,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];
|
||||
auto drain=[](){double end=NSProcessInfo.processInfo.systemUptime+.06;while(NSProcessInfo.processInfo.systemUptime<end)[[NSRunLoop mainRunLoop]runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:.002]];};drain();
|
||||
id<FxOnScreenControl_v4>osc=(id)[[NSClassFromString(@"DYToolOSC")alloc]initWithAPIManager:host];DYDiagnosticTile*overlay=[[[DYDiagnosticTile alloc]initWithDevice:gpu width:640 height:400]autorelease];[osc drawOSCWithWidth:640 height:400 activePart:0 destinationImage:overlay atTime:kCMTimeZero];BOOL update=NO;NSInteger part=0;
|
||||
// Open the curve from the vertical rail, then place its editor across the
|
||||
// mask drag destination. The ongoing mask gesture must retain ownership.
|
||||
id viewer=[(id)osc valueForKey:@"viewerControls"];NSDictionary*curveButton=nil;for(NSDictionary*a in [viewer valueForKey:@"areas"])if([a[@"toolType"]isEqual:@"curve"])curveButton=a;
|
||||
NSRect br=[curveButton[@"rect"]rectValue];double bx=NSMidX(br),by=400-NSMidY(br);[osc hitTestOSCAtMousePositionX:bx mousePositionY:by activePart:&part atTime:kCMTimeZero];[osc mouseDownAtPositionX:bx positionY:by activePart:part modifiers:0 forceUpdate:&update atTime:kCMTimeZero];[osc mouseUpAtPositionX:bx positionY:by activePart:part modifiers:0 forceUpdate:&update atTime:kCMTimeZero];
|
||||
id panel=[[viewer valueForKey:@"panels"]lastObject];[panel setValue:[NSValue valueWithPoint:NSMakePoint(.63,.03)]forKey:@"position"];
|
||||
[osc drawOSCWithWidth:640 height:400 activePart:0 destinationImage:overlay atTime:kCMTimeZero];int undo=base->_undoStarts;
|
||||
[osc hitTestOSCAtMousePositionX:260 mousePositionY:212.5 activePart:&part atTime:kCMTimeZero];[osc mouseDownAtPositionX:260 positionY:212.5 activePart:part modifiers:0 forceUpdate:&update atTime:kCMTimeZero];
|
||||
[osc hitTestOSCAtMousePositionX:450 mousePositionY:200 activePart:&part atTime:kCMTimeZero];BOOL insideViewer=part>=20000;[osc mouseDraggedAtPositionX:450 positionY:200 activePart:part modifiers:0 forceUpdate:&update atTime:kCMTimeZero];[osc mouseUpAtPositionX:450 positionY:200 activePart:part modifiers:0 forceUpdate:&update atTime:kCMTimeZero];drain();
|
||||
DYMaskParameters p=DYMaskAtTime(DYReadTools(base,kCMTimeZero).document[@"baseMasks"][@"hsl"][0],kCMTimeZero);
|
||||
run.record(@"native-osc-mask-gesture-keeps-capture-when-crossing-the-open-viewer-panel",insideViewer&&fabs(p.centerX-(.5+190./560))<1e-5&&fabs(p.centerY-(.5+12.5/315))<1e-5&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
|
||||
BOOL toolbarBounded=YES;for(NSRect view:{NSMakeRect(400,310,480,100),NSMakeRect(0,0,120,80),NSMakeRect(-100,-50,400,300)}){
|
||||
[(id)osc setValue:[NSValue valueWithRect:view]forKey:@"imageRect"];[(id)osc setValue:@2 forKey:@"uiScale"];NSRect visible=NSIntersectionRect(view,NSMakeRect(0,0,640,400));
|
||||
for(NSInteger i=0;i<9;i++)toolbarBounded&=NSContainsRect(visible,[(id)osc toolbarRectForItem:i]);}
|
||||
run.record(@"native-osc-mask-toolbar-stays-inside-small-letterboxed-image",toolbarBounded);
|
||||
[osc release];[plugin release];drain();
|
||||
}
|
||||
@@ -1,6 +1,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)
|
||||
- (DYViewerParameterBridge*)viewerParameterBridge;
|
||||
- (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;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
NSString *_toolSession,*_selectedToolNode,*_selectedToolMask;
|
||||
DYViewerParameterBridge *_viewerParameterBridge;
|
||||
NSTimer *_toolAnalysisTimer;
|
||||
BOOL _toolCaptureEnabled,_toolCanvasHidden,_toolDrawingPen,_toolShowCoverage,_toolCanvasCommitPending;
|
||||
NSMutableDictionary *_toolCanvasDraft,*_toolCanvasOriginal;NSDictionary *_toolCanvasDocument;
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
- (void)initializeToolHost {
|
||||
_viewerParameterBridge=[[DYViewerParameterBridge alloc]initWithAPIManager:_apiManager];
|
||||
_toolCaptureDevices=[NSMutableDictionary new];_toolCanvasDocument=[[[[DYToolDocument alloc]init]autorelease].document copy];_toolSourceTime=kCMTimeInvalid;_toolCanvasEditTime=kCMTimeInvalid;
|
||||
NSNotificationCenter *n=NSNotificationCenter.defaultCenter;[n addObserver:self selector:@selector(toolCanvasSelection:) name:@"DYToolCanvasSelection" object:_apiManager];[n addObserver:self selector:@selector(toolCanvasCommand:) name:@"DYToolCanvasCommand" object:_apiManager];[n addObserver:self selector:@selector(toolTrackRequested:) name:@"DYToolTrack" object:_apiManager];
|
||||
}
|
||||
- (void)tearDownToolHost {
|
||||
[_viewerParameterBridge invalidate];[_viewerParameterBridge release];_viewerParameterBridge=nil;
|
||||
[_toolAnalysisTimer invalidate];[_toolAnalysisTimer release];@synchronized(DYToolCanvasSessions()){if(_toolSession)[DYToolCanvasSessions()removeObjectForKey:_toolSession];}
|
||||
[_toolCanvasDocument release];[_toolSession release];[_selectedToolNode release];[_selectedToolMask release];[_toolCanvasDraft release];[_toolCanvasOriginal release];[_trackingNode release];[_trackingMaskID release];[_trackingFrozenMask release];[_trackingCandidate release];[_trackingSamples release];[_trackingMessage release];[_toolCaptureDevices release];
|
||||
}
|
||||
@@ -28,6 +30,7 @@
|
||||
@synchronized(self){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];++_toolCanvasRevision;_toolCanvasEditTime=kCMTimeInvalid;_toolDragPart=0;_toolCanvasHasHover=NO;[_toolCanvasDraft release];_toolCanvasDraft=nil;[_toolCanvasOriginal release];_toolCanvasOriginal=nil;}[self postToolCanvasStatus:_toolDrawingPen?@"钢笔:点击放点,拖出曲柄;点首节点或完成绘制闭合。":@"已选中本层蒙版"];
|
||||
}
|
||||
- (BOOL)toolCanvasVisible {@synchronized(self){return _selectedToolNode&&_selectedToolMask&&!_toolCanvasHidden;}}
|
||||
- (DYViewerParameterBridge*)viewerParameterBridge{return _viewerParameterBridge;}
|
||||
- (NSDictionary*)toolCanvasMaskAtTime:(CMTime)time {
|
||||
@synchronized(self){if(_toolCanvasHidden||!_selectedToolMask)return nil;NSDictionary *m=_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),@"hover":(_toolDrawingPen&&_toolCanvasHasHover)?@[@(_toolCanvasHoverPoint.x),@(_toolCanvasHoverPoint.y)]:@[],@"coverage":@(_toolShowCoverage)};}
|
||||
}
|
||||
|
||||
+25
-16
@@ -4,28 +4,33 @@
|
||||
@end
|
||||
@implementation DYToolOSC {
|
||||
id<MTLDevice> _device;id<MTLCommandQueue> _queue;CIContext *_context;
|
||||
CGFloat _height,_uiScale;NSInteger _toolbarRows;NSRect _imageRect;NSDictionary *_mask;NSMutableArray *_handles;NSBezierPath *_outline;NSInteger _lastRoute;NSUInteger _drawCount,_hitDiagnostics,_eventDiagnostics;
|
||||
DYViewerControls *_viewerControls;CGFloat _height,_canvasWidth,_uiScale;NSInteger _toolbarRows;NSRect _imageRect;NSDictionary *_mask;NSMutableArray *_handles;NSBezierPath *_outline;NSInteger _lastRoute;NSUInteger _drawCount,_hitDiagnostics,_eventDiagnostics;
|
||||
}
|
||||
- (instancetype)initWithAPIManager:(id<PROAPIAccessing>)manager{if((self=[super init])){_apiManager=manager;_handles=[NSMutableArray new];_lastRoute=-1;_uiScale=1;_toolbarRows=9;os_log(OS_LOG_DEFAULT,"dayu_tool_osc_init");}return self;}
|
||||
- (void)dealloc{[_device release];[_queue release];[_context release];[_mask release];[_handles release];[_outline release];[super dealloc];}
|
||||
- (instancetype)initWithAPIManager:(id<PROAPIAccessing>)manager{if((self=[super init])){_apiManager=manager;_viewerControls=[DYViewerControls new];_handles=[NSMutableArray new];_lastRoute=-1;_uiScale=1;_toolbarRows=9;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];}
|
||||
- (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{
|
||||
float ca=cos(p.angle),sa=sin(p.angle),aspect=p.imageAspect;float px=x*p.width*aspect,py=y*p.height;float u=p.centerX+(px*ca-py*sa)/aspect,v=p.centerY+px*sa+py*ca;return NSMakePoint(_imageRect.origin.x+u*_imageRect.size.width,_imageRect.origin.y+v*_imageRect.size.height);
|
||||
}
|
||||
- (void)addHandle:(NSPoint)p part:(NSInteger)part{[_handles addObject:@{@"point":[NSValue valueWithPoint:p],@"part":@(part)}];}
|
||||
- (NSRect)toolbarRectForItem:(NSInteger)item{CGFloat scale=_uiScale,x=MAX(8*scale,_imageRect.origin.x+12*scale),y=MAX(8*scale,_imageRect.origin.y+12*scale);NSInteger rows=MAX(1,_toolbarRows);return NSMakeRect(x+(item/rows)*38*scale,y+(item%rows)*39*scale,32*scale,34*scale);}
|
||||
- (NSRect)toolbarRectForItem:(NSInteger)item{
|
||||
NSRect v=NSIntersectionRect(_imageRect,NSMakeRect(0,0,_canvasWidth,_height));NSInteger count=[_mask[@"drawing"]boolValue]?11:9,bestRows=1;CGFloat scale=0;
|
||||
for(NSInteger rows=count;rows>=1;rows--){NSInteger columns=(count+rows-1)/rows;CGFloat candidate=MIN(_uiScale,MIN(v.size.width/(38*columns+16),v.size.height/(39*rows+16)));if(candidate>scale){scale=candidate;bestRows=rows;}}
|
||||
scale=MAX(.01,scale);return NSMakeRect(NSMaxX(v)-40*scale-(item/bestRows)*38*scale,NSMinY(v)+8*scale+(item%bestRows)*39*scale,32*scale,34*scale);
|
||||
}
|
||||
- (void)drawOSCWithWidth:(NSInteger)width height:(NSInteger)height activePart:(NSInteger)activePart destinationImage:(FxImageTile*)destination atTime:(CMTime)time {@synchronized(self){@autoreleasepool{
|
||||
if(!_device||_device.registryID!=destination.deviceRegistryID){[_device release];_device=nil;NSArray *devices=MTLCopyAllDevices();for(id<MTLDevice>d in devices)if(d.registryID==destination.deviceRegistryID)_device=[d retain];[devices release];[_queue release];_queue=[_device newCommandQueue];[_context release];_context=_device?[[CIContext contextWithMTLDevice:_device options:@{kCIContextWorkingColorSpace:NSNull.null,kCIContextOutputColorSpace:NSNull.null}]retain]:nil;}
|
||||
id<MTLTexture>texture=[destination metalTextureForDevice:_device];if(!texture||!_queue)return;id<MTLCommandBuffer>commands=[_queue commandBuffer];MTLRenderPassDescriptor *pass=[MTLRenderPassDescriptor renderPassDescriptor];pass.colorAttachments[0].texture=texture;pass.colorAttachments[0].loadAction=MTLLoadActionClear;pass.colorAttachments[0].storeAction=MTLStoreActionStore;pass.colorAttachments[0].clearColor=MTLClearColorMake(0,0,0,0);id<MTLRenderCommandEncoder>encoder=[commands renderCommandEncoderWithDescriptor:pass];[encoder endEncoding];
|
||||
_height=destination.imagePixelBounds.top-destination.imagePixelBounds.bottom;CGFloat canvasWidth=destination.imagePixelBounds.right-destination.imagePixelBounds.left;
|
||||
_height=destination.imagePixelBounds.top-destination.imagePixelBounds.bottom;CGFloat canvasWidth=destination.imagePixelBounds.right-destination.imagePixelBounds.left;_canvasWidth=canvasWidth;
|
||||
id<FxOnScreenControlAPI_v4>api=[_apiManager apiForProtocol:@protocol(FxOnScreenControlAPI_v4)];double lx=0,ly=0,ux=0,uy=0;[api convertPointFromSpace:kFxDrawingCoordinates_OBJECT fromX:0 fromY:0 toSpace:kFxDrawingCoordinates_CANVAS toX:&lx toY:&ly];[api convertPointFromSpace:kFxDrawingCoordinates_OBJECT fromX:1 fromY:1 toSpace:kFxDrawingCoordinates_CANVAS toX:&ux toY:&uy];_imageRect=NSMakeRect(lx,_height-uy,ux-lx,uy-ly);_uiScale=[api respondsToSelector:@selector(backingScaleFactor)]?MAX(1.,MIN(3.,[api backingScaleFactor])):1.;_toolbarRows=MAX(1,MIN(11,(NSInteger)floor((_height-MAX(8*_uiScale,_imageRect.origin.y+12*_uiScale)-8*_uiScale)/(39*_uiScale))));
|
||||
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;
|
||||
if(mask&&canvasWidth>0&&_height>0&&canvasWidth<16384&&_height<16384&&_imageRect.size.width>0&&_imageRect.size.height>0){
|
||||
[_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){
|
||||
NSBitmapImageRep *bitmap=[[[NSBitmapImageRep alloc]initWithBitmapDataPlanes:NULL pixelsWide:(NSInteger)canvasWidth pixelsHigh:(NSInteger)_height bitsPerSample:8 samplesPerPixel:4 hasAlpha:YES isPlanar:NO colorSpaceName:NSDeviceRGBColorSpace bytesPerRow:(NSInteger)canvasWidth*4 bitsPerPixel:32]autorelease];memset(bitmap.bitmapData,0,bitmap.bytesPerRow*bitmap.pixelsHigh);[NSGraphicsContext saveGraphicsState];[NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithBitmapImageRep:bitmap]];NSAffineTransform *flip=[NSAffineTransform transform];[flip translateXBy:0 yBy:_height];[flip scaleXBy:1 yBy:-1];[flip concat];
|
||||
// Match AppKit text/image drawing to the top-down canvas CTM.
|
||||
[NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithCGContext:NSGraphicsContext.currentContext.CGContext flipped:YES]];
|
||||
DYMaskParameters p;[mask[@"parameters"]getBytes:&p length:sizeof(p)];p.imageAspect=_imageRect.size.width/_imageRect.size.height;_outline=[[NSBezierPath bezierPath]retain];
|
||||
if(mask){DYMaskParameters p;[mask[@"parameters"]getBytes:&p length:sizeof(p)];p.imageAspect=_imageRect.size.width/_imageRect.size.height;_outline=[[NSBezierPath bezierPath]retain];
|
||||
if(p.kind==DYMaskBezier){NSData *data=mask[@"nodes"];auto *nodes=(const DYBezierNode*)data.bytes;NSUInteger count=data.length/sizeof(DYBezierNode);for(NSUInteger i=0;i<count;i++){NSPoint anchor=[self canvasPoint:nodes[i].x y:nodes[i].y parameters:p];if(i==0)[_outline moveToPoint:anchor];else{auto a=nodes[i-1],b=nodes[i];[_outline curveToPoint:anchor controlPoint1:[self canvasPoint:a.outX y:a.outY parameters:p] controlPoint2:[self canvasPoint:b.inX y:b.inY parameters:p]];}[self addHandle:anchor part:1000+i*3];for(int j=0;j<2;j++){NSPoint handle=[self canvasPoint:j?nodes[i].outX:nodes[i].inX y:j?nodes[i].outY:nodes[i].inY parameters:p];if(hypot(handle.x-anchor.x,handle.y-anchor.y)>3){NSBezierPath *line=[NSBezierPath bezierPath];[line moveToPoint:anchor];[line lineToPoint:handle];[[NSColor colorWithWhite:1 alpha:.55]setStroke];[line stroke];[self addHandle:handle part:1000+i*3+j+1];}}}
|
||||
NSArray *hover=mask[@"hover"];if(count&&[mask[@"drawing"]boolValue]&&hover.count==2){NSPoint target=NSMakePoint(_imageRect.origin.x+[hover[0]doubleValue]*_imageRect.size.width,_imageRect.origin.y+[hover[1]doubleValue]*_imageRect.size.height);[_outline curveToPoint:target controlPoint1:[self canvasPoint:nodes[count-1].outX y:nodes[count-1].outY parameters:p] controlPoint2:target];}
|
||||
if(count>=3&&![mask[@"drawing"]boolValue]){auto a=nodes[count-1],b=nodes[0];[_outline curveToPoint:[self canvasPoint:b.x y:b.y parameters:p] controlPoint1:[self canvasPoint:a.outX y:a.outY parameters:p] controlPoint2:[self canvasPoint:b.inX y:b.inY parameters:p]];[_outline closePath];}
|
||||
@@ -37,28 +42,32 @@
|
||||
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];}
|
||||
NSArray *symbols=@[@"cursorarrow",@"point.topleft.down.to.point.bottomright.curvepath",@"rectangle",@"circle",@"line.diagonal",@"eyedropper",@"circle.lefthalf.filled",@"eye",@"xmark",@"checkmark",@"xmark.circle"];
|
||||
NSInteger buttonCount=[mask[@"drawing"]boolValue]?11:9;
|
||||
for(NSInteger i=0;i<buttonCount;i++){NSRect cell=[self toolbarRectForItem:i];BOOL active=(i==1&&[mask[@"drawing"]boolValue])||(i==0&&![mask[@"drawing"]boolValue]);[[NSColor colorWithCalibratedRed:active?.08:.12 green:active?.34:.12 blue:active?.58:.12 alpha:.94]setFill];[[NSBezierPath bezierPathWithRoundedRect:cell xRadius:5*_uiScale yRadius:5*_uiScale]fill];NSImage *icon=[NSImage imageWithSystemSymbolName:symbols[i] accessibilityDescription:nil];icon=[icon imageWithSymbolConfiguration:[NSImageSymbolConfiguration configurationWithPaletteColors:@[NSColor.whiteColor]]];[icon drawInRect:NSInsetRect(cell,7*_uiScale,7*_uiScale) fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1 respectFlipped:YES hints:nil];}
|
||||
for(NSInteger i=0;i<buttonCount;i++){NSRect cell=[self toolbarRectForItem:i];BOOL active=(i==1&&[mask[@"drawing"]boolValue])||(i==0&&![mask[@"drawing"]boolValue]);[[NSColor colorWithCalibratedRed:active?.08:.12 green:active?.34:.12 blue:active?.58:.12 alpha:.94]setFill];[[NSBezierPath bezierPathWithRoundedRect:cell xRadius:cell.size.width*5/32 yRadius:cell.size.width*5/32]fill];NSImage *icon=[NSImage imageWithSystemSymbolName:symbols[i] accessibilityDescription:nil];icon=[icon imageWithSymbolConfiguration:[NSImageSymbolConfiguration configurationWithPaletteColors:@[NSColor.whiteColor]]];[icon drawInRect:NSInsetRect(cell,cell.size.width*7/32,cell.size.width*7/32) fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1 respectFlipped:YES hints:nil];}
|
||||
if([mask[@"drawing"]boolValue]){NSRect hint=NSMakeRect(MAX(12*_uiScale,_imageRect.origin.x+12*_uiScale),MIN(_height-36*_uiScale,NSMaxY(_imageRect)-36*_uiScale),MIN(460*_uiScale,canvasWidth-24*_uiScale),28*_uiScale);[[NSColor colorWithWhite:.08 alpha:.9]setFill];[[NSBezierPath bezierPathWithRoundedRect:hint xRadius:5*_uiScale yRadius:5*_uiScale]fill];[@"钢笔:点击放点,拖出曲柄;点首节点或 ✓ 闭合" drawInRect:NSInsetRect(hint,7*_uiScale,5*_uiScale) withAttributes:@{NSFontAttributeName:[NSFont systemFontOfSize:12*_uiScale],NSForegroundColorAttributeName:NSColor.whiteColor}];}
|
||||
}[_viewerControls draw];
|
||||
[NSGraphicsContext restoreGraphicsState];CIImage *overlay=[CIImage imageWithCGImage:bitmap.CGImage options:@{kCIImageColorSpace:NSNull.null}];overlay=[overlay imageByApplyingTransform:CGAffineTransformMakeTranslation(0,texture.height-_height)];[_context render:overlay toMTLTexture:texture commandBuffer:commands bounds:CGRectMake(0,0,texture.width,texture.height) colorSpace:nil];
|
||||
}[commands commit];[commands waitUntilCompleted];
|
||||
}}}
|
||||
- (NSInteger)partAtPoint:(NSPoint)point {
|
||||
NSInteger viewerHit=[_viewerControls partAtPoint:point];if(viewerHit)return viewerHit;
|
||||
if(!_mask)return 0;BOOL drawing=[_mask[@"drawing"]boolValue];for(NSInteger i=0;i<(drawing?11:9);i++)if(NSPointInRect(point,[self toolbarRectForItem:i]))return 10000+i;
|
||||
DYMaskParameters p;[_mask[@"parameters"]getBytes:&p length:sizeof(p)];p.imageAspect=_imageRect.size.width/MAX(1.,_imageRect.size.height);
|
||||
if(drawing){NSData *data=_mask[@"nodes"];if(data.length>=3*sizeof(DYBezierNode)){const DYBezierNode *nodes=(const DYBezierNode*)data.bytes;NSPoint first=[self canvasPoint:nodes[0].x y:nodes[0].y parameters:p];if(hypot(point.x-first.x,point.y-first.y)<=10*_uiScale)return 1000;}return NSPointInRect(point,_imageRect)?1:0;}
|
||||
for(NSDictionary *h in _handles){NSPoint q=[h[@"point"]pointValue];if(hypot(q.x-point.x,q.y-point.y)<=9*_uiScale)return [h[@"part"]integerValue];}
|
||||
if(p.kind==DYMaskBezier||p.kind==DYMaskLinearGradient||[_outline containsPoint:point])return 1;return 0;
|
||||
}
|
||||
- (void)hitTestOSCAtMousePositionX:(double)x mousePositionY:(double)y activePart:(NSInteger*)part atTime:(CMTime)time{@synchronized(self){NSDictionary *fresh=[[self pluginAtTime:time]toolCanvasMaskAtTime:time];[_mask release];_mask=[fresh copy];NSInteger hit=[self partAtPoint:NSMakePoint(x,_height-y)];if(part)*part=hit;if(_hitDiagnostics++<16)os_log(OS_LOG_DEFAULT,"dayu_tool_osc_hit x=%{public}.2f y=%{public}.2f height=%{public}.2f rect=%{public}.2f,%{public}.2f,%{public}.2f,%{public}.2f mask=%{public}d hit=%{public}ld",x,y,_height,_imageRect.origin.x,_imageRect.origin.y,_imageRect.size.width,_imageRect.size.height,_mask!=nil,(long)hit);}}
|
||||
- (void)hitTestOSCAtMousePositionX:(double)x mousePositionY:(double)y activePart:(NSInteger*)part atTime:(CMTime)time{@synchronized(self){DYPlugIn*plugin=[self pluginAtTime:time];[_viewerControls setBridge:[plugin viewerParameterBridge]];[_viewerControls setViewport:_imageRect];[_viewerControls prepareWithSize:NSMakeSize(_canvasWidth,_height) scale:_uiScale atTime:time];NSDictionary *fresh=[plugin toolCanvasMaskAtTime:time];[_mask release];_mask=[fresh copy];NSInteger hit=[self partAtPoint:NSMakePoint(x,_height-y)];if(part)*part=hit;if(_hitDiagnostics++<16)os_log(OS_LOG_DEFAULT,"dayu_tool_osc_hit x=%{public}.2f y=%{public}.2f height=%{public}.2f rect=%{public}.2f,%{public}.2f,%{public}.2f,%{public}.2f mask=%{public}d hit=%{public}ld",x,y,_height,_imageRect.origin.x,_imageRect.origin.y,_imageRect.size.width,_imageRect.size.height,_mask!=nil,(long)hit);}}
|
||||
- (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);if(!plugin||![plugin toolCanvasVisible]||_imageRect.size.width<=0||_imageRect.size.height<=0)return NO;NSPoint point=NSMakePoint((x-_imageRect.origin.x)/_imageRect.size.width,(_height-y-_imageRect.origin.y)/_imageRect.size.height);[plugin toolCanvasEvent:type point:point part:part modifiers:modifiers key:key time:time];return YES;
|
||||
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(type==NSEventTypeKeyDown&&key==27&&[_viewerControls capturing])return [_viewerControls finishCapture];if(type!=NSEventTypeKeyDown&&[_viewerControls event:type point:canvasPoint atTime:time])return YES;if(!plugin||![plugin toolCanvasVisible]||_imageRect.size.width<=0||_imageRect.size.height<=0)return NO;NSPoint point=NSMakePoint((x-_imageRect.origin.x)/_imageRect.size.width,(_height-y-_imageRect.origin.y)/_imageRect.size.height);[plugin toolCanvasEvent:type point:point part:part modifiers:modifiers key:key time:time];return YES;
|
||||
}}
|
||||
- (void)mouseDownAtPositionX:(double)x positionY:(double)y activePart:(NSInteger)part modifiers:(FxModifierKeys)m forceUpdate:(BOOL*)update atTime:(CMTime)t{if(update)*update=[self event:NSEventTypeLeftMouseDown x:x y:y part:part modifiers:m key:0 time:t];}
|
||||
- (void)mouseDraggedAtPositionX:(double)x positionY:(double)y activePart:(NSInteger)part modifiers:(FxModifierKeys)m forceUpdate:(BOOL*)update atTime:(CMTime)t{if(update)*update=[self event:NSEventTypeLeftMouseDragged x:x y:y part:part modifiers:m key:0 time:t];}
|
||||
- (void)mouseUpAtPositionX:(double)x positionY:(double)y activePart:(NSInteger)part modifiers:(FxModifierKeys)m forceUpdate:(BOOL*)update atTime:(CMTime)t{if(update)*update=[self event:NSEventTypeLeftMouseUp x:x y:y part:part modifiers:m key:0 time:t];}
|
||||
- (void)mouseDownAtPositionX:(double)x positionY:(double)y activePart:(NSInteger)part modifiers:(FxModifierKeys)m forceUpdate:(BOOL*)update atTime:(CMTime)t{BOOL result=[self event:NSEventTypeLeftMouseDown x:x y:y part:part modifiers:m key:0 time:t];if(update)*update=result;}
|
||||
- (void)mouseDraggedAtPositionX:(double)x positionY:(double)y activePart:(NSInteger)part modifiers:(FxModifierKeys)m forceUpdate:(BOOL*)update atTime:(CMTime)t{BOOL result=[self event:NSEventTypeLeftMouseDragged x:x y:y part:part modifiers:m key:0 time:t];if(update)*update=result;}
|
||||
- (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{NSDictionary *mask=[[self pluginAtTime:t]toolCanvasMaskAtTime:t];BOOL drawing=[mask[@"drawing"]boolValue];NSCursor *cursor=part>=10000?NSCursor.pointingHandCursor:(drawing||part>=1000)?NSCursor.crosshairCursor:part?NSCursor.openHandCursor:NSCursor.arrowCursor;[[_apiManager apiForProtocol:@protocol(FxOnScreenControlAPI_v4)]setCursor:cursor];if(drawing)[self event:NSEventTypeMouseMoved x:x y:y part:part modifiers:m key:0 time:t];if(update)*update=drawing;}
|
||||
- (void)mouseEnteredAtPositionX:(double)x positionY:(double)y modifiers:(FxModifierKeys)m forceUpdate:(BOOL*)update atTime:(CMTime)t{if(update)*update=NO;}
|
||||
- (void)mouseExitedAtPositionX:(double)x positionY:(double)y modifiers:(FxModifierKeys)m forceUpdate:(BOOL*)update atTime:(CMTime)t{if(update)*update=NO;}
|
||||
- (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];NSCursor *cursor=[_viewerControls headerAtPoint:point]?([_viewerControls capturing]?NSCursor.closedHandCursor:NSCursor.openHandCursor):viewerHit?NSCursor.pointingHandCursor:part>=10000?NSCursor.pointingHandCursor:(drawing||part>=1000)?NSCursor.crosshairCursor:part?NSCursor.openHandCursor:NSCursor.arrowCursor;[[_apiManager apiForProtocol:@protocol(FxOnScreenControlAPI_v4)]setCursor:cursor];if(drawing&&!viewerHit)[self event:NSEventTypeMouseMoved x:x y:y part:part modifiers:m key:0 time:t];if(update)*update=redraw||drawing;
|
||||
}}
|
||||
- (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;}}
|
||||
- (void)keyUpAtPositionX:(double)x positionY:(double)y keyPressed:(unsigned short)key modifiers:(FxModifierKeys)m forceUpdate:(BOOL*)update didHandle:(BOOL*)handled atTime:(CMTime)t{if(update)*update=NO;if(handled)*handled=NO;}
|
||||
@end
|
||||
@@ -0,0 +1,82 @@
|
||||
// One OSC root owns a vertical tool rail and independent movable editors.
|
||||
// Positions are view state; opening, moving and channel selection never edit a grade.
|
||||
#import "DYTheme.h"
|
||||
#include "DYViewerParameterPanel.inc.h"
|
||||
static const NSInteger DYViewerPartBase=20000;
|
||||
@interface DYViewerControls : NSObject
|
||||
@property(nonatomic,retain) DYViewerParameterBridge *bridge;
|
||||
- (void)setViewport:(NSRect)viewport;
|
||||
- (void)prepareWithSize:(NSSize)size scale:(CGFloat)scale atTime:(CMTime)time;
|
||||
- (void)draw;
|
||||
- (NSInteger)partAtPoint:(NSPoint)point;
|
||||
- (BOOL)event:(NSEventType)type point:(NSPoint)point atTime:(CMTime)time;
|
||||
- (BOOL)mouseMoved:(NSPoint)point;
|
||||
- (BOOL)mouseExited;
|
||||
- (BOOL)capturing;
|
||||
- (BOOL)finishCapture;
|
||||
- (BOOL)headerAtPoint:(NSPoint)point;
|
||||
@end
|
||||
@implementation DYViewerControls {
|
||||
DYViewerParameterBridge *_bridge;NSMutableArray *_panels,*_areas;DYViewerParameterPanel *_capture;
|
||||
NSRect _viewport,_rail;NSSize _size;CGFloat _scale;CMTime _time;NSInteger _pressed,_hover,_railPage;BOOL _hasViewport;
|
||||
}
|
||||
@synthesize bridge=_bridge;
|
||||
- (instancetype)init{if((self=[super init])){_panels=[NSMutableArray new];_areas=[NSMutableArray new];_scale=1;_time=kCMTimeInvalid;}return self;}
|
||||
- (void)dealloc{[self finishCapture];[_bridge release];[_panels release];[_areas release];[super dealloc];}
|
||||
- (void)setBridge:(DYViewerParameterBridge*)bridge{if(bridge==_bridge)return;[self finishCapture];for(DYViewerParameterPanel*p in _panels)p.bridge=nil;[_panels removeAllObjects];[_bridge release];_bridge=[bridge retain];}
|
||||
- (void)setViewport:(NSRect)viewport{_viewport=viewport;_hasViewport=YES;}
|
||||
- (void)prepareWithSize:(NSSize)size scale:(CGFloat)scale atTime:(CMTime)time{
|
||||
_size=size;_time=time;NSRect bounds=NSMakeRect(0,0,size.width,size.height),v=_hasViewport?NSIntersectionRect(_viewport,bounds):bounds;_viewport=v;
|
||||
_scale=MAX(.6,MIN(MAX(1.,scale),MIN(v.size.width/420.,v.size.height/350.)));CGFloat s=_scale;
|
||||
for(DYViewerParameterPanel*p in [[_panels copy]autorelease]){if(!p.visible){if(p==_capture){[p finishCapture];_capture=nil;}p.bridge=nil;[_panels removeObjectIdenticalTo:p];continue;}[p setViewport:v];[p prepareWithSize:size scale:s atTime:time];}
|
||||
if(_capture&&![_capture capturing])_capture=nil;
|
||||
[_areas removeAllObjects];if(!_bridge||v.size.width<100||v.size.height<80)return;
|
||||
NSInteger cap=MAX(1,MIN(14,(NSInteger)floor((v.size.height-72*s)/(30*s))));if(cap<14)cap=MAX(1,MIN(13,(NSInteger)floor((v.size.height-96*s)/(30*s))));NSInteger pages=(14+cap-1)/cap;_railPage=MAX(0,_railPage)%pages;
|
||||
CGFloat x=NSMinX(v)+8*s,y=NSMinY(v)+8*s,w=40*s;
|
||||
_rail=NSMakeRect(x,y,w,(30*MIN(cap,14-_railPage*cap)+54+(pages>1?24:0))*s);
|
||||
NSArray*titles=@[@"一级",@"蜘蛛",@"基础",@"肤色",@"LUT",@"HSL",@"曲线",@"分级",@"原色",@"色阶",@"黑白",@"平衡",@"通道",@"胶片"];
|
||||
for(NSInteger j=0;j<cap&&j+_railPage*cap<14;j++){NSInteger i=j+_railPage*cap;[_areas addObject:@{@"part":@(20020+i),@"kind":@"tool",@"toolType":DYToolTypes()[i],@"title":titles[i],@"rect":[NSValue valueWithRect:NSMakeRect(x+4*s,y+5*s+j*30*s,w-8*s,26*s)]}];}
|
||||
CGFloat end=NSMaxY(_rail)-47*s;if(pages>1){[_areas addObject:@{@"part":@20003,@"kind":@"railPage",@"title":@"↕",@"rect":[NSValue valueWithRect:NSMakeRect(x+4*s,end-24*s,w-8*s,22*s)]}];}
|
||||
[_areas addObject:@{@"part":@20001,@"kind":@"workspace",@"title":@"◫",@"rect":[NSValue valueWithRect:NSMakeRect(x+4*s,end,w-8*s,26*s)]}];
|
||||
[_areas addObject:@{@"part":@20002,@"kind":@"hidePanels",@"title":@"收",@"rect":[NSValue valueWithRect:NSMakeRect(x+4*s,end+27*s,w-8*s,18*s)]}];
|
||||
}
|
||||
- (NSInteger)partAtPoint:(NSPoint)p{
|
||||
if(!_bridge||!std::isfinite(p.x)||!std::isfinite(p.y)||!NSPointInRect(p,_viewport))return 0;
|
||||
for(NSDictionary*a in _areas)if(NSPointInRect(p,[a[@"rect"]rectValue]))return [a[@"part"]integerValue];if(NSPointInRect(p,_rail))return 20000;
|
||||
for(NSInteger i=_panels.count-1;i>=0;i--){NSInteger part=[_panels[i]partAtPoint:p];if(part)return 100000+(i+1)*10000+(part-20000);}
|
||||
return 0;
|
||||
}
|
||||
- (BOOL)headerAtPoint:(NSPoint)p{if(NSPointInRect(p,_rail))return NO;for(DYViewerParameterPanel*panel in [_panels reverseObjectEnumerator]){NSInteger part=[panel partAtPoint:p];if(part)return part==20000;}return NO;}
|
||||
- (void)draw{
|
||||
if(!_areas.count)return;[NSGraphicsContext saveGraphicsState];NSRectClip(_viewport);CGFloat s=_scale;NSColor*ink=DYThemeColor(@"text"),*accent=DYThemeColor(@"accent");for(DYViewerParameterPanel*p in _panels)[p draw];DYDrawThemeSurface([NSBezierPath bezierPathWithRoundedRect:_rail xRadius:8*s yRadius:8*s],YES);
|
||||
for(NSDictionary*a in _areas){NSRect r=[a[@"rect"]rectValue];BOOL selected=NO;for(DYViewerParameterPanel*p in _panels)if([p.toolType isEqual:a[@"toolType"]])selected=YES;
|
||||
BOOL hover=_hover==[a[@"part"]integerValue];DYDrawSoftControl(r,5*s,NO,selected||hover,_pressed==[a[@"part"]integerValue]);
|
||||
NSMutableParagraphStyle*style=[[[NSMutableParagraphStyle alloc]init]autorelease];style.alignment=NSTextAlignmentCenter;
|
||||
[a[@"title"]drawInRect:NSInsetRect(r,1*s,4*s) withAttributes:@{NSFontAttributeName:[NSFont systemFontOfSize:([a[@"kind"]isEqual:@"workspace"]?16:10)*s weight:NSFontWeightMedium],NSForegroundColorAttributeName:selected?accent:ink,NSParagraphStyleAttributeName:style}];
|
||||
}
|
||||
for(NSDictionary*a in _areas)if(_hover==[a[@"part"]integerValue]){NSString*help=[a[@"kind"]isEqual:@"workspace"]?@"打开示波器与 LUT 工作区":[a[@"kind"]isEqual:@"hidePanels"]?@"收起所有画布面板":a[@"toolType"]?DYToolSection(a[@"toolType"])[@"title"]:@"下一组工具";NSRect r=[a[@"rect"]rectValue];NSRect tip=NSMakeRect(NSMaxX(_rail)+6*s,NSMinY(r),MIN(200*s,NSMaxX(_viewport)-NSMaxX(_rail)-10*s),25*s);if(tip.size.width>40*s){DYDrawThemeSurface([NSBezierPath bezierPathWithRoundedRect:tip xRadius:4*s yRadius:4*s],YES);[help drawInRect:NSInsetRect(tip,6*s,5*s)withAttributes:@{NSFontAttributeName:[NSFont systemFontOfSize:10*s],NSForegroundColorAttributeName:ink}];}break;}
|
||||
[NSGraphicsContext restoreGraphicsState];
|
||||
}
|
||||
- (void)activateTool:(NSString*)type{
|
||||
for(DYViewerParameterPanel*p in [[_panels copy]autorelease])if([p.toolType isEqual:type]){[p finishCapture];p.bridge=nil;[_panels removeObjectIdenticalTo:p];return;}
|
||||
DYViewerParameterPanel*p=[[[DYViewerParameterPanel alloc]init]autorelease];p.toolType=type;p.bridge=_bridge;
|
||||
CGFloat x=(_rail.size.width+24*_scale)/MAX(1.,_viewport.size.width),offset=(_panels.count%4)*22*_scale;
|
||||
[p setInitialPosition:NSMakePoint(x+offset/MAX(1.,_viewport.size.width),(8*_scale+offset)/MAX(1.,_viewport.size.height))];[_panels addObject:p];
|
||||
}
|
||||
- (BOOL)event:(NSEventType)type point:(NSPoint)p atTime:(CMTime)time{
|
||||
if(!std::isfinite(p.x)||!std::isfinite(p.y))return NO;[self prepareWithSize:_size scale:_scale atTime:time];
|
||||
if(_capture){BOOL used=[_capture event:type point:p atTime:time];if(![_capture capturing]){_capture=nil;[self prepareWithSize:_size scale:_scale atTime:time];}return used;}
|
||||
NSInteger hit=[self partAtPoint:p];
|
||||
if(type==NSEventTypeLeftMouseDown){
|
||||
if(hit>=100000){NSInteger index=(hit-100000)/10000-1;if(index<0||index>=(NSInteger)_panels.count)return NO;DYViewerParameterPanel*panel=[[_panels[index]retain]autorelease];[_panels removeObjectIdenticalTo:panel];[_panels addObject:panel];_capture=panel;return [panel event:type point:p atTime:time];}
|
||||
if(!hit)return NO;_pressed=hit;return YES;
|
||||
}
|
||||
if(!_pressed)return NO;
|
||||
if(type==NSEventTypeLeftMouseUp){NSInteger pressed=_pressed;_pressed=0;if(hit==pressed){for(NSDictionary*a in _areas)if([a[@"part"]integerValue]==hit){NSString*kind=a[@"kind"];if([kind isEqual:@"tool"])[self activateTool:a[@"toolType"]];else if([kind isEqual:@"workspace"])[_bridge requestWorkspace];else if([kind isEqual:@"hidePanels"]){for(DYViewerParameterPanel*panel in _panels){[panel finishCapture];panel.bridge=nil;}[_panels removeAllObjects];}else if([kind isEqual:@"railPage"])_railPage++;break;}}[self prepareWithSize:_size scale:_scale atTime:time];}
|
||||
return YES;
|
||||
}
|
||||
- (BOOL)capturing{return _pressed||[_capture capturing];}
|
||||
- (BOOL)finishCapture{BOOL had=[self capturing];for(DYViewerParameterPanel*p in _panels)[p finishCapture];_capture=nil;_pressed=0;return had;}
|
||||
- (BOOL)mouseMoved:(NSPoint)p{NSInteger h=[self partAtPoint:p];BOOL changed=h!=_hover;_hover=h;for(DYViewerParameterPanel*panel in _panels)changed=[panel mouseMoved:p]||changed;return changed;}
|
||||
- (BOOL)mouseExited{BOOL changed=_hover!=0;_hover=0;for(DYViewerParameterPanel*p in _panels)changed=[p mouseExited]||changed;return changed;}
|
||||
@end
|
||||
@@ -0,0 +1,84 @@
|
||||
{
|
||||
DYDiagnosticManager*base=[[[DYDiagnosticManager alloc]init]autorelease];DYCreateParameters(base,&error);
|
||||
DYToolCanvasProbe*host=[[[DYToolCanvasProbe alloc]init]autorelease];host->_base=base;host->_time=kCMTimeZero;
|
||||
id<DYViewerParameterProbe>bridge=(id)[[NSClassFromString(@"DYViewerParameterBridge")alloc]initWithAPIManager:host];
|
||||
id<DYViewerControlsProbe>controls=(id)[NSClassFromString(@"DYViewerControls")new];controls.bridge=bridge;
|
||||
NSSize size=NSMakeSize(1280,720);
|
||||
auto drain=[](){double end=NSProcessInfo.processInfo.systemUptime+.04;while(NSProcessInfo.processInfo.systemUptime<end)[[NSRunLoop mainRunLoop]runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:.002]];};
|
||||
auto publish=[&](){DYUniforms u;DYReadUniforms(host,host->_time,&u);[bridge publishUniforms:&u document:DYReadTools(host,host->_time).document atTime:host->_time];[controls prepareWithSize:size scale:1 atTime:host->_time];};
|
||||
auto areaFor=[&](id owner,NSString*kind,NSString*key)->NSDictionary*{for(NSDictionary*a in [owner valueForKey:@"areas"])if([a[@"kind"]isEqual:kind]&&(!key||[a[@"descriptor"][@"key"]isEqual:key]||[a[@"toolType"]isEqual:key]||[a[@"nodeID"]isEqual:key]))return [[a copy]autorelease];return nil;};
|
||||
auto click=[&](NSDictionary*a){if(!a)return;NSRect r=[a[@"rect"]rectValue];NSPoint p=NSMakePoint(NSMidX(r),NSMidY(r));[controls event:NSEventTypeLeftMouseDown point:p atTime:host->_time];[controls event:NSEventTypeLeftMouseUp point:p atTime:host->_time];};
|
||||
auto panelFor=[&](NSString*type)->id{for(id panel in [controls valueForKey:@"panels"])if([[panel valueForKey:@"toolType"]isEqual:type])return panel;return nil;};
|
||||
auto value=[&](NSString*key)->double{for(NSDictionary*d in DYDescriptors())if([d[@"key"]isEqual:key])return [base->_values[d[@"pid"]]doubleValue];return NAN;};
|
||||
publish();int undo=base->_undoStarts;NSDictionary*initial=[[base->_values copy]autorelease];
|
||||
NSMutableSet*types=[NSMutableSet set];CGFloat x=-1,lastY=-1;BOOL vertical=YES;
|
||||
for(NSDictionary*a in [controls valueForKey:@"areas"])if([a[@"kind"]isEqual:@"tool"]){NSRect r=[a[@"rect"]rectValue];if(x>=0)vertical&=r.origin.x==x&&r.origin.y>lastY;x=r.origin.x;lastY=r.origin.y;[types addObject:a[@"toolType"]];}
|
||||
run.record(@"viewer-vertical-rail-exposes-fourteen-tools-without-a-parameter-panel",vertical&&types.count==14&&[[controls valueForKey:@"panels"]count]==0);
|
||||
BOOL allOpen=YES;for(NSString*type in DYToolTypes()){click(areaFor(controls,@"tool",type));allOpen&=panelFor(type)!=nil;}
|
||||
run.record(@"viewer-tools-open-independent-panels-without-editing-the-grade",allOpen&&[[controls valueForKey:@"panels"]count]==14&&[initial isEqual:base->_values]&&base->_undoStarts==undo);
|
||||
click(areaFor(controls,@"hidePanels",nil));click(areaFor(controls,@"tool",@"base"));id panel=panelFor(@"base");
|
||||
NSRect before=[[panel valueForKey:@"panel"]rectValue],header=[areaFor(panel,@"open",nil)[@"rect"]rectValue];NSPoint hp=NSMakePoint(NSMidX(header),NSMidY(header));
|
||||
[controls event:NSEventTypeLeftMouseDown point:hp atTime:host->_time];[controls event:NSEventTypeLeftMouseDragged point:NSMakePoint(hp.x+90,hp.y+20) atTime:host->_time];[controls event:NSEventTypeLeftMouseUp point:NSMakePoint(hp.x+140,hp.y+30) atTime:host->_time];NSRect after=[[panel valueForKey:@"panel"]rectValue];
|
||||
run.record(@"viewer-dragging-header-moves-panel-with-final-release-point-and-no-undo",fabs(after.origin.x-before.origin.x-140)<1e-5&&fabs(after.origin.y-before.origin.y-30)<1e-5&&![controls capturing]&&[initial isEqual:base->_values]&&base->_undoStarts==undo);
|
||||
NSDictionary*exposure=areaFor(panel,@"slider",@"exposure");NSRect row=[exposure[@"rect"]rectValue],track=NSMakeRect(row.origin.x+5,row.origin.y+28,row.size.width-10,4);NSPoint knob=NSMakePoint(NSMidX(track),NSMidY(track)),label=NSMakePoint(row.origin.x+10,row.origin.y+5);
|
||||
[controls event:NSEventTypeLeftMouseDown point:label atTime:host->_time];[controls event:NSEventTypeLeftMouseUp point:label atTime:host->_time];drain();
|
||||
[controls event:NSEventTypeLeftMouseDown point:knob atTime:host->_time];[controls event:NSEventTypeLeftMouseDragged point:NSMakePoint(knob.x+1,knob.y+1)atTime:host->_time];[controls event:NSEventTypeLeftMouseUp point:NSMakePoint(knob.x+1,knob.y+1)atTime:host->_time];drain();
|
||||
run.record(@"viewer-label-and-knob-deadzone-do-not-create-edits",value(@"exposure")==0&&base->_undoStarts==undo);
|
||||
[controls event:NSEventTypeLeftMouseDown point:NSMakePoint(knob.x+5,knob.y)atTime:host->_time];[controls event:NSEventTypeLeftMouseDragged point:NSMakePoint(knob.x+5+track.size.width*.1,knob.y)atTime:host->_time];drain();
|
||||
run.record(@"viewer-slider-preserves-grab-offset-and-updates-live",fabs(value(@"exposure")-1)<1e-5&&[controls capturing]&&base->_undoStarts==undo+1&&base->_undoEnds==undo);
|
||||
[controls event:NSEventTypeLeftMouseUp point:NSMakePoint(-100,1000)atTime:host->_time];drain();publish();
|
||||
run.record(@"viewer-slider-captures-outside-and-closes-one-undo",value(@"exposure")==-5&&![controls capturing]&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);click(areaFor(panel,@"reset",@"exposure"));drain();publish();
|
||||
click(areaFor(panel,@"headerBool",@"baseEnabled"));drain();publish();run.record(@"viewer-base-tone-and-color-eyes-remain-independent",value(@"baseEnabled")==0&&value(@"colorEnabled")==1);click(areaFor(panel,@"headerBool",@"baseEnabled"));drain();publish();
|
||||
// Empty panels cannot close the shared bridge gesture owned by a live panel.
|
||||
NSMutableDictionary*removedDoc=DYMutablePlist(DYReadTools(host,host->_time).document);DYSetBaseToolRemoved(removedDoc,@"film",YES);DYWriteTools(host,removedDoc,host->_time);publish();click(areaFor(controls,@"tool",@"film"));[panelFor(@"film")setValue:[NSValue valueWithPoint:NSMakePoint(.72,.1)]forKey:@"position"];publish();
|
||||
// Base is still visible; raise it by an inert label down/up.
|
||||
exposure=areaFor(panel,@"slider",@"exposure");row=[exposure[@"rect"]rectValue];label=NSMakePoint(row.origin.x+10,row.origin.y+5);[controls event:NSEventTypeLeftMouseDown point:label atTime:host->_time];[controls event:NSEventTypeLeftMouseUp point:label atTime:host->_time];
|
||||
track=NSMakeRect(row.origin.x+5,row.origin.y+28,row.size.width-10,4);knob=NSMakePoint(NSMidX(track),NSMidY(track));undo=base->_undoStarts;
|
||||
[controls event:NSEventTypeLeftMouseDown point:knob atTime:host->_time];[controls event:NSEventTypeLeftMouseDragged point:NSMakePoint(knob.x+track.size.width*.1,knob.y)atTime:host->_time];drain();publish();[controls event:NSEventTypeLeftMouseDragged point:NSMakePoint(knob.x+track.size.width*.2,knob.y)atTime:host->_time];[controls event:NSEventTypeLeftMouseUp point:NSMakePoint(knob.x+track.size.width*.3,knob.y)atTime:host->_time];drain();publish();
|
||||
run.record(@"viewer-empty-removed-tool-never-terminates-another-panels-live-gesture",fabs(value(@"exposure")-3)<1e-5&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
|
||||
click(areaFor(controls,@"tool",@"film"));click(areaFor(panel,@"reset",@"exposure"));drain();publish();
|
||||
click(areaFor(controls,@"tool",@"curve"));id curve=panelFor(@"curve");
|
||||
run.record(@"viewer-curve-opens-an-editable-graph-beside-existing-panel",curve&&panelFor(@"base")&&areaFor(curve,@"curvePlot",nil)&&!areaFor(curve,@"slider",nil));
|
||||
NSRect plot=[areaFor(curve,@"curvePlot",nil)[@"rect"]rectValue];NSPoint point=NSMakePoint(plot.origin.x+.43*plot.size.width,plot.origin.y+.18*plot.size.height);undo=base->_undoStarts;
|
||||
[controls event:NSEventTypeLeftMouseDown point:point atTime:host->_time];NSString*xKey=[[[curve valueForKey:@"captured"][@"xKey"]copy]autorelease],*yKey=[[[curve valueForKey:@"captured"][@"yKey"]copy]autorelease];drain();
|
||||
[controls event:NSEventTypeLeftMouseDragged point:NSMakePoint(plot.origin.x+.54*plot.size.width,plot.origin.y+.23*plot.size.height)atTime:host->_time];drain();
|
||||
run.record(@"viewer-curve-point-is-live-xy-not-a-scalar-only-control",xKey&&yKey&&fabs(value(xKey)-.54)<1e-5&&fabs(value(yKey)-23)<1e-4&&base->_undoStarts==undo+1&&base->_undoEnds==undo);
|
||||
[controls event:NSEventTypeLeftMouseUp point:NSMakePoint(plot.origin.x+.61*plot.size.width,plot.origin.y+.3*plot.size.height)atTime:host->_time];drain();publish();
|
||||
run.record(@"viewer-curve-final-release-commits-both-axes-with-one-undo",fabs(value(xKey)-.61)<1e-5&&fabs(value(yKey)-9)<1e-4&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
|
||||
undo=base->_undoStarts;NSDictionary*deleteArea=areaFor(curve,@"deletePoint",nil);click(deleteArea);drain();publish();
|
||||
run.record(@"viewer-curve-delete-deactivates-the-selected-slot",deleteArea&&value(xKey)==-1&&value(yKey)==0&&base->_undoStarts==undo+1);
|
||||
NSDictionary*red=nil;for(NSDictionary*a in [curve valueForKey:@"areas"])if([a[@"kind"]isEqual:@"channel"]&&[a[@"index"]integerValue]==1)red=[[a copy]autorelease];undo=base->_undoStarts;click(red);drain();
|
||||
run.record(@"viewer-curve-channel-switch-is-view-state-with-no-undo",[[curve valueForKey:@"channel"]integerValue]==1&&base->_undoStarts==undo);
|
||||
click(areaFor(controls,@"tool",@"grading"));id grading=panelFor(@"grading");NSDictionary*wheel=areaFor(grading,@"wheel",nil);NSRect wr=[wheel[@"rect"]rectValue];NSPoint wp=NSMakePoint(NSMidX(wr)+wr.size.width*.2,NSMidY(wr));undo=base->_undoStarts;
|
||||
[controls event:NSEventTypeLeftMouseDown point:wp atTime:host->_time];[controls event:NSEventTypeLeftMouseDragged point:NSMakePoint(NSMidX(wr),NSMidY(wr)-wr.size.width*.3)atTime:host->_time];[controls event:NSEventTypeLeftMouseUp point:NSMakePoint(NSMidX(wr),NSMidY(wr)-wr.size.width*.4)atTime:host->_time];drain();publish();
|
||||
run.record(@"viewer-grading-wheel-edits-hue-and-saturation-in-one-gesture",wheel&&fabs(value(@"grade0_0")-90)<1e-5&&fabs(value(@"grade0_1")-80)<1e-4&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1&&[[controls valueForKey:@"panels"]count]==3);
|
||||
click(areaFor(grading,@"graphMode",nil));run.record(@"viewer-graph-panel-retains-precise-parameter-view",areaFor(grading,@"slider",nil)&&!areaFor(grading,@"wheel",nil));
|
||||
NSRect modeRect=[areaFor(grading,@"graphMode",nil)[@"rect"]rectValue],nextRect=[areaFor(grading,@"next",nil)[@"rect"]rectValue];run.record(@"viewer-graph-mode-and-page-buttons-never-overlap",!NSIntersectsRect(modeRect,nextRect));
|
||||
click(areaFor(grading,@"close",nil));run.record(@"viewer-closing-one-panel-preserves-other-graph-and-controls",!panelFor(@"grading")&&panelFor(@"curve")&&panelFor(@"base"));
|
||||
// A repeated curve layer selects its UUID, rather than redirecting writes to root.
|
||||
NSMutableDictionary*doc=DYMutablePlist(DYReadTools(host,host->_time).document);NSDictionary*layer=DYInsertTool(doc,@"curve",@"base:curve");NSString*layerID=[[layer[@"id"]copy]autorelease];DYWriteTools(host,doc,host->_time);publish();
|
||||
// Raise curve with an inert header click twice (collapse/reopen), then layer menu.
|
||||
click(areaFor(curve,@"open",nil));click(areaFor(curve,@"open",nil));click(areaFor(curve,@"catalog",nil));NSDictionary*module=areaFor(curve,@"module",layerID);click(module);
|
||||
run.record(@"viewer-floating-editor-layer-menu-selects-only-its-tool-type",module&&[[curve valueForKey:@"nodeID"]isEqual:layerID]&&[[curve valueForKey:@"nodes"]count]==2);
|
||||
plot=[areaFor(curve,@"curvePlot",nil)[@"rect"]rectValue];point=NSMakePoint(NSMidX(plot),NSMidY(plot));[controls event:NSEventTypeLeftMouseDown point:point atTime:host->_time];[controls prepareWithSize:size scale:1 atTime:CMTimeMake(1,24)];
|
||||
run.record(@"viewer-playhead-change-clears-graphic-capture",![controls capturing]);
|
||||
run.record(@"viewer-missing-next-frame-snapshot-preserves-selected-independent-layer",[[curve valueForKey:@"nodeID"]isEqual:layerID]&&!areaFor(curve,@"curvePlot",nil));
|
||||
host->_time=CMTimeMake(1,24);publish();run.record(@"viewer-new-frame-restores-the-same-independent-editor-target",[[curve valueForKey:@"nodeID"]isEqual:layerID]&&areaFor(curve,@"curvePlot",nil));host->_time=kCMTimeZero;publish();
|
||||
doc=DYMutablePlist(DYReadTools(host,host->_time).document);DYRemoveTool(doc,layerID);DYWriteTools(host,doc,host->_time);publish();run.record(@"viewer-deleted-layer-falls-back-to-surviving-same-tool",[[curve valueForKey:@"nodeID"]isEqual:@"base:curve"]);
|
||||
click(areaFor(controls,@"hidePanels",nil));BOOL bounded=YES;
|
||||
for(NSSize next:{NSMakeSize(120,80),NSMakeSize(180,200),NSMakeSize(320,240),NSMakeSize(1000,462),NSMakeSize(1280,720)})for(CGFloat scale:{1.,2.}){[controls setViewport:NSMakeRect(0,0,next.width,next.height)];[controls prepareWithSize:next scale:scale atTime:host->_time];for(NSDictionary*a in [controls valueForKey:@"areas"])bounded&=NSContainsRect(NSMakeRect(0,0,next.width,next.height),[a[@"rect"]rectValue]);bounded&=[controls partAtPoint:NSMakePoint(-1,20)]==0&&[controls partAtPoint:NSMakePoint(next.width+1,20)]==0&&[controls partAtPoint:NSMakePoint(30,next.height+1)]==0;}
|
||||
run.record(@"viewer-small-and-retina-canvases-never-hit-outside-visible-image",bounded);
|
||||
[controls setViewport:NSMakeRect(0,0,180,200)];[controls prepareWithSize:NSMakeSize(180,200)scale:1 atTime:host->_time];click(areaFor(controls,@"tool",@"base"));NSDictionary*railEntry=areaFor(controls,@"tool",@"base");NSRect entryRect=[railEntry[@"rect"]rectValue];run.record(@"viewer-vertical-entry-remains-reachable-above-overlapping-small-panel",[controls partAtPoint:NSMakePoint(NSMidX(entryRect),NSMidY(entryRect))]==[railEntry[@"part"]integerValue]);
|
||||
click(areaFor(controls,@"hidePanels",nil));
|
||||
|
||||
[controls setViewport:NSMakeRect(40,30,1160,650)];[controls prepareWithSize:size scale:1 atTime:host->_time];NSRect rail=[[controls valueForKey:@"rail"]rectValue];run.record(@"viewer-rail-is-anchored-to-image-and-not-letterbox",NSContainsRect(NSMakeRect(40,30,1160,650),rail)&&[controls partAtPoint:NSMakePoint(NSMidX(rail),20)]==0);
|
||||
// Offscreen drawing checks the actual OSC renderer, without opening an APP.
|
||||
[controls setViewport:NSMakeRect(0,0,1280,720)];[controls prepareWithSize:size scale:1 atTime:host->_time];
|
||||
for(NSString*type in @[@"base",@"curve",@"grading"]){click(areaFor(controls,@"tool",type));id p=panelFor(type);CGFloat px=[type isEqual:@"base"]?.05:[type isEqual:@"curve"]?.32:.59;[p setValue:[NSValue valueWithPoint:NSMakePoint(px,.1)]forKey:@"position"];}
|
||||
[controls prepareWithSize:size scale:1 atTime:host->_time];
|
||||
NSBitmapImageRep*bitmap=[[[NSBitmapImageRep alloc]initWithBitmapDataPlanes:NULL pixelsWide:1280 pixelsHigh:720 bitsPerSample:8 samplesPerPixel:4 hasAlpha:YES isPlanar:NO colorSpaceName:NSDeviceRGBColorSpace bytesPerRow:1280*4 bitsPerPixel:32]autorelease];
|
||||
[NSGraphicsContext saveGraphicsState];[NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithBitmapImageRep:bitmap]];NSAffineTransform*flip=[NSAffineTransform transform];[flip translateXBy:0 yBy:720];[flip scaleXBy:1 yBy:-1];[flip concat];[NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithCGContext:NSGraphicsContext.currentContext.CGContext flipped:YES]];
|
||||
[[NSColor colorWithCalibratedWhite:.2 alpha:1]setFill];NSRectFill(NSMakeRect(0,0,1280,720));[controls draw];[NSGraphicsContext restoreGraphicsState];NSString*png=[runtime stringByAppendingPathComponent:@"viewer-workspace.png"];
|
||||
run.record(@"viewer-real-osc-draws-vertical-rail-curves-and-wheels-offscreen",[[bitmap representationUsingType:NSBitmapImageFileTypePNG properties:@{}]writeToFile:png atomically:YES],@{@"path":png});
|
||||
[controls finishCapture];controls.bridge=nil;[bridge invalidate];drain();[controls release];[bridge release];
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
@protocol DYViewerControlsProbe
|
||||
@property(nonatomic,retain) id<DYViewerParameterProbe> bridge;
|
||||
- (void)setViewport:(NSRect)viewport;
|
||||
- (void)prepareWithSize:(NSSize)size scale:(CGFloat)scale atTime:(CMTime)time;
|
||||
- (void)draw;
|
||||
- (NSInteger)partAtPoint:(NSPoint)point;
|
||||
- (BOOL)event:(NSEventType)type point:(NSPoint)point atTime:(CMTime)time;
|
||||
- (BOOL)mouseMoved:(NSPoint)point;
|
||||
- (BOOL)mouseExited;
|
||||
- (BOOL)capturing;
|
||||
- (BOOL)finishCapture;
|
||||
- (id)valueForKey:(NSString*)key;
|
||||
@end
|
||||
|
||||
@interface NSObject (DYMaskToolbarDiagnosticGeometry)
|
||||
- (NSRect)toolbarRectForItem:(NSInteger)item;
|
||||
@end
|
||||
@@ -0,0 +1,71 @@
|
||||
// Methods of DYViewerParameterPanel. Geometry is shared by drawing and input.
|
||||
- (double)graphicValue:(NSString*)key{return [self valueForDescriptor:[self descriptorForKey:key]];}
|
||||
- (NSArray*)curveSlots{
|
||||
NSMutableArray*slots=[NSMutableArray array];NSInteger n=_channel==0?4:2;
|
||||
for(NSInteger i=0;i<n;i++)[slots addObject:@{@"xKey":_channel==0?[NSString stringWithFormat:@"masterX%ld",(long)i]:[NSString stringWithFormat:@"channel%ldX%ld",(long)_channel-1,(long)i],@"yKey":[NSString stringWithFormat:@"curveY%ld",(long)(_channel==0?i:4+(_channel-1)*2+i)]}];
|
||||
for(NSInteger i=0;i<4;i++)[slots addObject:@{@"xKey":[NSString stringWithFormat:@"curve%ldExtraX%ld",(long)_channel,(long)i],@"yKey":[NSString stringWithFormat:@"curve%ldExtra%ld",(long)_channel,(long)i]}];return slots;
|
||||
}
|
||||
- (NSArray*)curvePoints{
|
||||
NSMutableArray*points=[NSMutableArray array];for(NSDictionary*slot in [self curveSlots]){double x=[self graphicValue:slot[@"xKey"]];if(x<0)continue;[points addObject:@{@"xKey":slot[@"xKey"],@"yKey":slot[@"yKey"],@"x":@(x),@"y":@(MAX(0.,MIN(1.,x+[self graphicValue:slot[@"yKey"]]*.01)))}];}
|
||||
[points sortUsingComparator:^NSComparisonResult(NSDictionary*a,NSDictionary*b){return [a[@"x"]compare:b[@"x"]];}];return points;
|
||||
}
|
||||
- (void)layoutGraphicAt:(CGFloat)y{
|
||||
if(!_snapshot||![self node]||_panel.size.width<180*_scale||_panel.size.height<180*_scale)return;CGFloat s=_scale,x=_panel.origin.x,w=_panel.size.width;
|
||||
if([_toolType isEqual:@"curve"]){
|
||||
for(NSInteger c=0;c<4;c++)[self addArea:NSMakeRect(x+12*s+c*(w-24*s)/4,y,(w-30*s)/4,23*s)part:22010+c kind:@"channel" title:@[@"RGB",@"红",@"绿",@"蓝"][c] descriptor:nil index:c];
|
||||
NSRect graph=NSMakeRect(x+18*s,y+31*s,w-36*s,MAX(45*s,NSMaxY(_panel)-y-84*s));[self addArea:graph part:22000 kind:@"curvePlot" title:@"" descriptor:nil index:0];
|
||||
if(_selectedX)[self addArea:NSMakeRect(x+12*s,NSMaxY(_panel)-47*s,90*s,20*s)part:22020 kind:@"deletePoint" title:@"删除选中点" descriptor:nil index:0];
|
||||
}else{
|
||||
CGFloat diameter=MAX(20*s,MIN((w-48*s)/2,(NSMaxY(_panel)-y-52*s)/2-20*s));
|
||||
for(NSInteger i=0;i<4;i++){CGFloat cx=x+w*(i%2?.75:.25),top=y+(i/2)*(diameter+29*s);[self addArea:NSMakeRect(cx-diameter/2,top+20*s,diameter,diameter)part:22100+i kind:@"wheel" title:@[@"阴影",@"中间调",@"高光",@"全局"][i] descriptor:nil index:i];}
|
||||
}
|
||||
}
|
||||
- (NSPoint)curvePosition:(NSDictionary*)p rect:(NSRect)r{return NSMakePoint(r.origin.x+[p[@"x"]doubleValue]*r.size.width,r.origin.y+(1-[p[@"y"]doubleValue])*r.size.height);}
|
||||
- (void)drawGraphic:(NSDictionary*)area{
|
||||
CGFloat s=_scale;NSRect r=[area[@"rect"]rectValue];NSColor*ink=DYThemeColor(@"text"),*accent=DYThemeColor(@"accent");
|
||||
if([area[@"kind"]isEqual:@"wheel"]){
|
||||
NSInteger index=[area[@"index"]integerValue];[self text:area[@"title"]rect:NSMakeRect(r.origin.x,r.origin.y-19*s,r.size.width,17*s)size:10 color:ink alignment:NSTextAlignmentCenter];
|
||||
// Cached raster is generated from the same HSV convention as the renderer controls.
|
||||
static NSImage*wheel=nil;static dispatch_once_t once;dispatch_once(&once,^{NSInteger n=192;NSBitmapImageRep*b=[[[NSBitmapImageRep alloc]initWithBitmapDataPlanes:NULL pixelsWide:n pixelsHigh:n bitsPerSample:8 samplesPerPixel:4 hasAlpha:YES isPlanar:NO colorSpaceName:NSCalibratedRGBColorSpace bytesPerRow:n*4 bitsPerPixel:32]autorelease];
|
||||
for(NSInteger yy=0;yy<n;yy++)for(NSInteger xx=0;xx<n;xx++){double dx=(xx+.5-n*.5)/(n*.5-1),dy=(n*.5-yy-.5)/(n*.5-1),sat=hypot(dx,dy),h=atan2(dy,dx)/(2*M_PI);if(h<0)h++;NSColor*c=[NSColor colorWithSRGBRed:1 green:1 blue:1 alpha:1];c=[[NSColor colorWithHue:h saturation:MIN(1.,sat) brightness:1 alpha:1]colorUsingColorSpace:NSColorSpace.sRGBColorSpace];NSUInteger at=(yy*n+xx)*4;b.bitmapData[at]=lrint(c.redComponent*255);b.bitmapData[at+1]=lrint(c.greenComponent*255);b.bitmapData[at+2]=lrint(c.blueComponent*255);b.bitmapData[at+3]=sat<=1?230:0;}
|
||||
wheel=[[NSImage alloc]initWithSize:NSMakeSize(n,n)];[wheel addRepresentation:b];});
|
||||
[wheel drawInRect:r fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:.8 respectFlipped:YES hints:nil];
|
||||
double hue=[self graphicValue:[NSString stringWithFormat:@"grade%ld_0",(long)index]],sat=[self graphicValue:[NSString stringWithFormat:@"grade%ld_1",(long)index]],angle=hue*M_PI/180,rad=r.size.width*.5*sat/100;
|
||||
NSPoint p=NSMakePoint(NSMidX(r)+cos(angle)*rad,NSMidY(r)-sin(angle)*rad);[NSColor.blackColor setStroke];NSBezierPath*knob=[NSBezierPath bezierPathWithOvalInRect:NSMakeRect(p.x-5*s,p.y-5*s,10*s,10*s)];knob.lineWidth=3*s;[knob stroke];[NSColor.whiteColor setStroke];knob.lineWidth=1.4*s;[knob stroke];
|
||||
return;
|
||||
}
|
||||
DYDrawSoftControl(r,4*s,YES,NO,NO);[NSGraphicsContext saveGraphicsState];NSRectClip(r);
|
||||
[[ink colorWithAlphaComponent:.16]setStroke];NSBezierPath*grid=[NSBezierPath bezierPath];grid.lineWidth=.5*s;
|
||||
for(int i=0;i<5;i++){CGFloat x=r.origin.x+r.size.width*i/4,y=r.origin.y+r.size.height*i/4;[grid moveToPoint:NSMakePoint(x,NSMinY(r))];[grid lineToPoint:NSMakePoint(x,NSMaxY(r))];[grid moveToPoint:NSMakePoint(NSMinX(r),y)];[grid lineToPoint:NSMakePoint(NSMaxX(r),y)];}[grid stroke];
|
||||
[[ink colorWithAlphaComponent:.2]setStroke];NSBezierPath*diagonal=[NSBezierPath bezierPath];[diagonal moveToPoint:NSMakePoint(NSMinX(r),NSMaxY(r))];[diagonal lineToPoint:NSMakePoint(NSMaxX(r),NSMinY(r))];[diagonal stroke];
|
||||
// Identical monotone Hermite interpolation to the existing curve editor.
|
||||
NSArray*points=[self curvePoints];std::vector<NSPoint> p;p.push_back(NSMakePoint(0,0));for(NSDictionary*point in points)p.push_back(NSMakePoint([point[@"x"]doubleValue],[point[@"y"]doubleValue]));p.push_back(NSMakePoint(1,1));
|
||||
for(size_t i=1;i<p.size();i++)p[i].x=MAX(p[i].x,p[i-1].x+.0001);p.back().x=1;
|
||||
std::vector<double>slopes(p.size()-1),m(p.size());for(size_t i=0;i<slopes.size();i++)slopes[i]=(p[i+1].y-p[i].y)/MAX(.0001,p[i+1].x-p[i].x);m.front()=slopes.front();m.back()=slopes.back();for(size_t i=1;i+1<p.size();i++)m[i]=slopes[i-1]*slopes[i]>0?(slopes[i-1]+slopes[i])*.5:0;
|
||||
for(size_t i=0;i<slopes.size();i++){if(fabs(slopes[i])<.00001)m[i]=m[i+1]=0;else{double a=m[i]/slopes[i],b=m[i+1]/slopes[i],v=hypot(a,b);if(v>3){m[i]=3*slopes[i]*a/v;m[i+1]=3*slopes[i]*b/v;}}}
|
||||
NSBezierPath*curve=[NSBezierPath bezierPath];curve.lineWidth=1.8*s;size_t segment=0;
|
||||
for(int sample=0;sample<=256;sample++){double x=sample/256.;while(segment+2<p.size()&&x>p[segment+1].x)segment++;double width=MAX(.0001,p[segment+1].x-p[segment].x),t=MAX(0.,MIN(1.,(x-p[segment].x)/width)),t2=t*t,t3=t2*t;double y=(2*t3-3*t2+1)*p[segment].y+(t3-2*t2+t)*width*m[segment]+(-2*t3+3*t2)*p[segment+1].y+(t3-t2)*width*m[segment+1];NSPoint q=NSMakePoint(r.origin.x+x*r.size.width,r.origin.y+(1-MAX(0.,MIN(1.,y)))*r.size.height);if(sample==0)[curve moveToPoint:q];else[curve lineToPoint:q];}
|
||||
NSColor*color=_channel==0?accent:_channel==1?NSColor.systemRedColor:_channel==2?NSColor.systemGreenColor:NSColor.systemBlueColor;[color setStroke];[curve stroke];
|
||||
for(NSDictionary*point in points){NSPoint q=[self curvePosition:point rect:r];BOOL selected=[point[@"xKey"]isEqual:_selectedX];[color setFill];NSBezierPath*dot=[NSBezierPath bezierPathWithOvalInRect:NSMakeRect(q.x-4*s,q.y-4*s,8*s,8*s)];[dot fill];[(selected?NSColor.whiteColor:ink)setStroke];dot.lineWidth=(selected?2:1)*s;[dot stroke];}
|
||||
[NSGraphicsContext restoreGraphicsState];[self text:@"0 输入 → 1" rect:NSMakeRect(r.origin.x,NSMaxY(r)+2*s,r.size.width,14*s)size:8 color:ink alignment:NSTextAlignmentCenter];
|
||||
}
|
||||
- (void)beginGraphicAt:(NSPoint)p{
|
||||
if(!_snapshot||![self node])return;NSMutableDictionary*c=[[_captured mutableCopy]autorelease];NSRect r=[c[@"rect"]rectValue];NSString*xKey=nil,*yKey=nil;
|
||||
if([c[@"kind"]isEqual:@"curvePlot"]){NSDictionary*nearest=nil;double distance=12*_scale;for(NSDictionary*point in [self curvePoints]){NSPoint q=[self curvePosition:point rect:r];double d=hypot(q.x-p.x,q.y-p.y);if(d<distance){distance=d;nearest=point;}}
|
||||
if(!nearest)for(NSDictionary*slot in [self curveSlots])if([self graphicValue:slot[@"xKey"]]<0){nearest=slot;break;}
|
||||
if(!nearest)return;xKey=nearest[@"xKey"];yKey=nearest[@"yKey"];[_selectedX release];_selectedX=[xKey copy];c[@"newPoint"]=@([self graphicValue:xKey]<0);
|
||||
}else{if(hypot(p.x-NSMidX(r),p.y-NSMidY(r))>r.size.width*.5)return;NSInteger i=[c[@"index"]integerValue];xKey=[NSString stringWithFormat:@"grade%ld_0",(long)i];yKey=[NSString stringWithFormat:@"grade%ld_1",(long)i];}
|
||||
NSDictionary*xd=[self descriptorForKey:xKey],*yd=[self descriptorForKey:yKey];if(!xd||!yd)return;c[@"xKey"]=xKey;c[@"yKey"]=yKey;
|
||||
[_captured release];_captured=[c copy];NSDictionary*values=@{xKey:@([self graphicValue:xKey]),yKey:@([self graphicValue:yKey])};[_bridge beginParameters:@[xd,yd]node:_nodeID values:values atTime:_time];
|
||||
if([c[@"newPoint"]boolValue]||[c[@"kind"]isEqual:@"wheel"])[self updateGraphicAt:p];
|
||||
}
|
||||
- (void)updateGraphicAt:(NSPoint)p{
|
||||
NSString*xKey=_captured[@"xKey"],*yKey=_captured[@"yKey"];if(!xKey||!yKey)return;NSRect r=[_captured[@"rect"]rectValue];double x,y;
|
||||
if([_captured[@"kind"]isEqual:@"curvePlot"]){x=MAX(.001,MIN(.999,(p.x-r.origin.x)/MAX(1.,r.size.width)));double output=MAX(0.,MIN(1.,1-(p.y-r.origin.y)/MAX(1.,r.size.height)));
|
||||
for(NSDictionary*point in [self curvePoints])if(![point[@"xKey"]isEqual:xKey]){double other=[point[@"x"]doubleValue];if(fabs(x-other)<.001)x=x<other?other-.001:other+.001;}x=MAX(.001,MIN(.999,x));y=(output-x)*100;
|
||||
}else{double dx=p.x-NSMidX(r),dy=NSMidY(r)-p.y;x=atan2(dy,dx)*180/M_PI;if(x<0)x+=360;y=MIN(100.,hypot(dx,dy)/(r.size.width*.5)*100);}
|
||||
NSDictionary*values=@{xKey:@(x),yKey:@(y)};[_draftValues addEntriesFromDictionary:values];[_bridge changeValues:values];
|
||||
}
|
||||
- (void)deleteSelectedPoint{
|
||||
if(!_selectedX)return;for(NSDictionary*point in [self curvePoints])if([point[@"xKey"]isEqual:_selectedX]){NSString*x=point[@"xKey"],*y=point[@"yKey"];[_bridge beginParameters:@[[self descriptorForKey:x],[self descriptorForKey:y]]node:_nodeID values:@{x:@([self graphicValue:x]),y:@([self graphicValue:y])}atTime:_time];[_bridge changeValues:@{x:@(-1),y:@0}];[_bridge endGesture];break;}[_selectedX release];_selectedX=nil;
|
||||
}
|
||||
@@ -0,0 +1,275 @@
|
||||
// The OSC side publishes values and enqueues intent. Only the main queue enters
|
||||
// host actions; no OSC/render callback waits for AppKit or a host model write.
|
||||
@interface DYViewerParameterBridge : NSObject
|
||||
- (instancetype)initWithAPIManager:(id<PROAPIAccessing>)manager;
|
||||
- (void)publishUniforms:(const DYUniforms*)uniforms document:(NSDictionary*)document atTime:(CMTime)time;
|
||||
- (NSDictionary*)snapshotAtTime:(CMTime)time;
|
||||
- (void)beginParameter:(NSDictionary*)descriptor node:(NSString*)nodeID value:(double)value atTime:(CMTime)time;
|
||||
- (void)changeValue:(double)value;
|
||||
- (void)beginParameters:(NSArray<NSDictionary*>*)descriptors node:(NSString*)nodeID values:(NSDictionary<NSString*,NSNumber*>*)values atTime:(CMTime)time;
|
||||
// Every sample supplies every key selected by beginParameters. Invalid or
|
||||
// incomplete samples are rejected as a unit, before the first host write.
|
||||
- (void)changeValues:(NSDictionary<NSString*,NSNumber*>*)values;
|
||||
- (void)endGesture;
|
||||
// Call before the owning plug-in releases this object during teardown.
|
||||
- (void)invalidate;
|
||||
- (void)requestWorkspace;
|
||||
@end
|
||||
|
||||
static BOOL DYViewerSameValue(double a,double b) {
|
||||
return std::isfinite(a)&&std::isfinite(b)&&fabs(a-b)<=1e-6*MAX(1.,MAX(fabs(a),fabs(b)));
|
||||
}
|
||||
static NSDictionary *DYViewerCanonicalDescriptor(NSDictionary *candidate) {
|
||||
if(![candidate isKindOfClass:NSDictionary.class])return nil;
|
||||
for(NSDictionary *d in DYDescriptors())if([d[@"pid"]isEqual:candidate[@"pid"]]&&[d[@"key"]isEqual:candidate[@"key"]])return d;
|
||||
return nil;
|
||||
}
|
||||
static BOOL DYViewerDescriptorBelongsToType(NSDictionary *d,NSString *type) {
|
||||
if(!type.length)return NO;
|
||||
for(NSDictionary *owned in DYBaseToolDescriptors(type))if([owned[@"pid"]isEqual:d[@"pid"]])return YES;
|
||||
return NO;
|
||||
}
|
||||
static BOOL DYViewerSanitizeValue(NSDictionary *d,double input,double *output) {
|
||||
if(!d||!std::isfinite(input))return NO;
|
||||
double lo=[d[@"min"]doubleValue],hi=[d[@"max"]doubleValue],v=MAX(lo,MIN(hi,input));
|
||||
if(!std::isfinite(lo)||!std::isfinite(hi)||hi<lo)return NO;
|
||||
if([d[@"kind"]isEqual:@"bool"])v=v>=.5?1:0;
|
||||
else if([d[@"kind"]isEqual:@"popup"]){
|
||||
// A popup is an enum, not a continuous range. Unknown choices must not
|
||||
// silently turn into the first/last item when a stale event is received.
|
||||
v=round(input);NSArray *values=d[@"values"];
|
||||
if(values){BOOL found=NO;for(NSNumber *number in values)if(DYViewerSameValue(v,number.doubleValue)){v=number.doubleValue;found=YES;break;}if(!found)return NO;}
|
||||
else if(v<0||v>=(double)[d[@"options"]count])return NO;
|
||||
if(v<lo||v>hi)return NO;
|
||||
}
|
||||
if(output)*output=v;return YES;
|
||||
}
|
||||
|
||||
@implementation DYViewerParameterBridge {
|
||||
id<PROAPIAccessing> _apiManager;
|
||||
NSDictionary *_snapshot,*_sourceDocument;
|
||||
CMTime _snapshotTime;
|
||||
BOOL _invalidated,_validationScheduled;
|
||||
uint64_t _requestSequence,_requestedGesture;
|
||||
|
||||
// The fields below are confined to the main queue.
|
||||
id<PROAPIAccessing> _writerHost,_writerTarget;
|
||||
NSArray *_writerDescriptors;
|
||||
NSDictionary *_writerLastValues,*_writerCompanions;
|
||||
NSString *_writerNode,*_writerType;
|
||||
CMTime _writerTime;
|
||||
uint64_t _writerGesture;
|
||||
BOOL _writerUndoOpen;
|
||||
}
|
||||
- (instancetype)initWithAPIManager:(id<PROAPIAccessing>)manager {
|
||||
if((self=[super init])){_apiManager=manager;_snapshotTime=kCMTimeInvalid;_writerTime=kCMTimeInvalid;}return self;
|
||||
}
|
||||
- (void)dealloc {
|
||||
// invalidate enqueues closure before the owner releases its final reference;
|
||||
// the queued block keeps the bridge alive until its host group is closed.
|
||||
NSCAssert(!_writerUndoOpen,@"Viewer parameter group must be closed before teardown");
|
||||
[_snapshot release];[_sourceDocument release];[_writerHost release];[_writerTarget release];
|
||||
[_writerDescriptors release];[_writerLastValues release];[_writerCompanions release];[_writerNode release];[_writerType release];[super dealloc];
|
||||
}
|
||||
- (void)requestWorkspace{
|
||||
dispatch_async(dispatch_get_main_queue(),^{id manager=nil;@synchronized(self){if(!_invalidated)manager=_apiManager;}if(manager)[NSNotificationCenter.defaultCenter postNotificationName:@"DYColorWorkspaceRequested" object:manager];});
|
||||
}
|
||||
- (void)publishUniforms:(const DYUniforms*)uniforms document:(NSDictionary*)document atTime:(CMTime)time {
|
||||
if(!uniforms||!document||!CMTIME_IS_NUMERIC(time))return;
|
||||
NSDictionary *frozen=nil;
|
||||
@synchronized(self){
|
||||
if(_invalidated)return;
|
||||
if(document==_sourceDocument&&![document isKindOfClass:NSMutableDictionary.class])frozen=[_snapshot[@"document"]retain];
|
||||
}
|
||||
if(!frozen){
|
||||
DYToolDocument *copy=[[[DYToolDocument alloc]init]autorelease];
|
||||
if(!DYValidToolDocument(document))return;copy.document=document;frozen=[copy.document retain];
|
||||
}
|
||||
NSData *bytes=[NSData dataWithBytes:uniforms length:sizeof(*uniforms)];BOOL validate=NO;
|
||||
@synchronized(self){
|
||||
if(!_invalidated){
|
||||
[_snapshot release];_snapshot=[@{@"uniforms":bytes,@"document":frozen,@"timeValue":@(time.value),@"timeScale":@(time.timescale),@"timeEpoch":@(time.epoch)}copy];
|
||||
[_sourceDocument release];_sourceDocument=[document retain];_snapshotTime=time;
|
||||
if(_requestedGesture&&!_validationScheduled){_validationScheduled=YES;validate=YES;}
|
||||
}
|
||||
}
|
||||
[frozen release];
|
||||
if(validate)dispatch_async(dispatch_get_main_queue(),^{
|
||||
@synchronized(self){self->_validationScheduled=NO;}
|
||||
if(self->_writerGesture&&![self writerStillValid])[self closeWriter];
|
||||
});
|
||||
}
|
||||
- (NSDictionary*)snapshotAtTime:(CMTime)time {
|
||||
@synchronized(self){
|
||||
if(_invalidated||!CMTIME_IS_NUMERIC(time)||!CMTIME_IS_NUMERIC(_snapshotTime)||CMTimeCompare(time,_snapshotTime)!=0)return nil;
|
||||
return [[_snapshot retain]autorelease];
|
||||
}
|
||||
}
|
||||
- (void)closeWriter {
|
||||
NSCAssert(NSThread.isMainThread,@"Host writes require the main queue");
|
||||
if(_writerUndoOpen){
|
||||
id<FxCustomParameterActionAPI_v4>action=[_writerHost apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];
|
||||
[action startAction:self];@try{[[_writerHost apiForProtocol:@protocol(FxUndoAPI)]endUndoGroup];}@finally{[action endAction:self];}
|
||||
}
|
||||
_writerUndoOpen=NO;_writerGesture=0;_writerTime=kCMTimeInvalid;
|
||||
[_writerHost release];_writerHost=nil;[_writerTarget release];_writerTarget=nil;
|
||||
[_writerDescriptors release];_writerDescriptors=nil;[_writerLastValues release];_writerLastValues=nil;
|
||||
[_writerCompanions release];_writerCompanions=nil;
|
||||
[_writerNode release];_writerNode=nil;[_writerType release];_writerType=nil;
|
||||
}
|
||||
- (BOOL)writerNodeExists {
|
||||
NSDictionary *doc=DYReadTools(_writerHost,_writerTime).document;
|
||||
if([_writerNode hasPrefix:@"base:"])return !DYBaseToolRemoved(doc,_writerType);
|
||||
NSDictionary *node=DYToolWithID(doc,_writerNode);return node&&[node[@"type"]isEqual:_writerType];
|
||||
}
|
||||
- (BOOL)writerValueMatches {
|
||||
if(![self writerNodeExists])return NO;
|
||||
id<FxParameterRetrievalAPI_v6>get=[_writerTarget apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];
|
||||
for(NSDictionary *d in _writerDescriptors){double value=NAN;
|
||||
if(![get getFloatValue:&value fromParameter:[d[@"pid"]unsignedIntValue] atTime:_writerTime]||!DYViewerSameValue(value,[_writerLastValues[d[@"key"]]doubleValue]))return NO;
|
||||
}
|
||||
// Primary scalar edits also touch configuration/bypass switches. A later
|
||||
// external change to any of those switches must win over this live drag.
|
||||
for(NSNumber *pid in _writerCompanions){double companion=NAN;if(![get getFloatValue:&companion fromParameter:pid.unsignedIntValue atTime:_writerTime]||!DYViewerSameValue(companion,[_writerCompanions[pid]doubleValue]))return NO;}
|
||||
return YES;
|
||||
}
|
||||
- (BOOL)writerStillValid {
|
||||
if(!_writerGesture)return NO;BOOL active;
|
||||
@synchronized(self){active=!_invalidated;}
|
||||
if(!active)return NO;
|
||||
id<FxCustomParameterActionAPI_v4>action=[_writerTarget apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];if(!action)return NO;
|
||||
BOOL valid=NO;[action startAction:self];@try{
|
||||
valid=CMTIME_IS_NUMERIC(action.currentTime)&&CMTimeCompare(action.currentTime,_writerTime)==0&&[self writerValueMatches];
|
||||
}@finally{[action endAction:self];}return valid;
|
||||
}
|
||||
- (void)beginParameter:(NSDictionary*)descriptor node:(NSString*)nodeID value:(double)value atTime:(CMTime)time {
|
||||
NSDictionary *d=DYViewerCanonicalDescriptor(descriptor);if(!d)return;
|
||||
[self beginParameters:@[d] node:nodeID values:@{d[@"key"]:@(value)} atTime:time];
|
||||
}
|
||||
- (void)beginParameters:(NSArray<NSDictionary*>*)descriptors node:(NSString*)nodeID values:(NSDictionary<NSString*,NSNumber*>*)values atTime:(CMTime)time {
|
||||
if(![descriptors isKindOfClass:NSArray.class]||!descriptors.count||descriptors.count>DYDescriptors().count||![values isKindOfClass:NSDictionary.class]||values.count!=descriptors.count||![nodeID isKindOfClass:NSString.class]||!CMTIME_IS_NUMERIC(time))return;
|
||||
NSMutableArray *canonical=[NSMutableArray array];NSMutableDictionary *original=[NSMutableDictionary dictionary];NSMutableSet *pids=[NSMutableSet set];
|
||||
for(NSDictionary *candidate in descriptors){
|
||||
NSDictionary *d=DYViewerCanonicalDescriptor(candidate);NSNumber *number=d?values[d[@"key"]]:nil;double sanitized=0;
|
||||
if(!d||original[d[@"key"]]||[pids containsObject:d[@"pid"]]||![number isKindOfClass:NSNumber.class]||!DYViewerSanitizeValue(d,number.doubleValue,&sanitized))return;
|
||||
[canonical addObject:d];[pids addObject:d[@"pid"]];original[d[@"key"]]=@(sanitized);
|
||||
}
|
||||
NSString *node=[nodeID copy];NSArray *selected=[canonical copy];NSDictionary *initial=[original copy];uint64_t gesture;
|
||||
@synchronized(self){if(_invalidated){[node release];[selected release];[initial release];return;}_requestedGesture=gesture=++_requestSequence;}
|
||||
dispatch_async(dispatch_get_main_queue(),^{
|
||||
[self closeWriter];id<PROAPIAccessing>host=nil;
|
||||
@synchronized(self){if(!self->_invalidated)host=[self->_apiManager retain];}
|
||||
if(!host)return;
|
||||
id<FxCustomParameterActionAPI_v4>action=[host apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];
|
||||
if(!action){[host release];return;}
|
||||
id<PROAPIAccessing>target=nil;NSString *type=nil;
|
||||
[action startAction:self];@try{
|
||||
if(CMTIME_IS_NUMERIC(action.currentTime)&&CMTimeCompare(action.currentTime,time)==0){
|
||||
NSDictionary *doc=DYReadTools(host,time).document;
|
||||
if([node hasPrefix:@"base:"]){type=[node substringFromIndex:5];if([DYToolTypes()containsObject:type]&&!DYBaseToolRemoved(doc,type))target=[host retain];}
|
||||
else{NSDictionary *layer=DYToolWithID(doc,node);if(layer){type=layer[@"type"];target=[[DYToolManager alloc]initWithHost:host node:layer];}}
|
||||
for(NSDictionary *d in selected)if(!DYViewerDescriptorBelongsToType(d,type)){[target release];target=nil;break;}
|
||||
type=[type copy];
|
||||
}
|
||||
}@finally{[action endAction:self];}
|
||||
if(target){
|
||||
self->_writerHost=host;self->_writerTarget=target;self->_writerDescriptors=[selected retain];self->_writerLastValues=[initial retain];self->_writerNode=[node copy];self->_writerType=type;
|
||||
self->_writerTime=time;self->_writerGesture=gesture;
|
||||
if(![self writerStillValid])[self closeWriter];
|
||||
}else{[type release];[host release];}
|
||||
});
|
||||
[node release];[selected release];[initial release];
|
||||
}
|
||||
- (void)writeValues:(NSDictionary<NSString*,NSNumber*>*)values gesture:(uint64_t)gesture {
|
||||
NSCAssert(NSThread.isMainThread,@"Host writes require the main queue");
|
||||
if(!_writerGesture||gesture!=_writerGesture||values.count!=_writerDescriptors.count)return;
|
||||
NSMutableDictionary *desired=[NSMutableDictionary dictionary];BOOL anyChanged=NO,primaryValue=NO,blackWhite=NO;NSString *workingKey=nil;
|
||||
NSMutableSet *explicitPids=[NSMutableSet set];
|
||||
for(NSDictionary *d in _writerDescriptors){
|
||||
NSString *key=d[@"key"];NSNumber *number=values[key];double v=0;
|
||||
if(![number isKindOfClass:NSNumber.class]||!DYViewerSanitizeValue(d,number.doubleValue,&v))return;
|
||||
desired[key]=@(v);[explicitPids addObject:d[@"pid"]];
|
||||
if(!DYViewerSameValue(v,[_writerLastValues[key]doubleValue])){
|
||||
anyChanged=YES;
|
||||
primaryValue|=[key hasPrefix:@"cm"]&&![key hasPrefix:@"cmbypass"]&&![key isEqual:@"cmConfigured"]&&![key hasSuffix:@"Enabled"];
|
||||
blackWhite|=[key isEqual:@"blackWhiteMix"];
|
||||
if([@[@"cmworkingTransfer",@"cmworkingGamut"]containsObject:key])workingKey=key;
|
||||
}
|
||||
}
|
||||
BOOL active;@synchronized(self){active=!_invalidated;}if(!active){[self closeWriter];return;}
|
||||
id<FxCustomParameterActionAPI_v4>action=[_writerTarget apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];
|
||||
if(!action){[self closeWriter];return;}BOOL conflict=NO,changed=NO,failed=NO;
|
||||
[action startAction:self];@try{
|
||||
conflict=!CMTIME_IS_NUMERIC(action.currentTime)||CMTimeCompare(action.currentTime,_writerTime)!=0||![self writerValueMatches];
|
||||
if(!conflict&&anyChanged){
|
||||
id<FxUndoAPI>undo=[_writerHost apiForProtocol:@protocol(FxUndoAPI)];
|
||||
NSString *title=_writerDescriptors.count==1?_writerDescriptors[0][@"title"]:@"图形控件";
|
||||
if(!_writerUndoOpen)_writerUndoOpen=[undo startUndoGroup:[@"画面调整 · " stringByAppendingString:title?:@"调色"]];
|
||||
if(_writerUndoOpen){
|
||||
id<FxParameterSettingAPI_v6>set=[_writerTarget apiForProtocol:@protocol(FxParameterSettingAPI_v6)];
|
||||
id<FxParameterRetrievalAPI_v6>get=[_writerTarget apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];
|
||||
NSMutableDictionary *before=[NSMutableDictionary dictionary];
|
||||
for(NSDictionary *d in _writerDescriptors)before[d[@"pid"]]=_writerLastValues[d[@"key"]];
|
||||
DYInspectorToken *old=nil;
|
||||
if(primaryValue||blackWhite){
|
||||
[get getCustomParameterValue:&old fromParameter:DYInspectorParameterID atTime:_writerTime];
|
||||
for(NSDictionary *r in DYDescriptors())if([r[@"key"]isEqual:@"cmConfigured"]||(primaryValue&&[r[@"key"]hasPrefix:@"cmbypass"])){double previous=NAN;if([get getFloatValue:&previous fromParameter:[r[@"pid"]unsignedIntValue] atTime:_writerTime]&&std::isfinite(previous))before[r[@"pid"]]=@(previous);}
|
||||
}
|
||||
// Prevalidation and conflict checks cover the entire batch. Both axes are
|
||||
// set inside this one action; an independent layer commits one document.
|
||||
for(NSDictionary *d in _writerDescriptors)if(![set setFloatValue:[desired[d[@"key"]]doubleValue] toParameter:[d[@"pid"]unsignedIntValue] atTime:_writerTime]){failed=YES;break;}
|
||||
if(!failed&&(primaryValue||blackWhite)){
|
||||
// Explicit switches in the batch remain literal switches. Automatic CST
|
||||
// companions never overwrite a requested eye/configuration/bypass value.
|
||||
if(primaryValue){
|
||||
if(![explicitPids containsObject:@2236])failed|=![set setFloatValue:1 toParameter:2236 atTime:_writerTime];
|
||||
for(NSDictionary *r in DYDescriptors())if([r[@"key"]hasPrefix:@"cmbypass"]&&![explicitPids containsObject:r[@"pid"]])failed|=![set setFloatValue:0 toParameter:[r[@"pid"]unsignedIntValue] atTime:_writerTime];
|
||||
}else if(old.schema<2&&![explicitPids containsObject:@2236]){double configured=0;[get getFloatValue:&configured fromParameter:2236 atTime:_writerTime];if(configured<.5)failed|=![set setFloatValue:-1 toParameter:2236 atTime:_writerTime];}
|
||||
if(!failed&&old&&old.schema<2){DYInspectorToken *token=[[old copy]autorelease];token.schema=2;failed|=![set setCustomParameterValue:token toParameter:DYInspectorParameterID atTime:_writerTime];}
|
||||
}
|
||||
if(failed){
|
||||
// The host API has no abortAction. Restore all affected fields before
|
||||
// ending the action rather than leaving half a graphic update behind.
|
||||
for(NSNumber *pid in before)[set setFloatValue:[before[pid]doubleValue] toParameter:pid.unsignedIntValue atTime:_writerTime];
|
||||
if(old)[set setCustomParameterValue:old toParameter:DYInspectorParameterID atTime:_writerTime];
|
||||
}else{
|
||||
if(workingKey)DYPrimaryControlChanged(_writerTarget,_writerTime,workingKey);
|
||||
NSMutableDictionary *actual=[NSMutableDictionary dictionary];
|
||||
for(NSDictionary *d in _writerDescriptors){double v=[desired[d[@"key"]]doubleValue];[get getFloatValue:&v fromParameter:[d[@"pid"]unsignedIntValue] atTime:_writerTime];actual[d[@"key"]]=@(v);}
|
||||
[_writerLastValues release];_writerLastValues=[actual copy];changed=YES;
|
||||
if(primaryValue||blackWhite){
|
||||
NSMutableDictionary *companions=[NSMutableDictionary dictionary];
|
||||
for(NSDictionary *r in DYDescriptors())if([r[@"key"]isEqual:@"cmConfigured"]||(primaryValue&&[r[@"key"]hasPrefix:@"cmbypass"])){double related=NAN;if([get getFloatValue:&related fromParameter:[r[@"pid"]unsignedIntValue] atTime:_writerTime]&&std::isfinite(related))companions[r[@"pid"]]=@(related);}
|
||||
[_writerCompanions release];_writerCompanions=[companions copy];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}@finally{[action endAction:self];}
|
||||
if(conflict||failed)[self closeWriter];
|
||||
if(changed)[NSNotificationCenter.defaultCenter postNotificationName:DYModelChanged object:_apiManager];
|
||||
}
|
||||
- (void)changeValue:(double)value {
|
||||
if(!std::isfinite(value))return;uint64_t gesture;
|
||||
@synchronized(self){if(_invalidated)return;gesture=_requestedGesture;}
|
||||
if(gesture)dispatch_async(dispatch_get_main_queue(),^{if(self->_writerGesture==gesture&&self->_writerDescriptors.count==1)[self writeValues:@{self->_writerDescriptors[0][@"key"]:@(value)} gesture:gesture];});
|
||||
}
|
||||
- (void)changeValues:(NSDictionary<NSString*,NSNumber*>*)values {
|
||||
if(![values isKindOfClass:NSDictionary.class]||!values.count)return;
|
||||
// Copy only validated primitive input, so callers may reuse mutable samples.
|
||||
NSMutableDictionary *sample=[NSMutableDictionary dictionary];
|
||||
for(id key in values){id value=values[key];if(![key isKindOfClass:NSString.class]||![value isKindOfClass:NSNumber.class]||!std::isfinite([value doubleValue]))return;sample[[[key copy]autorelease]]=@([value doubleValue]);}
|
||||
NSDictionary *frozen=[sample copy];uint64_t gesture;
|
||||
@synchronized(self){if(_invalidated){[frozen release];return;}gesture=_requestedGesture;}
|
||||
if(gesture)dispatch_async(dispatch_get_main_queue(),^{[self writeValues:frozen gesture:gesture];});
|
||||
[frozen release];
|
||||
}
|
||||
- (void)endGesture {
|
||||
uint64_t gesture;@synchronized(self){gesture=_requestedGesture;_requestedGesture=0;}
|
||||
if(gesture)dispatch_async(dispatch_get_main_queue(),^{if(self->_writerGesture==gesture)[self closeWriter];});
|
||||
}
|
||||
- (void)invalidate {
|
||||
@synchronized(self){if(_invalidated)return;_invalidated=YES;_requestedGesture=0;_apiManager=nil;}
|
||||
dispatch_async(dispatch_get_main_queue(),^{[self closeWriter];});
|
||||
}
|
||||
@end
|
||||
@@ -0,0 +1,131 @@
|
||||
{
|
||||
// Exercise the real bridge on a fake host; the values pass through the same
|
||||
// float IDs and immutable independent-layer document used by the product.
|
||||
DYDiagnosticManager *base=[[[DYDiagnosticManager alloc]init]autorelease];DYCreateParameters(base,&error);
|
||||
DYToolCanvasProbe *host=[[[DYToolCanvasProbe alloc]init]autorelease];host->_base=base;host->_time=kCMTimeZero;
|
||||
id<DYViewerParameterProbe>bridge=(id)[[NSClassFromString(@"DYViewerParameterBridge")alloc]initWithAPIManager:host];
|
||||
auto drain=[](){double end=NSProcessInfo.processInfo.systemUptime+.025;while(NSProcessInfo.processInfo.systemUptime<end)[[NSRunLoop mainRunLoop]runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:.002]];};
|
||||
auto descriptor=[](NSString *key)->NSDictionary*{for(NSDictionary *d in DYDescriptors())if([d[@"key"]isEqual:key])return d;return nil;};
|
||||
auto value=[&](NSDictionary *d)->double{double v=NAN;[base getFloatValue:&v fromParameter:[d[@"pid"]unsignedIntValue] atTime:host->_time];return v;};
|
||||
NSDictionary *exposure=descriptor(@"exposure"),*grainHold=descriptor(@"filmGrainHold"),*primaryExposure=descriptor(@"cmexposure"),*primaryEye=descriptor(@"primaryMasterEnabled");
|
||||
DYUniforms u;DYReadUniforms(host,kCMTimeZero,&u);NSMutableDictionary *document=DYMutablePlist(DYReadTools(base,kCMTimeZero).document);
|
||||
[bridge publishUniforms:&u document:document atTime:kCMTimeZero];NSDictionary *snapshot=[bridge snapshotAtTime:kCMTimeZero];
|
||||
[document setObject:@[@"base"] forKey:@"removedBase"];
|
||||
run.record(@"viewer-bridge-published-snapshot-is-immutable-and-frame-bound",[snapshot[@"uniforms"]length]==sizeof(DYUniforms)&&![snapshot[@"document"][@"removedBase"]count]&&![bridge snapshotAtTime:CMTimeMake(1,24)]);
|
||||
int undo=base->_undoStarts;
|
||||
[bridge beginParameter:exposure node:@"base:base" value:0 atTime:kCMTimeZero];[bridge changeValue:.4];drain();
|
||||
run.record(@"viewer-bridge-drag-writes-before-mouse-up-asynchronously",fabs(value(exposure)-.4)<1e-6&&base->_undoStarts==undo+1&&base->_undoEnds==undo);
|
||||
[bridge changeValue:.8];[bridge endGesture];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-continuous-drag-closes-one-host-undo-group",fabs(value(exposure)-.8)<1e-6&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
|
||||
undo=base->_undoStarts;
|
||||
[bridge beginParameter:exposure node:@"base:base" value:.8 atTime:kCMTimeZero];[bridge changeValue:.8];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-no-op-gesture-does-not-create-an-undo",base->_undoStarts==undo&&base->_undoEnds==undo);
|
||||
[bridge beginParameter:exposure node:@"base:base" value:.8 atTime:kCMTimeZero];[bridge changeValue:NAN];[bridge changeValue:INFINITY];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-nonfinite-values-are-rejected",fabs(value(exposure)-.8)<1e-6&&base->_undoStarts==undo);
|
||||
[bridge beginParameter:exposure node:@"base:base" value:.8 atTime:kCMTimeZero];[bridge changeValue:1000];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-values-are-clamped-to-the-existing-parameter-domain",value(exposure)==[exposure[@"max"]doubleValue]);
|
||||
undo=base->_undoStarts;
|
||||
[bridge beginParameter:exposure node:@"base:base" value:value(exposure) atTime:kCMTimeZero];[bridge changeValue:1.1];drain();
|
||||
[base setFloatValue:2.1 toParameter:[exposure[@"pid"]unsignedIntValue] atTime:kCMTimeZero];
|
||||
[bridge changeValue:1.3];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-external-parameter-edit-wins-and-closes-the-group",fabs(value(exposure)-2.1)<1e-6&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
|
||||
undo=base->_undoStarts;
|
||||
[bridge beginParameter:exposure node:@"base:base" value:value(exposure) atTime:kCMTimeZero];[bridge changeValue:2.2];drain();
|
||||
host->_time=CMTimeMake(1,24);[bridge changeValue:2.8];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-playhead-change-does-not-write-to-a-new-frame",fabs(value(exposure)-2.2)<1e-6&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);host->_time=kCMTimeZero;
|
||||
undo=base->_undoStarts;
|
||||
[bridge beginParameter:exposure node:@"base:base" value:0 atTime:kCMTimeZero];[bridge changeValue:1.2];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-stale-snapshot-cannot-overwrite-current-values",fabs(value(exposure)-2.2)<1e-6&&base->_undoStarts==undo);
|
||||
[bridge beginParameter:grainHold node:@"base:film" value:1 atTime:kCMTimeZero];[bridge changeValue:3.4];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-popup-writes-an-existing-discrete-value",value(grainHold)==3);
|
||||
NSDictionary *densityMode=descriptor(@"filmDensityMode");undo=base->_undoStarts;
|
||||
[bridge beginParameter:densityMode node:@"base:film" value:2 atTime:kCMTimeZero];[bridge changeValue:0];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-popup-values-outside-the-enumeration-are-rejected",value(densityMode)==2&&base->_undoStarts==undo);
|
||||
[bridge beginParameter:primaryEye node:@"base:primary" value:value(primaryEye) atTime:kCMTimeZero];[bridge changeValue:0];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-primary-master-eye-is-not-reactivated-by-the-bridge",value(primaryEye)==0);
|
||||
[bridge beginParameter:primaryExposure node:@"base:primary" value:0 atTime:kCMTimeZero];[bridge changeValue:.3];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-primary-edit-preserves-master-bypass-and-configures-cst",fabs(value(primaryExposure)-.3)<1e-6&&value(primaryEye)==0&&[base->_values[@2236]doubleValue]==1);
|
||||
undo=base->_undoStarts;
|
||||
[bridge beginParameter:primaryExposure node:@"base:primary" value:.3 atTime:kCMTimeZero];[bridge changeValue:.4];drain();
|
||||
NSDictionary *bypass=descriptor(@"cmbypassExposure");[base setFloatValue:1 toParameter:[bypass[@"pid"]unsignedIntValue] atTime:kCMTimeZero];
|
||||
[bridge changeValue:.6];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-external-primary-bypass-is-not-cleared-by-a-later-drag",fabs(value(primaryExposure)-.4)<1e-6&&value(bypass)==1&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
|
||||
undo=base->_undoStarts;
|
||||
[bridge beginParameter:exposure node:@"base:base" value:value(exposure) atTime:kCMTimeZero];[bridge changeValue:2.3];drain();
|
||||
host->_time=CMTimeMake(1,24);DYReadUniforms(host,host->_time,&u);[bridge publishUniforms:&u document:DYReadTools(base,host->_time).document atTime:host->_time];drain();
|
||||
run.record(@"viewer-bridge-new-frame-publication-closes-an-abandoned-gesture",fabs(value(exposure)-2.3)<1e-6&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);[bridge endGesture];drain();host->_time=kCMTimeZero;
|
||||
undo=base->_undoStarts;
|
||||
[bridge beginParameter:exposure node:@"missing-layer" value:value(exposure) atTime:kCMTimeZero];[bridge changeValue:4];[bridge endGesture];
|
||||
[bridge beginParameter:exposure node:@"base:hsl" value:value(exposure) atTime:kCMTimeZero];[bridge changeValue:4];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-invalid-node-and-wrong-module-descriptors-do-not-write",fabs(value(exposure)-2.3)<1e-6&&base->_undoStarts==undo);
|
||||
|
||||
NSMutableDictionary *doc=DYMutablePlist(DYReadTools(base,kCMTimeZero).document);NSDictionary *layer=DYInsertTool(doc,@"base",@"base:base");NSString *layerID=layer[@"id"];
|
||||
DYWriteTools(base,doc,kCMTimeZero);double rootExposure=value(exposure);
|
||||
[bridge beginParameter:exposure node:layerID value:0 atTime:kCMTimeZero];[bridge changeValue:.65];[bridge endGesture];drain();
|
||||
NSDictionary *savedLayer=DYToolWithID(DYReadTools(base,kCMTimeZero).document,layerID);
|
||||
run.record(@"viewer-bridge-independent-layer-keeps-root-and-other-layers-isolated",fabs([savedLayer[@"values"][@"exposure"]doubleValue]-.65)<1e-6&&value(exposure)==rootExposure);
|
||||
undo=base->_undoStarts;
|
||||
[bridge beginParameter:exposure node:layerID value:.65 atTime:kCMTimeZero];[bridge changeValue:.75];drain();
|
||||
doc=DYMutablePlist(DYReadTools(base,kCMTimeZero).document);DYRemoveTool(doc,layerID);DYWriteTools(base,doc,kCMTimeZero);
|
||||
[bridge changeValue:.9];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-deleted-layer-is-not-recreated-by-a-pending-drag",!DYToolWithID(DYReadTools(base,kCMTimeZero).document,layerID)&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1&&value(exposure)==rootExposure);
|
||||
undo=base->_undoStarts;
|
||||
[bridge beginParameter:exposure node:@"base:base" value:rootExposure atTime:kCMTimeZero];[bridge changeValue:2.4];drain();
|
||||
doc=DYMutablePlist(DYReadTools(base,kCMTimeZero).document);DYSetBaseToolRemoved(doc,@"base",YES);DYWriteTools(base,doc,kCMTimeZero);
|
||||
[bridge changeValue:2.6];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-removed-base-is-not-written-after-its-removal",fabs(value(exposure)-2.4)<1e-6&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
|
||||
doc=DYMutablePlist(DYReadTools(base,kCMTimeZero).document);DYSetBaseToolRemoved(doc,@"base",NO);DYWriteTools(base,doc,kCMTimeZero);
|
||||
undo=base->_undoStarts;
|
||||
[bridge beginParameter:exposure node:@"base:base" value:value(exposure) atTime:kCMTimeZero];[bridge changeValue:2.5];drain();
|
||||
[bridge invalidate];[bridge changeValue:3];drain();
|
||||
run.record(@"viewer-bridge-teardown-closes-a-live-undo-and-rejects-further-writes",fabs(value(exposure)-2.5)<1e-6&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1&&![bridge snapshotAtTime:kCMTimeZero]);
|
||||
[bridge release];
|
||||
}
|
||||
{
|
||||
DYDiagnosticManager *base=[[[DYDiagnosticManager alloc]init]autorelease];DYCreateParameters(base,&error);
|
||||
DYViewerBatchActionProbe *host=[[[DYViewerBatchActionProbe alloc]init]autorelease];host->_base=base;host->_time=kCMTimeZero;
|
||||
id<DYViewerParameterProbe>bridge=(id)[[NSClassFromString(@"DYViewerParameterBridge")alloc]initWithAPIManager:host];
|
||||
auto drain=[](){double end=NSProcessInfo.processInfo.systemUptime+.025;while(NSProcessInfo.processInfo.systemUptime<end)[[NSRunLoop mainRunLoop]runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:.002]];};
|
||||
auto descriptor=[](NSString *key)->NSDictionary*{for(NSDictionary *d in DYDescriptors())if([d[@"key"]isEqual:key])return d;return nil;};
|
||||
auto value=[&](NSDictionary *d)->double{double v=NAN;[base getFloatValue:&v fromParameter:[d[@"pid"]unsignedIntValue] atTime:host->_time];return v;};
|
||||
NSDictionary *x=descriptor(@"masterX0"),*y=descriptor(@"curveY0"),*exposure=descriptor(@"exposure");NSArray *pair=@[x,y];
|
||||
host->_pairIDs=[@[x[@"pid"],y[@"pid"]]copy];int undo=base->_undoStarts;
|
||||
[bridge beginParameters:pair node:@"base:curve" values:@{@"masterX0":@(-1),@"curveY0":@0} atTime:kCMTimeZero];drain();
|
||||
run.record(@"viewer-bridge-batch-begin-only-reads-and-preserves-unused-curve-slot",value(x)==-1&&value(y)==0&&base->_undoStarts==undo&&host->_committedPairs.count==0);
|
||||
[bridge changeValues:@{@"masterX0":@.3,@"curveY0":@20}];drain();
|
||||
NSArray *first=host->_committedPairs.lastObject;
|
||||
run.record(@"viewer-bridge-curve-xy-are-live-in-one-host-action-before-mouse-up",fabs(value(x)-.3)<1e-6&&value(y)==20&&host->_committedPairs.count==1&&first.count==2&&fabs([first[0]doubleValue]-.3)<1e-6&&[first[1]doubleValue]==20&&host->_allWritesInsideAction&&base->_undoStarts==undo+1&&base->_undoEnds==undo);
|
||||
[bridge changeValues:@{@"masterX0":@.4,@"curveY0":@30}];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-batch-continuous-xy-drag-uses-one-undo",fabs(value(x)-.4)<1e-6&&value(y)==30&&host->_committedPairs.count==2&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
|
||||
undo=base->_undoStarts;NSUInteger commits=host->_committedPairs.count;
|
||||
[bridge beginParameters:pair node:@"base:curve" values:@{@"masterX0":@.4,@"curveY0":@30} atTime:kCMTimeZero];
|
||||
[bridge changeValues:@{@"masterX0":@.5}];[bridge changeValues:@{@"masterX0":@.5,@"curveY0":@(NAN)}];[bridge changeValues:@{@"masterX0":@.5,@"wrong-key":@40}];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-incomplete-nonfinite-and-foreign-key-samples-reject-the-entire-batch",fabs(value(x)-.4)<1e-6&&value(y)==30&&host->_committedPairs.count==commits&&base->_undoStarts==undo);
|
||||
[bridge beginParameters:pair node:@"base:curve" values:@{@"masterX0":@.4,@"curveY0":@30} atTime:kCMTimeZero];[bridge changeValues:@{@"masterX0":@.4,@"curveY0":@30}];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-batch-no-op-does-not-create-an-undo",base->_undoStarts==undo&&host->_committedPairs.count==commits);
|
||||
[bridge beginParameters:pair node:@"base:curve" values:@{@"masterX0":@.4,@"curveY0":@30} atTime:kCMTimeZero];[bridge changeValues:@{@"masterX0":@.5,@"curveY0":@35}];drain();
|
||||
[base setFloatValue:45 toParameter:[y[@"pid"]unsignedIntValue] atTime:kCMTimeZero];commits=host->_committedPairs.count;
|
||||
[bridge changeValues:@{@"masterX0":@.6,@"curveY0":@40}];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-external-y-edit-stops-both-axes-of-the-graphic-gesture",fabs(value(x)-.5)<1e-6&&value(y)==45&&host->_committedPairs.count==commits&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
|
||||
undo=base->_undoStarts;
|
||||
[bridge beginParameters:pair node:@"base:curve" values:@{@"masterX0":@.4,@"curveY0":@45} atTime:kCMTimeZero];[bridge changeValues:@{@"masterX0":@.8,@"curveY0":@60}];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-one-stale-original-value-rejects-the-entire-graphic-gesture",fabs(value(x)-.5)<1e-6&&value(y)==45&&base->_undoStarts==undo);
|
||||
[bridge beginParameters:@[x,exposure] node:@"base:curve" values:@{@"masterX0":@.5,@"exposure":@0} atTime:kCMTimeZero];[bridge changeValues:@{@"masterX0":@.8,@"exposure":@1}];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-mixed-module-batch-is-rejected-before-any-write",fabs(value(x)-.5)<1e-6&&value(exposure)==0&&base->_undoStarts==undo);
|
||||
NSMutableDictionary *doc=DYMutablePlist(DYReadTools(base,kCMTimeZero).document);NSDictionary *layer=DYInsertTool(doc,@"curve",@"base:curve");NSString *layerID=layer[@"id"];DYWriteTools(base,doc,kCMTimeZero);
|
||||
[bridge beginParameters:pair node:layerID values:@{@"masterX0":@(-1),@"curveY0":@0} atTime:kCMTimeZero];[bridge changeValues:@{@"masterX0":@.2,@"curveY0":@(-10)}];[bridge endGesture];drain();
|
||||
NSDictionary *saved=DYToolWithID(DYReadTools(base,kCMTimeZero).document,layerID);
|
||||
run.record(@"viewer-bridge-independent-curve-xy-commit-together-with-root-isolation",fabs([saved[@"values"][@"masterX0"]doubleValue]-.2)<1e-6&&[saved[@"values"][@"curveY0"]doubleValue]==-10&&fabs(value(x)-.5)<1e-6&&value(y)==45&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
|
||||
undo=base->_undoStarts;
|
||||
[bridge beginParameter:exposure node:@"base:base" value:0 atTime:kCMTimeZero];[bridge changeValue:.25];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-single-value-entry-points-remain-compatible-after-batch-extension",fabs(value(exposure)-.25)<1e-6&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
|
||||
undo=base->_undoStarts;host->_rejectParameterID=[y[@"pid"]unsignedIntValue];host->_rejectNextWrite=YES;
|
||||
[bridge beginParameters:pair node:@"base:curve" values:@{@"masterX0":@.5,@"curveY0":@45} atTime:kCMTimeZero];[bridge changeValues:@{@"masterX0":@.7,@"curveY0":@50}];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-rejected-second-field-restores-first-field-within-the-same-action",fabs(value(x)-.5)<1e-6&&value(y)==45&&host->_allWritesInsideAction&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
|
||||
NSDictionary *h=descriptor(@"cmbalanceAngle"),*s=descriptor(@"cmbalanceStrength");undo=base->_undoStarts;
|
||||
[bridge beginParameters:@[h,s] node:@"base:primary" values:@{@"cmbalanceAngle":@0,@"cmbalanceStrength":@0} atTime:kCMTimeZero];[bridge changeValues:@{@"cmbalanceAngle":@30,@"cmbalanceStrength":@.4}];drain();
|
||||
[base setFloatValue:0 toParameter:2236 atTime:kCMTimeZero];
|
||||
[bridge changeValues:@{@"cmbalanceAngle":@45,@"cmbalanceStrength":@.6}];[bridge endGesture];drain();
|
||||
run.record(@"viewer-bridge-external-cst-configuration-conflict-stops-the-whole-color-wheel",value(h)==30&&fabs(value(s)-.4)<1e-6&&[base->_values[@2236]doubleValue]==0&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
|
||||
[bridge invalidate];drain();[bridge release];
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
// Independently authored canvas UI. Hit geometry and drawing share the same layout.
|
||||
#import "DYTheme.h"
|
||||
|
||||
@interface DYViewerParameterPanel : NSObject
|
||||
@property(nonatomic,retain) DYViewerParameterBridge *bridge;
|
||||
@property(nonatomic,copy) NSString *toolType;
|
||||
@property(nonatomic) BOOL visible;
|
||||
- (void)setInitialPosition:(NSPoint)position;
|
||||
- (void)setViewport:(NSRect)viewport;
|
||||
- (void)prepareWithSize:(NSSize)size scale:(CGFloat)scale atTime:(CMTime)time;
|
||||
- (void)draw;
|
||||
- (NSInteger)partAtPoint:(NSPoint)point;
|
||||
- (BOOL)event:(NSEventType)type point:(NSPoint)point atTime:(CMTime)time;
|
||||
- (BOOL)mouseMoved:(NSPoint)point;
|
||||
- (BOOL)mouseExited;
|
||||
- (BOOL)capturing;
|
||||
- (BOOL)finishCapture;
|
||||
@end
|
||||
@implementation DYViewerParameterPanel {
|
||||
DYViewerParameterBridge *_bridge;NSDictionary *_snapshot;NSArray *_nodes,*_rows;NSMutableArray *_areas;
|
||||
NSString *_nodeID,*_toolType,*_selectedX;NSMutableDictionary *_draftValues;NSInteger _channel;BOOL _graphMode,_visible;NSSize _size;NSRect _panel,_viewport;BOOL _hasViewport;CGFloat _scale;BOOL _open,_catalog,_dragging,_hasDraft,_positioned,_movingPanel;NSPoint _position,_panelStart;
|
||||
NSInteger _page,_catalogPage,_capacity,_catalogCapacity,_hover,_pressed;NSPoint _down;NSDictionary *_captured;
|
||||
double _draftValue,_downValue;CGFloat _knobOffset;CMTime _time,_downTime;
|
||||
}
|
||||
@synthesize bridge=_bridge,toolType=_toolType,visible=_visible;
|
||||
- (void)setInitialPosition:(NSPoint)p{_position=p;_positioned=YES;}
|
||||
- (instancetype)init{if((self=[super init])){_areas=[NSMutableArray new];_nodeID=[@"base:base" copy];_scale=1;_open=YES;_visible=YES;_graphMode=YES;_draftValues=[NSMutableDictionary new];_time=_downTime=kCMTimeInvalid;}return self;}
|
||||
- (void)dealloc{if(_pressed)[_bridge endGesture];[_bridge release];[_snapshot release];[_nodes release];[_rows release];[_areas release];[_nodeID release];[_toolType release];[_selectedX release];[_draftValues release];[_captured release];[super dealloc];}
|
||||
- (void)setBridge:(DYViewerParameterBridge*)bridge{if(bridge==_bridge)return;if(_pressed)[_bridge endGesture];[_bridge release];_bridge=[bridge retain];_pressed=0;_dragging=NO;_movingPanel=NO;[_captured release];_captured=nil;}
|
||||
- (BOOL)capturing{return _pressed!=0;}
|
||||
- (BOOL)finishCapture{BOOL had=_pressed!=0;if(had)[_bridge endGesture];_pressed=0;_hasDraft=NO;[_draftValues removeAllObjects];_movingPanel=NO;_dragging=NO;[_captured release];_captured=nil;return had;}
|
||||
- (NSDictionary*)descriptorForKey:(NSString*)key{for(NSDictionary*d in DYDescriptors())if([d[@"key"]isEqual:key])return d;return nil;}
|
||||
- (NSDictionary*)node{for(NSDictionary*n in _nodes)if([n[@"id"]isEqual:_nodeID])return n;return nil;}
|
||||
- (double)valueForDescriptor:(NSDictionary*)d{
|
||||
if(_pressed&&_draftValues[d[@"key"]])return [_draftValues[d[@"key"]]doubleValue];
|
||||
if(_hasDraft&&_captured&&[_captured[@"descriptor"][@"pid"]isEqual:d[@"pid"]]&&_pressed)return _draftValue;
|
||||
NSDictionary*n=[self node];DYUniforms u;NSData*raw=_snapshot[@"uniforms"];if(raw.length!=sizeof(u))return [d[@"default"]doubleValue];
|
||||
if([_nodeID hasPrefix:@"base:"])[raw getBytes:&u length:sizeof(u)];else u=DYToolUniforms(n[@"layer"]);
|
||||
NSInteger offset=[d[@"offset"]integerValue];return offset>=0&&offset+sizeof(float)<=sizeof(u)?*(float*)((uint8_t*)&u+offset):[d[@"default"]doubleValue];
|
||||
}
|
||||
- (void)addArea:(NSRect)rect part:(NSInteger)part kind:(NSString*)kind title:(NSString*)title descriptor:(NSDictionary*)d index:(NSInteger)index{
|
||||
NSMutableDictionary*a=[NSMutableDictionary dictionaryWithDictionary:@{@"rect":[NSValue valueWithRect:rect],@"part":@(part),@"kind":kind,@"title":title?:@"",@"index":@(index)}];if(d)a[@"descriptor"]=d;if([kind isEqual:@"module"]&&index<(NSInteger)_nodes.count)a[@"nodeID"]=_nodes[index][@"id"];[_areas addObject:a];
|
||||
}
|
||||
- (void)setViewport:(NSRect)viewport{_viewport=viewport;_hasViewport=YES;}
|
||||
- (void)prepareWithSize:(NSSize)canvasSize scale:(CGFloat)scale atTime:(CMTime)time{
|
||||
_size=canvasSize;NSRect viewport=_hasViewport?NSIntersectionRect(_viewport,NSMakeRect(0,0,canvasSize.width,canvasSize.height)):NSMakeRect(0,0,canvasSize.width,canvasSize.height);NSSize size=viewport.size;_scale=MAX(.6,MIN(MAX(1.,scale),MIN(size.width/360.,size.height/230.)));_time=time;
|
||||
if(_pressed&&(!CMTIME_IS_NUMERIC(time)||CMTimeCompare(time,_downTime)!=0)){[self finishCapture];}
|
||||
[_snapshot release];_snapshot=[[_bridge snapshotAtTime:time]retain];NSDictionary*doc=_snapshot[@"document"];
|
||||
if(doc){NSMutableArray*nodes=[NSMutableArray array];NSMutableDictionary*counts=[NSMutableDictionary dictionary];
|
||||
for(NSString*ID in DYToolDisplayOrder(doc?:@{})){
|
||||
BOOL base=[ID hasPrefix:@"base:"];NSDictionary*layer=base?nil:DYToolWithID(doc,ID);NSString*type=base?[ID substringFromIndex:5]:layer[@"type"];if(!type||![_toolType isEqual:type]||(base&&DYBaseToolRemoved(doc,type)))continue;
|
||||
NSString*title=DYToolSection(type)[@"title"]?:type;if([type isEqual:@"base"])title=@"基础调整";
|
||||
NSInteger count=[counts[type]integerValue];counts[type]=@(count+1);if(!base)title=[title stringByAppendingFormat:@" · %ld",(long)(count+1)];
|
||||
[nodes addObject:@{@"id":ID,@"type":type,@"title":title,@"layer":layer?:@{}}];
|
||||
}[_nodes release];_nodes=[nodes copy];
|
||||
if(![self node]){[self finishCapture];[_nodeID release];_nodeID=_nodes.count?[_nodes[0][@"id"]copy]:nil;_page=0;[_selectedX release];_selectedX=nil;}}
|
||||
NSString*type=[self node][@"type"]?:_toolType;NSMutableArray*rows=[NSMutableArray array];
|
||||
// These are the existing public scalar controls, never hidden curve-slot metadata.
|
||||
NSArray*sections=[type isEqual:@"base"]?@[@"base",@"color"]:type?@[type]:@[];
|
||||
if(doc)for(NSString*part in sections)for(NSDictionary*d in DYToolSection(part)[@"rows"]){NSString*k=d[@"key"];if(!d[@"pid"]||[k hasPrefix:@"cmbypass"]||[k isEqual:@"copyAutoGrade"]||([type isEqual:@"curve"]&&![k hasPrefix:@"curveY"]))continue;[rows addObject:d];}
|
||||
[_rows release];_rows=[rows copy];[_areas removeAllObjects];if(!_bridge||size.width<120||size.height<80)return;
|
||||
CGFloat s=_scale,margin=8*s,w=MIN(300*s,size.width-2*margin);_capacity=MAX(1,MIN(5,(NSInteger)floor((size.height-124*s)/(46*s))));
|
||||
_catalogCapacity=MAX(1,MIN(7,(NSInteger)floor((size.height-124*s)/(32*s))));
|
||||
_page=MIN(MAX(0,_page),MAX(0,((NSInteger)_rows.count-1)/_capacity));_catalogPage=MIN(MAX(0,_catalogPage),MAX(0,((NSInteger)_nodes.count-1)/_catalogCapacity));
|
||||
BOOL graph=_graphMode&&([type isEqual:@"curve"]||[type isEqual:@"grading"]);
|
||||
CGFloat body=_catalog?32*MIN(_catalogCapacity,(NSInteger)_nodes.count):graph?([type isEqual:@"curve"]?236:278):46*MIN(_capacity,(NSInteger)_rows.count);
|
||||
CGFloat h=_open?(100+body)*s:30*s,panelHeight=MIN(h,size.height-2*margin),x=viewport.origin.x+margin,top=viewport.origin.y+margin;
|
||||
if(_positioned){x=MAX(viewport.origin.x+margin,MIN(NSMaxX(viewport)-margin-w,viewport.origin.x+_position.x*size.width));top=MAX(viewport.origin.y+margin,MIN(NSMaxY(viewport)-margin-panelHeight,viewport.origin.y+_position.y*size.height));}
|
||||
_position=NSMakePoint((x-viewport.origin.x)/MAX(1.,size.width),(top-viewport.origin.y)/MAX(1.,size.height));_positioned=YES;
|
||||
_panel=NSMakeRect(x,top,w,panelHeight);
|
||||
[self addArea:NSMakeRect(x,top,w-34*s,30*s) part:20000 kind:@"open" title:[@"⠿ " stringByAppendingString:DYToolSection(type)[@"title"]?:@"调色"] descriptor:nil index:0];
|
||||
[self addArea:NSMakeRect(NSMaxX(_panel)-30*s,top+3*s,26*s,24*s) part:20001 kind:@"close" title:@"×" descriptor:nil index:0];if(!_open)return;
|
||||
CGFloat y=top+36*s;
|
||||
[self addArea:NSMakeRect(x+8*s,y,w-([type isEqual:@"base"]?126:84)*s,28*s) part:20002 kind:@"catalog" title:!doc?@"等待当前帧…":[self node]?[[self node][@"title"] stringByAppendingString:@" ▾"]:@"此工具已移除" descriptor:nil index:0];
|
||||
NSDictionary*enabled=[self descriptorForKey:[type isEqual:@"primary"]?@"primaryMasterEnabled":[type stringByAppendingString:@"Enabled"]];
|
||||
if(enabled&&_snapshot)[self addArea:NSMakeRect(NSMaxX(_panel)-36*s,y,27*s,28*s) part:20003 kind:@"headerBool" title:[type isEqual:@"base"]?@"调":@"" descriptor:enabled index:0];
|
||||
if([type isEqual:@"base"]&&_snapshot)[self addArea:NSMakeRect(NSMaxX(_panel)-76*s,y,36*s,28*s) part:20007 kind:@"headerBool" title:@"色" descriptor:[self descriptorForKey:@"colorEnabled"] index:0];
|
||||
y+=36*s;
|
||||
if(_catalog){
|
||||
for(NSInteger i=0;i<_catalogCapacity&&_catalogPage*_catalogCapacity+i<(NSInteger)_nodes.count;i++){NSDictionary*n=_nodes[_catalogPage*_catalogCapacity+i];[self addArea:NSMakeRect(x+8*s,y+i*32*s,w-16*s,27*s) part:20100+i kind:@"module" title:n[@"title"] descriptor:nil index:_catalogPage*_catalogCapacity+i];}y+=MIN(_catalogCapacity,(NSInteger)_nodes.count)*32*s;
|
||||
}else if(graph){
|
||||
[self layoutGraphicAt:y];y=NSMaxY(_panel)-25*s;
|
||||
}else{
|
||||
for(NSInteger i=0;i<_capacity&&_page*_capacity+i<(NSInteger)_rows.count;i++){NSDictionary*d=_rows[_page*_capacity+i];NSString*kind=d[@"kind"]?:@"float";NSString*valueKind=[kind isEqual:@"bool"]?@"bool":[kind isEqual:@"popup"]?@"choice":@"slider";
|
||||
[self addArea:NSMakeRect(x+10*s,y+i*46*s,w-46*s,40*s) part:21000+i*3 kind:valueKind title:d[@"title"] descriptor:d index:i];
|
||||
[self addArea:NSMakeRect(NSMaxX(_panel)-31*s,y+i*46*s+5*s,23*s,29*s) part:21001+i*3 kind:@"reset" title:@"↺" descriptor:d index:i];}y+=MIN(_capacity,(NSInteger)_rows.count)*46*s;
|
||||
}
|
||||
if([type isEqual:@"curve"]||[type isEqual:@"grading"])[self addArea:NSMakeRect(NSMaxX(_panel)-110*s,NSMaxY(_panel)-23*s,66*s,19*s) part:20008 kind:@"graphMode" title:_graphMode?@"参数 ›":@"图形 ›" descriptor:nil index:0];
|
||||
NSInteger total=_catalog?_nodes.count:_rows.count,cap=_catalog?_catalogCapacity:_capacity;
|
||||
if(total>cap&&(_catalog||!graph)){[self addArea:NSMakeRect(x+8*s,y,29*s,23*s) part:20004 kind:@"previous" title:@"‹" descriptor:nil index:0];[self addArea:NSMakeRect(NSMaxX(_panel)-37*s,y,29*s,23*s) part:20005 kind:@"next" title:@"›" descriptor:nil index:0];}
|
||||
}
|
||||
|
||||
- (NSRect)trackForArea:(NSDictionary*)area{NSRect r=[area[@"rect"]rectValue];return NSMakeRect(r.origin.x+5*_scale,r.origin.y+28*_scale,r.size.width-10*_scale,4*_scale);}
|
||||
- (void)text:(NSString*)text rect:(NSRect)rect size:(CGFloat)size color:(NSColor*)color alignment:(NSTextAlignment)alignment{
|
||||
NSMutableParagraphStyle*p=[[[NSMutableParagraphStyle alloc]init]autorelease];p.lineBreakMode=NSLineBreakByTruncatingTail;p.alignment=alignment;
|
||||
[text drawInRect:rect withAttributes:@{NSFontAttributeName:[NSFont systemFontOfSize:size*_scale weight:NSFontWeightMedium],NSForegroundColorAttributeName:color,NSParagraphStyleAttributeName:p}];
|
||||
}
|
||||
- (NSString*)valueText:(NSDictionary*)d value:(double)v{
|
||||
if([d[@"kind"]isEqual:@"bool"])return v>.5?@"开启":@"关闭";
|
||||
if([d[@"kind"]isEqual:@"popup"]){NSArray*values=d[@"values"],*options=d[@"options"];NSInteger i=values?[values indexOfObject:@((NSInteger)llround(v))]:(NSInteger)llround(v);return i>=0&&i<(NSInteger)options.count?options[i]:@"—";}
|
||||
return [NSString stringWithFormat:[d[@"max"]doubleValue]-[d[@"min"]doubleValue]>20?@"%.1f":@"%.2f",v];
|
||||
}
|
||||
- (void)draw{
|
||||
if(!_areas.count)return;[NSGraphicsContext saveGraphicsState];NSRectClip(NSIntersectionRect(_panel,NSMakeRect(0,0,_size.width,_size.height)));CGFloat s=_scale;NSColor*ink=DYThemeColor(@"text")?:NSColor.whiteColor,*accent=DYThemeColor(@"accent")?:NSColor.systemCyanColor;
|
||||
NSBezierPath*panel=[NSBezierPath bezierPathWithRoundedRect:_panel xRadius:9*s yRadius:9*s];DYDrawThemeSurface(panel,YES);
|
||||
for(NSDictionary*a in _areas){NSRect r=[a[@"rect"]rectValue];NSInteger part=[a[@"part"]integerValue];NSString*kind=a[@"kind"];BOOL pressed=_pressed==part,hover=_hover==part;NSDictionary*d=a[@"descriptor"];
|
||||
if([kind isEqual:@"curvePlot"]||[kind isEqual:@"wheel"]){[self drawGraphic:a];continue;}
|
||||
if([kind isEqual:@"slider"]){double v=[self valueForDescriptor:d],lo=[d[@"min"]doubleValue],hi=[d[@"max"]doubleValue];CGFloat ratio=hi>lo?MAX(0.,MIN(1.,(v-lo)/(hi-lo))):0;NSRect track=[self trackForArea:a];
|
||||
[self text:a[@"title"] rect:NSMakeRect(r.origin.x,r.origin.y,r.size.width-68*s,18*s) size:11 color:ink alignment:NSTextAlignmentLeft];[self text:[self valueText:d value:v] rect:NSMakeRect(NSMaxX(r)-68*s,r.origin.y,68*s,18*s) size:11 color:hover||pressed?accent:ink alignment:NSTextAlignmentRight];
|
||||
DYDrawSoftControl(NSInsetRect(track,-2*s,-3*s),5*s,YES,NO,NO);[accent setFill];[[NSBezierPath bezierPathWithRoundedRect:NSMakeRect(track.origin.x,track.origin.y,MAX(2*s,track.size.width*ratio),track.size.height) xRadius:2*s yRadius:2*s]fill];
|
||||
CGFloat marker=MAX(0.,MIN(1.,([d[@"default"]doubleValue]-lo)/(hi-lo)));[ink setStroke];NSBezierPath*tick=[NSBezierPath bezierPath];[tick moveToPoint:NSMakePoint(track.origin.x+marker*track.size.width,NSMidY(track)-5*s)];[tick lineToPoint:NSMakePoint(track.origin.x+marker*track.size.width,NSMidY(track)+5*s)];tick.lineWidth=.7*s;[tick stroke];
|
||||
DYDrawSoftControl(NSMakeRect(track.origin.x+ratio*track.size.width-6*s,NSMidY(track)-6*s,12*s,12*s),6*s,NO,hover||pressed,pressed);
|
||||
}else{
|
||||
BOOL selected=([kind isEqual:@"channel"]&&[a[@"index"]integerValue]==_channel)||([kind isEqual:@"module"]&&[a[@"nodeID"]isEqual:_nodeID])||([kind isEqual:@"tool"]&&[a[@"toolType"]isEqual:[self node][@"type"]]);BOOL on=([kind isEqual:@"bool"]||[kind isEqual:@"headerBool"])&&[self valueForDescriptor:d]>.5;
|
||||
DYDrawSoftControl(r,5*s,NO,hover||selected||on,pressed);NSString*title=a[@"title"];
|
||||
if(d&&![kind isEqual:@"reset"]){NSString*value=[self valueText:d value:[self valueForDescriptor:d]];title=[kind isEqual:@"headerBool"]?(title.length?title:([self valueForDescriptor:d]>.5?@"●":@"○")):[NSString stringWithFormat:@"%@ %@%@",title,value,[kind isEqual:@"choice"]?@" ›":@""];}
|
||||
[self text:title rect:NSInsetRect(r,5*s,5*s) size:[kind isEqual:@"open"]?12:11 color:[kind isEqual:@"toolUnavailable"]?[ink colorWithAlphaComponent:.35]:ink alignment:NSTextAlignmentCenter];
|
||||
}
|
||||
}
|
||||
if(_open){NSString*hint=_catalog?@"选择当前工具的图层":(_graphMode&&[_toolType isEqual:@"curve"])?@"点击加点 · 拖动调整":(_graphMode&&[_toolType isEqual:@"grading"])?@"拖动色轮 · 参数查看亮度":@"拖动调节 · ↺ 还原";if(_hover==20000||_movingPanel)hint=@"拖动标题移动 · 单击折叠";[self text:hint rect:NSMakeRect(_panel.origin.x+40*s,NSMaxY(_panel)-22*s,_panel.size.width-168*s,18*s) size:9 color:ink alignment:NSTextAlignmentCenter];}
|
||||
[NSGraphicsContext restoreGraphicsState];
|
||||
}
|
||||
- (NSInteger)partAtPoint:(NSPoint)p{if(!_visible||!std::isfinite(p.x)||!std::isfinite(p.y)||!_bridge||!NSPointInRect(p,NSIntersectionRect(_panel,NSMakeRect(0,0,_size.width,_size.height))))return 0;for(NSDictionary*a in [_areas reverseObjectEnumerator])if(![a[@"kind"]isEqual:@"toolUnavailable"]&&NSPointInRect(p,[a[@"rect"]rectValue]))return [a[@"part"]integerValue];return _open&&NSPointInRect(p,_panel)?20006:0;}
|
||||
- (NSDictionary*)areaForPart:(NSInteger)part{for(NSDictionary*a in _areas)if([a[@"part"]integerValue]==part)return a;return nil;}
|
||||
- (void)applySliderPoint:(NSPoint)p{
|
||||
NSRect t=[self trackForArea:_captured];NSDictionary*d=_captured[@"descriptor"];double ratio=MAX(0.,MIN(1.,(p.x-_knobOffset-t.origin.x)/MAX(1.,t.size.width)));_draftValue=[d[@"min"]doubleValue]+ratio*([d[@"max"]doubleValue]-[d[@"min"]doubleValue]);[_bridge changeValue:_draftValue];
|
||||
}
|
||||
- (void)clickArea:(NSDictionary*)a{
|
||||
NSString*kind=a[@"kind"];if([kind isEqual:@"close"]){_visible=NO;return;}if([kind isEqual:@"open"]){_open=!_open;_catalog=NO;return;}if([kind isEqual:@"graphMode"]){_graphMode=!_graphMode;return;}if([kind isEqual:@"channel"]){_channel=[a[@"index"]integerValue];[_selectedX release];_selectedX=nil;return;}if([kind isEqual:@"deletePoint"]){[self deleteSelectedPoint];return;}if([kind isEqual:@"catalog"]){_catalog=!_catalog;return;}
|
||||
if([kind isEqual:@"module"]||[kind isEqual:@"tool"]){for(NSDictionary*n in _nodes)if([n[@"id"]isEqual:a[@"nodeID"]]){[_nodeID release];_nodeID=[a[@"nodeID"]copy];_catalog=NO;_page=0;break;}return;}
|
||||
if([kind isEqual:@"previous"]||[kind isEqual:@"next"]){NSInteger total=_catalog?_nodes.count:_rows.count,cap=_catalog?_catalogCapacity:_capacity,count=MAX(1,(total+cap-1)/cap),delta=[kind isEqual:@"next"]?1:-1;if(_catalog)_catalogPage=(_catalogPage+delta+count)%count;else _page=(_page+delta+count)%count;return;}
|
||||
NSDictionary*d=a[@"descriptor"];if(!d||!_snapshot)return;double old=[self valueForDescriptor:d],v=old;
|
||||
if([kind isEqual:@"reset"])v=[d[@"default"]doubleValue];else if([kind isEqual:@"bool"]||[kind isEqual:@"headerBool"])v=old>.5?0:1;else if([kind isEqual:@"choice"]){NSArray*values=d[@"values"],*options=d[@"options"];NSInteger i=values?[values indexOfObject:@((NSInteger)llround(old))]:(NSInteger)llround(old);if(!options.count)return;i=(i+1)%options.count;v=values?[values[i]doubleValue]:i;}
|
||||
[_bridge beginParameter:d node:_nodeID value:old atTime:_time];[_bridge changeValue:v];[_bridge endGesture];
|
||||
}
|
||||
- (void)movePanelToPointer:(NSPoint)p{
|
||||
NSRect viewport=_hasViewport?NSIntersectionRect(_viewport,NSMakeRect(0,0,_size.width,_size.height)):NSMakeRect(0,0,_size.width,_size.height);CGFloat margin=10*_scale;
|
||||
CGFloat x=MAX(NSMinX(viewport)+margin,MIN(NSMaxX(viewport)-margin-_panel.size.width,_panelStart.x+p.x-_down.x)),y=MAX(NSMinY(viewport)+margin,MIN(NSMaxY(viewport)-margin-_panel.size.height,_panelStart.y+p.y-_down.y));
|
||||
_position=NSMakePoint((x-viewport.origin.x)/MAX(1.,viewport.size.width),(y-viewport.origin.y)/MAX(1.,viewport.size.height));_positioned=YES;_movingPanel=YES;[self prepareWithSize:_size scale:_scale atTime:_time];
|
||||
}
|
||||
- (BOOL)event:(NSEventType)type point:(NSPoint)p atTime:(CMTime)time{
|
||||
if(!std::isfinite(p.x)||!std::isfinite(p.y))return NO;[self prepareWithSize:_size scale:_scale atTime:time];NSInteger hit=[self partAtPoint:p];
|
||||
if(type==NSEventTypeLeftMouseDown){if(!hit)return NO;[_bridge endGesture];_hasDraft=NO;_pressed=hit;_down=p;_panelStart=_panel.origin;_downTime=time;_dragging=NO;_movingPanel=NO;[_captured release];_captured=[[self areaForPart:hit]copy];NSDictionary*d=_captured[@"descriptor"];
|
||||
if([_captured[@"kind"]isEqual:@"curvePlot"]||[_captured[@"kind"]isEqual:@"wheel"]){[self beginGraphicAt:p];return YES;}
|
||||
if([_captured[@"kind"]isEqual:@"slider"]&&_snapshot){NSRect t=[self trackForArea:_captured];if(NSPointInRect(p,NSInsetRect(t,-8*_scale,-8*_scale))){_downValue=[self valueForDescriptor:d];_draftValue=_downValue;_hasDraft=YES;[_bridge beginParameter:d node:_nodeID value:_downValue atTime:time];CGFloat knob=t.origin.x+(_downValue-[d[@"min"]doubleValue])/([d[@"max"]doubleValue]-[d[@"min"]doubleValue])*t.size.width;_knobOffset=fabs(p.x-knob)<=8*_scale?p.x-knob:0;if(fabs(p.x-knob)>8*_scale)[self applySliderPoint:p];}}return YES;
|
||||
}
|
||||
if(!_pressed)return NO;
|
||||
if(type==NSEventTypeLeftMouseDragged){if(fabs(p.x-_down.x)>2*_scale||fabs(p.y-_down.y)>2*_scale)_dragging=YES;if(_dragging&&[_captured[@"kind"]isEqual:@"open"])[self movePanelToPointer:p];if(_dragging&&([_captured[@"kind"]isEqual:@"curvePlot"]||[_captured[@"kind"]isEqual:@"wheel"]))[self updateGraphicAt:p];if(_dragging&&_hasDraft&&[_captured[@"kind"]isEqual:@"slider"]&&_snapshot)[self applySliderPoint:p];return YES;}
|
||||
if(type==NSEventTypeLeftMouseUp){if([_captured[@"kind"]isEqual:@"open"]&&(_dragging||fabs(p.x-_down.x)>2*_scale||fabs(p.y-_down.y)>2*_scale))[self movePanelToPointer:p];BOOL moved=_movingPanel;BOOL graphic=[_captured[@"kind"]isEqual:@"curvePlot"]||[_captured[@"kind"]isEqual:@"wheel"];if(graphic){if(_dragging||fabs(p.x-_down.x)>2*_scale||fabs(p.y-_down.y)>2*_scale)[self updateGraphicAt:p];[_bridge endGesture];}BOOL slider=[_captured[@"kind"]isEqual:@"slider"];NSDictionary*a=[_captured retain];NSInteger pressed=_pressed;
|
||||
if(slider){if(_hasDraft&&(_dragging||fabs(p.x-_down.x)>2*_scale||fabs(p.y-_down.y)>2*_scale))[self applySliderPoint:p];[_bridge endGesture];}
|
||||
_pressed=0;_dragging=NO;_movingPanel=NO;_hasDraft=NO;[_captured release];_captured=nil;[_draftValues removeAllObjects];if(!moved&&!slider&&!graphic&&hit==pressed&&(!a[@"nodeID"]||[a[@"nodeID"]isEqual:[self areaForPart:hit][@"nodeID"]]))[self clickArea:a];[a release];[self prepareWithSize:_size scale:_scale atTime:time];return YES;}
|
||||
return NO;
|
||||
}
|
||||
#include "DYViewerGraphics.inc.h"
|
||||
- (BOOL)mouseMoved:(NSPoint)p{NSInteger part=[self partAtPoint:p];BOOL changed=part!=_hover;_hover=part;return changed;}
|
||||
- (BOOL)mouseExited{BOOL changed=_hover!=0;_hover=0;return changed;}
|
||||
@end
|
||||
@@ -0,0 +1,47 @@
|
||||
#pragma once
|
||||
@protocol DYViewerParameterProbe
|
||||
- (instancetype)initWithAPIManager:(id<PROAPIAccessing>)manager;
|
||||
- (void)publishUniforms:(const DYUniforms*)uniforms document:(NSDictionary*)document atTime:(CMTime)time;
|
||||
- (NSDictionary*)snapshotAtTime:(CMTime)time;
|
||||
- (void)beginParameter:(NSDictionary*)descriptor node:(NSString*)nodeID value:(double)value atTime:(CMTime)time;
|
||||
- (void)changeValue:(double)value;
|
||||
- (void)beginParameters:(NSArray<NSDictionary*>*)descriptors node:(NSString*)nodeID values:(NSDictionary<NSString*,NSNumber*>*)values atTime:(CMTime)time;
|
||||
- (void)changeValues:(NSDictionary<NSString*,NSNumber*>*)values;
|
||||
- (void)endGesture;
|
||||
- (void)invalidate;
|
||||
@end
|
||||
|
||||
// Test-only host wrapper: sample paired values at each outer action boundary.
|
||||
// This verifies that an OSC graph never exposes an x-only intermediate action.
|
||||
@interface DYViewerBatchActionProbe : DYToolCanvasProbe {
|
||||
@public
|
||||
NSArray *_pairIDs;
|
||||
NSMutableArray *_committedPairs;
|
||||
NSInteger _actionDepth;
|
||||
BOOL _writesInAction,_allWritesInsideAction,_rejectNextWrite;
|
||||
UInt32 _rejectParameterID;
|
||||
}
|
||||
@end
|
||||
@implementation DYViewerBatchActionProbe
|
||||
- (instancetype)init{if((self=[super init])){_committedPairs=[NSMutableArray new];_allWritesInsideAction=YES;}return self;}
|
||||
- (void)dealloc{[_pairIDs release];[_committedPairs release];[super dealloc];}
|
||||
- (id)apiForProtocol:(Protocol*)protocol{if([NSStringFromProtocol(protocol)isEqual:@"FxParameterSettingAPI_v6"])return self;return [super apiForProtocol:protocol];}
|
||||
- (void)startAction:(id)sender{[super startAction:sender];++_actionDepth;}
|
||||
- (void)endAction:(id)sender{
|
||||
if(_actionDepth==1&&_writesInAction){
|
||||
NSMutableArray *sample=[NSMutableArray array];id<FxParameterRetrievalAPI_v6>get=(id)_base;
|
||||
for(NSNumber *pid in _pairIDs){double value=NAN;[get getFloatValue:&value fromParameter:pid.unsignedIntValue atTime:_time];[sample addObject:@(value)];}
|
||||
[_committedPairs addObject:sample];_writesInAction=NO;
|
||||
}
|
||||
--_actionDepth;[super endAction:sender];
|
||||
}
|
||||
- (BOOL)setFloatValue:(double)value toParameter:(UInt32)pid atTime:(CMTime)time{
|
||||
_allWritesInsideAction&=_actionDepth>0&&NSThread.isMainThread;
|
||||
if(_rejectNextWrite&&pid==_rejectParameterID){_rejectNextWrite=NO;return NO;}
|
||||
_writesInAction=YES;return [(id<FxParameterSettingAPI_v6>)_base setFloatValue:value toParameter:pid atTime:time];
|
||||
}
|
||||
- (BOOL)setCustomParameterValue:(NSObject<NSSecureCoding,NSCopying>*)value toParameter:(UInt32)pid atTime:(CMTime)time{
|
||||
_allWritesInsideAction&=_actionDepth>0&&NSThread.isMainThread;_writesInAction=YES;
|
||||
return [(id<FxParameterSettingAPI_v6>)_base setCustomParameterValue:value toParameter:pid atTime:time];
|
||||
}
|
||||
@end
|
||||
@@ -0,0 +1,53 @@
|
||||
#import "DYColorWorkspace.h"
|
||||
// Offscreen fixtures: no window is ordered onto the user's screen.
|
||||
@interface DYColorWorkspace (DiagnosticActions)
|
||||
- (NSDictionary *)selectionContext;
|
||||
- (BOOL)commitLUT:(NSString *)path expected:(NSDictionary *)expected error:(NSError **)error;
|
||||
- (NSProgress *)selectLUT:(NSString *)path completion:(void(^)(NSError *))completion;
|
||||
@end
|
||||
@interface DYWorkspaceDiagnosticHost : DYDiagnosticManager {
|
||||
@public NSView *_parent;CMTime _workspaceTime;NSUInteger _requests,_closes;NSInteger _actionDepth;BOOL _permissionFailure,_nodeCommitHadUndo,_rejectToolsWrites;
|
||||
}
|
||||
@end
|
||||
@implementation DYWorkspaceDiagnosticHost
|
||||
- (instancetype)init{if((self=[super init]))_workspaceTime=kCMTimeZero;return self;}
|
||||
- (id)apiForProtocol:(Protocol *)p{NSString *name=NSStringFromProtocol(p);if([@[@"FxRemoteWindowAPI",@"FxRemoteWindowAPI_v2",@"FxRemoteWindowAPI_v3"]containsObject:name]){if(!_actionDepth)_permissionFailure=YES;return self;}return [super apiForProtocol:p];}
|
||||
- (void)startAction:(id)sender{_actionDepth++;}
|
||||
- (void)endAction:(id)sender{_actionDepth--;if(_actionDepth<0)_permissionFailure=YES;}
|
||||
- (CMTime)currentTime{return _workspaceTime;}
|
||||
- (void)remoteWindowWithMinimumSize:(CGSize)minimum maximumSize:(CGSize)maximum reply:(void(^)(FxXPView*,NSError*))reply{if(!_actionDepth)_permissionFailure=YES;_requests++;reply((FxXPView*)_parent,nil);}
|
||||
- (void)closeRemoteWindow{if(!_actionDepth)_permissionFailure=YES;_closes++;}
|
||||
- (BOOL)setCustomParameterValue:(NSObject<NSSecureCoding,NSCopying> *)value toParameter:(UInt32)pid atTime:(CMTime)time{if(pid==DYToolsParameterID){_nodeCommitHadUndo=_undoActive;if(_rejectToolsWrites)return NO;}return [super setCustomParameterValue:value toParameter:pid atTime:time];}
|
||||
@end
|
||||
@interface DYWorkspaceDiagnosticRenderer : DYRenderer{
|
||||
@public NSProgress *_preparedTask;void(^_preparedReply)(NSError*);
|
||||
}
|
||||
- (void)completePreparation;
|
||||
@end
|
||||
@implementation DYWorkspaceDiagnosticRenderer
|
||||
- (void)dealloc{[_preparedTask release];[_preparedReply release];[super dealloc];}
|
||||
- (NSProgress *)prepareLUTPath:(NSString *)path completion:(void(^)(NSError*))completion{[_preparedTask release];_preparedTask=[[NSProgress discreteProgressWithTotalUnitCount:1]retain];[_preparedReply release];_preparedReply=[completion copy];return _preparedTask;}
|
||||
- (void)completePreparation{void(^reply)(NSError*)=[_preparedReply copy];[_preparedReply release];_preparedReply=nil;if(reply)reply(nil);[reply release];}
|
||||
@end
|
||||
|
||||
// Cache only the top content strip. A background-painted sibling must never
|
||||
// erase the heading/page selector/close button in that strip.
|
||||
static NSBitmapImageRep *DYWorkspaceHeaderBitmap(NSView *root){
|
||||
NSRect top=NSMakeRect(0,0,root.bounds.size.width,52);NSBitmapImageRep *bitmap=[root bitmapImageRepForCachingDisplayInRect:top];if(bitmap)[root cacheDisplayInRect:top toBitmapImageRep:bitmap];return bitmap;
|
||||
}
|
||||
static NSUInteger DYWorkspaceHeaderInk(NSBitmapImageRep *bitmap,NSView *root,NSView *control){
|
||||
if(!bitmap||!bitmap.pixelsWide||!bitmap.pixelsHigh)return 0;NSColor *base=[[bitmap colorAtX:0 y:0]colorUsingColorSpace:NSColorSpace.deviceRGBColorSpace];if(!base)return 0;
|
||||
CGFloat scale=bitmap.pixelsWide/root.bounds.size.width;NSInteger left=MAX(0,NSInteger(floor(NSMinX(control.frame)*scale))),right=MIN(bitmap.pixelsWide,NSInteger(ceil(NSMaxX(control.frame)*scale)));NSUInteger count=0;
|
||||
for(NSInteger y=0;y<bitmap.pixelsHigh;y++)for(NSInteger x=left;x<right;x++){NSColor *pixel=[[bitmap colorAtX:x y:y]colorUsingColorSpace:NSColorSpace.deviceRGBColorSpace];if(pixel&&(fabs(pixel.redComponent-base.redComponent)+fabs(pixel.greenComponent-base.greenComponent)+fabs(pixel.blueComponent-base.blueComponent)>.12))count++;}
|
||||
return count;
|
||||
}
|
||||
static BOOL DYWorkspaceLargeDirtyPreservesHeader(NSBitmapImageRep *bitmap,NSView *root,NSView *pane){
|
||||
if(!bitmap)return NO;NSData *before=[NSData dataWithBytes:bitmap.bitmapData length:bitmap.bytesPerRow*bitmap.pixelsHigh];
|
||||
[NSGraphicsContext saveGraphicsState];NSGraphicsContext *context=[NSGraphicsContext graphicsContextWithBitmapImageRep:bitmap];[NSGraphicsContext setCurrentContext:context];CGContextRef cg=context.CGContext;
|
||||
// Map the pane's flipped local coordinates into the cached top-strip pixels.
|
||||
// Intentionally bypass AppKit's clipping here: the draw implementation must
|
||||
// itself stay within its bounds even for a deliberately oversized dirty rect.
|
||||
CGContextTranslateCTM(cg,0,bitmap.pixelsHigh);CGContextScaleCTM(cg,bitmap.pixelsWide/root.bounds.size.width,-bitmap.pixelsHigh/52.0);CGContextTranslateCTM(cg,pane.frame.origin.x,pane.frame.origin.y);
|
||||
[pane drawRect:NSInsetRect(pane.bounds,-200,-200)];[NSGraphicsContext restoreGraphicsState];
|
||||
NSData *after=[NSData dataWithBytes:bitmap.bitmapData length:bitmap.bytesPerRow*bitmap.pixelsHigh];return [before isEqual:after];
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
{
|
||||
auto workspaceDrain=[](){double end=NSProcessInfo.processInfo.systemUptime+.04;while(NSProcessInfo.processInfo.systemUptime<end)[[NSRunLoop mainRunLoop]runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:.002]];};
|
||||
NSString *oldLUT=[runtime stringByAppendingPathComponent:@"old.cube"],*retainLUT=[runtime stringByAppendingPathComponent:@"retain.cube"],*newLUT=[runtime stringByAppendingPathComponent:@"new.cube"],*lateLUT=[runtime stringByAppendingPathComponent:@"late.cube"],*userLUT=[runtime stringByAppendingPathComponent:@"user-new.cube"],*nodeLUT=[runtime stringByAppendingPathComponent:@"node.cube"],*deletedLUT=[runtime stringByAppendingPathComponent:@"deleted.cube"];
|
||||
DYWorkspaceDiagnosticHost *host=[[[DYWorkspaceDiagnosticHost alloc]init]autorelease];DYCreateParameters(host,&error);
|
||||
DYWorkspaceDiagnosticRenderer *scopeRenderer=[[[DYWorkspaceDiagnosticRenderer alloc]init]autorelease];
|
||||
DYLUTLibrary *scopeLibrary=[[[DYLUTLibrary alloc]initWithRootURL:[NSURL fileURLWithPath:[runtime stringByAppendingPathComponent:@"workspace-library"]]]autorelease];
|
||||
NSPanel *fixture=[[[NSPanel alloc]initWithContentRect:NSMakeRect(20,30,920,620) styleMask:NSWindowStyleMaskTitled|NSWindowStyleMaskClosable|NSWindowStyleMaskResizable backing:NSBackingStoreBuffered defer:NO]autorelease];host->_parent=fixture.contentView;
|
||||
DYColorWorkspace *workspace=[[[DYColorWorkspace alloc]initWithManager:host renderer:scopeRenderer library:scopeLibrary title:@"原片段"]autorelease];
|
||||
[workspace showRelativeToView:nil];workspaceDrain();NSView *root=[workspace valueForKey:@"root"];
|
||||
run.record(@"workspace-remote-attaches-within-host-permissions",workspace.visible&&host->_requests==1&&!host->_permissionFailure&&root.superview==host->_parent&&!fixture.visible);
|
||||
NSView *scopePane=[workspace valueForKey:@"scopePane"],*heading=[workspace valueForKey:@"heading"],*pages=[workspace valueForKey:@"pages"],*closeButton=nil;for(NSView *control in root.subviews)if([control isKindOfClass:NSButton.class]&&[[(NSButton*)control title]isEqual:@"关闭"])closeButton=control;
|
||||
NSBitmapImageRep *headerBitmap=DYWorkspaceHeaderBitmap(root);NSUInteger headingInk=DYWorkspaceHeaderInk(headerBitmap,root,heading),pagesInk=DYWorkspaceHeaderInk(headerBitmap,root,pages),closeInk=DYWorkspaceHeaderInk(headerBitmap,root,closeButton);
|
||||
NSString *headerPNG=[runtime stringByAppendingPathComponent:@"workspace-topbar.png"];BOOL headerSaved=[[headerBitmap representationUsingType:NSBitmapImageFileTypePNG properties:@{}]writeToFile:headerPNG atomically:YES];
|
||||
run.record(@"workspace-offscreen-topbar-heading-pages-close-render-pixels",headerSaved&&headingInk>20&&pagesInk>50&&closeInk>20,@{@"headingPixels":@(headingInk),@"pagesPixels":@(pagesInk),@"closePixels":@(closeInk),@"path":headerPNG});
|
||||
run.record(@"workspace-content-and-scope-pane-explicitly-clip",root.clipsToBounds&&scopePane.clipsToBounds);
|
||||
run.record(@"workspace-oversized-scope-dirty-cannot-erase-topbar",DYWorkspaceLargeDirtyPreservesHeader(headerBitmap,root,scopePane));
|
||||
[host->_parent setFrameSize:NSMakeSize(800,540)];run.record(@"workspace-follows-remote-container-resize",NSEqualRects(root.frame,host->_parent.bounds));
|
||||
headerBitmap=DYWorkspaceHeaderBitmap(root);headingInk=DYWorkspaceHeaderInk(headerBitmap,root,heading);pagesInk=DYWorkspaceHeaderInk(headerBitmap,root,pages);closeInk=DYWorkspaceHeaderInk(headerBitmap,root,closeButton);
|
||||
run.record(@"workspace-topbar-survives-resize-and-large-dirty-redraw",headingInk>20&&pagesInk>50&&closeInk>20&&DYWorkspaceLargeDirtyPreservesHeader(headerBitmap,root,scopePane),@{@"headingPixels":@(headingInk),@"pagesPixels":@(pagesInk),@"closePixels":@(closeInk)});
|
||||
|
||||
[workspace showRelativeToView:nil];workspaceDrain();run.record(@"workspace-reopens-existing-host-remote-window",host->_requests==2&&workspace.visible&&root.superview==host->_parent);
|
||||
[workspace close];[workspace close];run.record(@"workspace-closes-host-window-once-and-stops-scopes",host->_closes==1&&!workspace.visible&&![[scopeRenderer valueForKey:@"scopeEnabled"]boolValue]&&!host->_permissionFailure&&host->_actionDepth==0);
|
||||
[workspace showRelativeToView:nil];workspaceDrain();[NSNotificationCenter.defaultCenter postNotificationName:NSWindowWillCloseNotification object:fixture];run.record(@"workspace-host-close-cleans-without-recursive-close",!workspace.visible&&host->_closes==1&&!root.superview);
|
||||
[scopeRenderer setScopeEnabled:NO];[scopeRenderer setValue:@{@"time":@99} forKey:@"scopeMetadata"];[scopeRenderer setValue:[NSMutableData dataWithLength:16] forKey:@"scopePreview"];[scopeRenderer setScopeEnabled:YES];
|
||||
run.record(@"workspace-new-scope-session-clears-old-frame",!scopeRenderer.scopeMetadata&&!scopeRenderer.scopePreview);[scopeRenderer setScopeEnabled:NO];
|
||||
// A new active session is needed before delivering asynchronous selections.
|
||||
[workspace showRelativeToView:nil];workspaceDrain();
|
||||
DYAssetState *before=[[DYReadAssets(host,kCMTimeZero)copy]autorelease];before.paths=@{@"look0":oldLUT,@"look1":retainLUT};DYWriteAssets(host,before,kCMTimeZero);
|
||||
int starts=host->_undoStarts,ends=host->_undoEnds;NSError *workspaceError=nil;
|
||||
BOOL wrote=[workspace commitLUT:newLUT expected:[workspace selectionContext] error:&workspaceError];
|
||||
run.record(@"workspace-style1-preserves-other-lut-slots-one-undo",wrote&&[DYReadAssets(host,kCMTimeZero).paths[@"look0"]isEqual:newLUT]&&[DYReadAssets(host,kCMTimeZero).paths[@"look1"]isEqual:retainLUT]&&host->_undoStarts==starts+1&&host->_undoEnds==ends+1);
|
||||
__block BOOL completed=NO;__block NSError *selectionError=nil;starts=host->_undoStarts;
|
||||
[workspace selectLUT:nil completion:^(NSError *e){completed=YES;selectionError=e;}];workspaceDrain();
|
||||
run.record(@"workspace-remove-style1-applies-once-after-async-boundary",completed&&!selectionError&&!DYReadAssets(host,kCMTimeZero).paths[@"look0"]&&host->_undoStarts==starts+1);
|
||||
completed=NO;selectionError=nil;[workspace selectLUT:lateLUT completion:^(NSError *e){completed=YES;selectionError=e;}];host->_workspaceTime=CMTimeMake(1,24);[scopeRenderer completePreparation];
|
||||
run.record(@"workspace-async-playhead-change-keeps-new-frame-untouched",completed&&selectionError&&!DYReadAssets(host,kCMTimeZero).paths[@"look0"]);host->_workspaceTime=kCMTimeZero;
|
||||
completed=NO;selectionError=nil;[workspace selectLUT:lateLUT completion:^(NSError *e){completed=YES;selectionError=e;}];DYAssetState *external=[[DYReadAssets(host,kCMTimeZero)copy]autorelease];external.paths=@{@"look0":userLUT};DYWriteAssets(host,external,kCMTimeZero);[scopeRenderer completePreparation];
|
||||
run.record(@"workspace-async-lut-conflict-preserves-user-change",completed&&selectionError&&[DYReadAssets(host,kCMTimeZero).paths[@"look0"]isEqual:userLUT]);
|
||||
completed=NO;selectionError=nil;[workspace selectLUT:lateLUT completion:^(NSError *e){completed=YES;selectionError=e;}];for(NSDictionary *d in DYDescriptors())if([d[@"key"]isEqual:@"cmworkingTransfer"])[host setFloatValue:3 toParameter:[d[@"pid"]unsignedIntValue] atTime:kCMTimeZero];[scopeRenderer completePreparation];
|
||||
run.record(@"workspace-async-color-context-conflict-preserves-state",completed&&selectionError&&[DYReadAssets(host,kCMTimeZero).paths[@"look0"]isEqual:userLUT]);
|
||||
completed=NO;selectionError=nil;NSProgress *pending=[workspace selectLUT:lateLUT completion:^(NSError *e){completed=YES;selectionError=e;}];[workspace close];[scopeRenderer completePreparation];
|
||||
run.record(@"workspace-close-cancels-pending-selection-without-write",pending.cancelled&&completed&&selectionError&&[DYReadAssets(host,kCMTimeZero).paths[@"look0"]isEqual:userLUT]);
|
||||
NSMutableDictionary *document=DYMutablePlist(DYReadTools(host,kCMTimeZero).document);NSDictionary *look=DYInsertTool(document,@"look",@"base:look");NSString *nodeID=[[look[@"id"]copy]autorelease];BOOL inserted=look&&DYWriteTools(host,document,kCMTimeZero);run.need(@"workspace-independent-style-fixture-inserted",inserted,@{@"node":nodeID?:@"missing",@"validDocument":@(DYValidToolDocument(document))});
|
||||
DYToolManager *node=[[[DYToolManager alloc]initWithHost:host node:look]autorelease];DYColorWorkspace *nodeWorkspace=[[[DYColorWorkspace alloc]initWithManager:node renderer:scopeRenderer library:scopeLibrary title:@"独立风格"]autorelease];starts=host->_undoStarts;host->_nodeCommitHadUndo=NO;
|
||||
wrote=[nodeWorkspace commitLUT:nodeLUT expected:[nodeWorkspace selectionContext] error:&workspaceError];
|
||||
run.record(@"workspace-independent-style1-writes-target-node-inside-undo",wrote&&[DYToolWithID(DYReadTools(host,kCMTimeZero).document,nodeID)[@"paths"][@"look0"]isEqual:nodeLUT]&&[DYReadAssets(host,kCMTimeZero).paths[@"look0"]isEqual:userLUT]&&host->_nodeCommitHadUndo&&host->_undoStarts==starts+1,@{@"written":@(wrote),@"error":workspaceError.localizedDescription?:@"none",@"nodePaths":DYToolWithID(DYReadTools(host,kCMTimeZero).document,nodeID)[@"paths"]?:@{},@"rootStyle1":DYReadAssets(host,kCMTimeZero).paths[@"look0"]?:@"none",@"commitWithinUndo":@(host->_nodeCommitHadUndo),@"undoStartsBefore":@(starts),@"undoStartsAfter":@(host->_undoStarts)});
|
||||
starts=host->_undoStarts;workspaceError=nil;wrote=[nodeWorkspace commitLUT:@"relative.cube" expected:[nodeWorkspace selectionContext] error:&workspaceError];run.record(@"workspace-relative-lut-path-is-rejected-before-undo",!wrote&&workspaceError&&host->_undoStarts==starts&&[DYToolWithID(DYReadTools(host,kCMTimeZero).document,nodeID)[@"paths"][@"look0"]isEqual:nodeLUT]);
|
||||
host->_rejectToolsWrites=YES;workspaceError=nil;wrote=[nodeWorkspace commitLUT:newLUT expected:[nodeWorkspace selectionContext] error:&workspaceError];host->_rejectToolsWrites=NO;
|
||||
run.record(@"workspace-node-host-rejection-is-not-reported-as-applied",!wrote&&workspaceError&&[DYToolWithID(DYReadTools(host,kCMTimeZero).document,nodeID)[@"paths"][@"look0"]isEqual:nodeLUT],@{@"error":workspaceError.localizedDescription?:@"missing"});
|
||||
document=DYMutablePlist(DYReadTools(host,kCMTimeZero).document);DYRemoveTool(document,nodeID);DYWriteTools(host,document,kCMTimeZero);starts=host->_undoStarts;workspaceError=nil;
|
||||
wrote=[nodeWorkspace commitLUT:deletedLUT expected:[nodeWorkspace selectionContext] error:&workspaceError];run.record(@"workspace-deleted-node-does-not-write-another-layer",!wrote&&workspaceError&&host->_undoStarts==starts&&[DYReadAssets(host,kCMTimeZero).paths[@"look0"]isEqual:userLUT]);
|
||||
[nodeWorkspace close];run.record(@"workspace-offscreen-fixtures-never-presented",!fixture.visible&&!host->_permissionFailure&&host->_actionDepth==0);
|
||||
// Run the production final-tile sampling and worker color conversion on a
|
||||
// known premultiplied half-float host output, independently of LUT analysis.
|
||||
DYDiagnosticTile *finalTile=[[[DYDiagnosticTile alloc]initWithDevice:gpu width:4 height:4]autorelease];CGColorSpaceRef finalSpace=CGColorSpaceCreateWithName(kCGColorSpaceExtendedLinearSRGB);[finalTile setDiagnosticColorSpace:finalSpace];CGColorSpaceRelease(finalSpace);
|
||||
std::vector<__fp16> finalPixels(4*4*4);for(unsigned i=0;i<16;i++){finalPixels[i*4]=.125f;finalPixels[i*4+1]=.25f;finalPixels[i*4+2]=.375f;finalPixels[i*4+3]=.5f;}[[finalTile metalTextureForDevice:gpu]replaceRegion:MTLRegionMake2D(0,0,4,4) mipmapLevel:0 withBytes:finalPixels.data() bytesPerRow:4*8];
|
||||
[scopeRenderer setScopeEnabled:YES];[scopeRenderer captureScopeTile:finalTile atTime:CMTimeMake(7,24)];double scopeDeadline=NSProcessInfo.processInfo.systemUptime+5;while(!scopeRenderer.scopeMetadata&&NSProcessInfo.processInfo.systemUptime<scopeDeadline)[[NSRunLoop mainRunLoop]runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:.005]];
|
||||
NSDictionary *scopeData=scopeRenderer.scopeMetadata;NSData *finalPreview=scopeRenderer.scopePreview;const float *finalSample=(const float*)finalPreview.bytes;
|
||||
run.record(@"workspace-final-output-sample-unpremultiplies-and-converts-real-icc",[scopeData[@"converted"]boolValue]&&[scopeData[@"valid"]unsignedIntegerValue]==320*180&&finalPreview.length==320*180*16&&fabs(finalSample[0]-.537099)<.003&&fabs(finalSample[1]-.735357)<.003&&fabs(finalSample[2]-.880825)<.003&&finalSample[3]==.5f);
|
||||
run.record(@"workspace-final-output-worker-publishes-real-scope-rasters",[scopeData[@"waveform"]length]==320*256*4&&[scopeData[@"parade"]length]==3*320*256*4&&[scopeData[@"histogram"]length]==4*256*4&&[scopeData[@"wholeImage"]boolValue]);
|
||||
[scopeRenderer setScopeEnabled:NO];[scopeRenderer captureScopeTile:finalTile atTime:CMTimeMake(8,24)];workspaceDrain();run.record(@"workspace-hidden-scope-capture-does-no-work",[scopeRenderer.scopeMetadata isEqual:scopeData]);
|
||||
}
|
||||
+3
-3
@@ -17,9 +17,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XPC!</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.8.3</string>
|
||||
<string>1.10.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>62</string>
|
||||
<string>72</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.8.3</string>
|
||||
<string>1.10.0</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>className</key>
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.8.3</string>
|
||||
<string>1.10.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>62</string>
|
||||
<string>72</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
||||
+38
-18
@@ -1,37 +1,57 @@
|
||||
# 2026-11-04 画布工具与辅助工作区:1.10.0(72)验收完成
|
||||
|
||||
当前正式安装 **1.10.0(72)**,固定位置 `/Library/Plug-Ins/FxPlug/大鱼调色.app`,主 Bundle ID `com.dayu.color`,XPC `com.dayu.color.XPC`。实际编译源码 `80dec904bedf5f704b29d16325fa95d639f3a250`;Developer ID 团队 B3W25FX5H5,APP 公证 `c0209032-38d2-4434-8e37-7f911414c3c6` Accepted。票据、Gatekeeper、唯一 PluginKit 正式路径、正式安装的 **695 项原生检查**与用户实鼠验收通过。
|
||||
|
||||
画布侧改为纵向十四工具入口,支持多个独立移动、折叠和关闭的浮动工具面板。曲线直接添加、拖动、删除点并切 RGB 通道;颜色分级提供四个实际色轮,二者可切换参数页。其它工具继续使用原有参数和图层 UUID;移动面板与切换编辑视图不进入调色撤销。
|
||||
|
||||
外部“工作区 · 示波器 / LUT”由 FxRemoteWindow 托管。亮度波形、RGB 分列和直方图采集当前效果输出并标注 sRGB 显示参考/分块限制;不包含其后其他效果或宿主显示转换,也不替代 HDR/IRE 测量。LUT 页预览与应用风格1。用户明确确认曲线拖点/一次撤销、外窗 LUT 预览、移动播放头后示波器更新“三项都正常”,见 `verification/HostWorkspace1.10.0.json`。
|
||||
|
||||
最终 PKG `../发行包/大鱼调色-1.10.0.pkg`,43,090,565 字节,SHA-256 `ee70461c9b2d2e0ddd78cbcb3371c3b1b36b7f0e5fc69bfccc7ac0f1a3e468d8`,Installer 签名、公证 `9604cc73-153c-4751-ac5b-2cca76b4c219` Accepted、票据、Gatekeeper 和20项展开验包通过。APP 已独立安装验收,本轮未重复执行系统 PKG 安装脚本。`verification/Package.json` 是本版验包记录。
|
||||
|
||||
按用户要求,公证后先更新原文章 https://dayu.media/15792/:标题及正文说明“紧急 UI 更新”,新生成封面,深色/浅色两张用户原图,主下载包更新为本版;50元、有效会员免费及其它商业/视频设置保留。前台SEO逐项一致、旧图移除、新图原始哈希与正式包完整下载校验通过。素材、正文、提示词与验证分别保存在 `Publishing/1.10.0/`、`verification/Article1.10.0.json`。未修改 NAS 源码、生产接口或自动更新清单。
|
||||
|
||||
远端 https://dayu.media/git/dayu/dayu-color.git,main。发行目标标签 `v1.10.0-canvas-workspace-20261104`;Git Release 仍待上传与完整下载核验,不能将旧版 `Release.json` 当作本版记录。标签包含最终 Package.json 与文章记录;发布后 Release.json 保存在后续 main,不移动已有标签。71 因实窗顶栏缺陷被72替代未发布,70包保留为历史未发布候选。
|
||||
|
||||
独立远程 checkout 已核对实际编译提交、526个跟踪文件、Git fsck、8个锁定依赖归档、插件/诊断/工作区/渲染器四个翻译单元 C++20 语法,见 `verification/WorkspaceRecovery1.10.0.json`。无 LFS/子模块,未重复完整重建 CMS 依赖。Xcode27.1、FxPlug SDK4.3.5、Apple Silicon/macOS14.6+;签名/公证凭据需独立恢复,不在 Git。
|
||||
|
||||
正式验收后已清理任务生成的70/71旧安装恢复APP、缓存生成APP和公证ZIP,见 `verification/WorkspacePendingCleanup1.10.0.json`;源码恢复checkout暂留供最终标签核验。源码、历史包和用户QA媒体保留。恢复具体步骤沿用下文,当前版本以本节和相应验证记录为准。
|
||||
|
||||
以下为上一完整发布版 1.8.5(67)及历史交接,供恢复参考。
|
||||
|
||||
# 大鱼调色开发交接
|
||||
|
||||
2026年11月4日,Asia/Shanghai。本轮正式版本 **1.8.3(62)**,在1.8.2基础上新增炫彩主题与曲线直方图。此前完整CMS、黑金及发布流程交接已逐字节归档到 research/handoffs/DayuColorThrough1.8.2-20261104.md;其旧版本号与黑金默认要求属于历史,用户本轮视觉反馈优先。
|
||||
2026-11-04,Asia/Shanghai。当前正式1.8.5(67),实际编译源码d39004c26af3c0c5853111faef7e40e6c66f6aa6。工程 /Volumes/备份/大鱼调色/大鱼调色,main,https://dayu.media/git/dayu/dayu-color.git。AppKit/Objective-C++,Wrapper Application / Release,macOS14.6+,Apple Silicon,Xcode27.1/FxPlug4.3.5。
|
||||
|
||||
实际工程 /Volumes/备份/大鱼调色/大鱼调色;Xcode工程“大鱼调色.xcodeproj”,Wrapper Application / Release;检查器为Objective-C++/AppKit。平台Apple Silicon/macOS14.6+,本机Xcode27.1、FxPlug4.3.5。唯一正式安装 /Library/Plug-Ins/FxPlug/大鱼调色.app,主ID com.dayu.color,内部 com.dayu.color.XPC。固定缓存 /Users/mac/Library/Caches/CodexBuilds/com.dayu.color。
|
||||
唯一正式APP /Library/Plug-Ins/FxPlug/大鱼调色.app;主ID com.dayu.color,内部com.dayu.color.XPC。固定构建缓存 /Users/mac/Library/Caches/CodexBuilds/com.dayu.color。正式签名团队B3W25FX5H5,公证profile codex-dayu-notary-B3W25FX5H5。交付锁/仓库锁按全局规则。
|
||||
|
||||
源码远程 https://dayu.media/git/dayu/dayu-color.git,main;实际编译源码 **3fd015224037df944b428684c43ec8ec7accea85**。版本标签 v1.8.3-neon-histogram-20261104;完整标签提交及PKG/Release摘要见最终 verification/Package.json、Release.json、NeonRecovery1.8.3.json。标签包含Package.json,后续发布回读另作main提交,不移动已有标签。无LFS/子模块。
|
||||
## 最新视觉要求与结果
|
||||
|
||||
## 用户最新视觉要求
|
||||
用户已认可浅色拟物版(65,“不错”),随后要求深色同系列:深底、浅字、高亮边框,阴影变光晕。最新要求取代更早“保留近黑底”的历史限制,旧交接已归档research/handoffs/DayuColorThrough1.8.4-20261104.md。不要恢复分模块大红大绿、大片统一紫色或深蓝灰底。
|
||||
|
||||
用户否决了候选60“大片紫色”,又否决候选61“深蓝灰与青色主题近似”。最终62使用分模块双色渐变表面:一级紫红、蜘蛛盘青蓝、基础珊瑚玫红、肤色橙红、HSL绿青、曲线青蓝等。卡片、标题与图标都跟随模块色相;背景为有色相的紫/蓝/青渐变,不再使用深蓝灰方案。白色正文,洋红到青色的重点按钮与滑杆。不要在后续调整中自动恢复全紫或统一蓝灰。
|
||||
最终只保留“浅色 / 深色”两种模式。9个彩色色签已换成两个44pt文字按钮;旧0–6主题及palette已删除,不能再选择。内部偏好ID仍用7/8兼容已认可的浅/深选择;旧0–6读取回落深色,未保存偏好的新用户默认浅色。没有自动跟随系统功能,模式由顶部按钮手动切换,本机实看选择深色。
|
||||
|
||||
主题追加ID6“霓虹炫彩”;旧0–5不改编号,未保存偏好默认6,明确旧选择保留。本机已在正式FCP切到6,冷重开保持。偏好域com.dayu.color.preferences/themeIndex;主题不写入工程或预设。大面积表面均为不透明静态渐变,无持续动画,炫彩文字不发光。
|
||||
浅色为冰蓝底/深青文字、白蓝反光边、柔和投影与内凹滑轨/数值框;深色为中性炭黑、浅色文字、冷白反射边与局部青蓝表面光晕。模块统一中性表面,保存按钮保留蓝紫到青渐变。两套palette及浮雕绘制主体与66一致。主题域com.dayu.color.preferences/themeIndex,与调色工程隔离。
|
||||
|
||||
## 直方图实现与边界
|
||||
仅UI绘制/主题、LUT浏览窗口配色和版本变化,不改数学、CMS、GPU、Uniform、参数ID、预设格式或模板。原生按钮/菜单/焦点/动作不变;无新动画/透明材质,文字不发光。增强对比使用明确边框,减少透明度取消装饰投影/光晕。
|
||||
|
||||
DYHistogram.h统计既有320×180浮点分析缓存,在渲染工作线程生成不可变256档亮度/R/G/B快照,主线程只绘制。透明、NaN、无穷像素不计;范围外归端点;各通道共用峰值并作平方根高度。RGB页叠加4通道,单色页只绘对应通道,直方图默认开启、可显隐;新建检查器重置显示开关,不写参数/撤销/预设。
|
||||
## 验证
|
||||
|
||||
原流程分析源为一级CST/输入LUT后;新CMS为显示输出转换后、SDR修饰前。**不是最终输出示波器,不保证每个局部曲线层的即时输入。** 显示编码亮度是Rec.709系数加权码值,并非场景线性亮度/HDR测量。最多每0.5秒更新,依赖宿主渲染;无缓存显示“等待画面”。工具提示列明来源/采样范围。没有改变GPU数学、Uniform、参数ID、CMS、模板或预设格式。
|
||||
610项正式原生检查通过(删除旧主题对应的检查,加入旧模式不可选及双按钮布局核验)。浅/深文字最低sRGB对比4.613/5.665。280/320/400栏宽、深浅两模式、CMS nil/v2/v3不变、直方图与渲染合同通过。FCP12.4使用正式67路径,实看深色卡片/按钮反光与光晕、基础调整展开/收起、凹槽滑杆/数值框及LUT浏览窗口,7/8可切换。直方图57,600有效采样可用。
|
||||
|
||||
关键文件:DYTheme.mm、DYInspector.mm、DYHistogram.h、DYRenderer.h/mm、DYManagedRender.inc.h、DYCompactUIDiagnostics.inc.h。独立层共用renderer且各自观察其通知,缓存按renderer隔离,失效时清空旧直方图。勿新增定时器、全分辨率读取或UI线程像素统计。
|
||||
外观操作前后完整预设8,590字节逐字节相同,SHA256 1f05b3e350dd5fbc054de155062aff87fdd4d46c6a762ee06650ad5bd3363982。65浅色同版冷重开主题保留;67在宿主正式退出后重启载入,后续同版冷重开范围见当前Host报告。VoiceOver实听、完整系统辅助显示矩阵与Instruments未执行。HostTwoModes1.8.5.json、历史HostDualSoft1.8.5.json及HostSoft1.8.5.json、InstalledSelfTest.json和research/ui-soft-20261104/validation.md保留范围,不把数值测试/暂定评分当作用户美学认可。
|
||||
|
||||
## 正式验证
|
||||
APP公证Accepted记录见verification/Delivery.json;签名、票据、Gatekeeper、唯一PluginKit发现路径与启动通过。已认可浅色65记录保留SoftLight65Delivery/SelfTest;66的双主题候选曾验包但未上传,记录Soft66Package.json。最终发行包使用67,不把旧候选当成最新。最终安装包、Release和恢复/清理状态以verification/Package.json、Release.json、SoftRecovery1.8.5.json及SoftCleanup1.8.5.json为准;包完成前不能引用旧Package/Release作1.8.5成功证据。
|
||||
|
||||
605项正式原生检查通过;FCP12.4实看最终多色表面、RGB/红/绿/蓝及显隐、色块与真实运动视频的分布更新;最终冷重开主题保持、颜色设置收起、直方图拿到57,600有效采样。完整原预设8,590字节在恢复测试点及最终冷重开后逐字节一致,SHA-256 1f05b3e350dd5fbc054de155062aff87fdd4d46c6a762ee06650ad5bd3363982。
|
||||
## 保持的合同与继续交付
|
||||
|
||||
候选60期间在图表中心添加的masterX0=0.5点在61冷重开后仍保留,最终通过原生载入预设恢复;不能把该主动交互产生的参数差异算作主题修改。拖动/删除没有单独完整验收,不宣称全手势覆盖。无VoiceOver、辅助显示选项矩阵或Instruments全性能采样。SwiftUI扫描器无Swift文件,记录不适用。详细证据见 HostNeon1.8.3.json及 research/ui-neon-20261104/validation.md。
|
||||
直方图仍用320×180浮点分析缓存、256档、最多2Hz;透明/非有限不计、超范围归端点、共同峰值平方根缩放。RGB叠亮度/三色,单色只相应通道。原流程源为一级CST/输入LUT后,新CMS为显示输出转换后SDR修饰前;不是最终输出/HDR示波器或每层即时输入。工作线程统计,UI画快照,renderer隔离,失效清空。
|
||||
|
||||
APP公证706a58bb-2fa4-4b1e-b392-de60d93aef49,Accepted;正式安装签名/票据/Gatekeeper和实际FCP服务路径通过。发行包由PKG工坊制作并展开验包;本轮APP直接正式安装验收,没有再次执行PKG系统安装脚本。PKG与Release完成状态以相应最终报告为准。未更改NAS后端、网站文章或自动更新清单。
|
||||
预设v7、nil/v2/v3 CMS、模板原默认保持。高级颜色设置默认收起且不写参数。完整历史由归档交接追溯。ColorManagement含8个必要依赖源包/许可证,无LFS/子模块;凭据和证书不在Git。未改NAS后端、网站文章或自动更新清单。
|
||||
|
||||
## 继续开发与交付
|
||||
tools/checkpoint.py对明确路径提交/推送/回读,自带锁。tools/deliver.py持产品锁至宿主验收,HEAD保持实际编译提交,通过后complete。Packaging/build_pkg.py复用PKG工坊严格签名、公证、展开验包;APP独立安装验收,验包不等于执行安装脚本。Packaging/publish_beta.py以已推标签准备草稿;草稿404用正常已登录浏览器下载真实附件后--verified-download,再发布和完整下载回读。不覆盖旧附件、不移动旧标签,保持既有仓库可见性。
|
||||
|
||||
保护nil/v2/v3色彩流程、预设v7及模板默认,不因UI改动修改CMS。高级“颜色设置”仍默认收起,开关不改模型。详细数学与恢复依赖按上述历史完整交接和RECOVERY.md。
|
||||
正式验证后只清理本任务生成APP、提交ZIP、临时旧安装备份、下载和恢复clone,保留源码/历史包/私人QA媒体。RECOVERY.md记录恢复方式;源码远程备份不替代签名凭据独立备份。
|
||||
|
||||
tools/checkpoint.py对明确文件提交/推送并核验main,自带仓库锁。tools/deliver.py取得产品锁,保持HEAD直到Delivery.json写入实际编译SHA;正式安装验收通过才输入complete。Packaging/build_pkg.py与Packaging/publish_beta.py复用PKG工坊,最终版本包不进入Git。草稿附件404先确认已上传,使用正常已登录浏览器完整下载后传--verified-download,不重复POST、不提前发布。
|
||||
最终67正式PKG 43010987字节,SHA-256 b4540c2be931d9e042ed1a6f2673c001e4b6e0ec67eef0bc22f4b3977af4952b,公证04fae6f1-7e38-4ab4-8c12-7bcae0ea77fd Accepted,Installer签名/票据/Gatekeeper及20项展开验包通过。源码及正式包记录随v1.8.5-light-dark-20261104标签保存;实际Release/下载回读另见后续Release.json。
|
||||
|
||||
源代码、历史发行包、私人QA媒体与预设保留。只清理本任务识别的生成APP、旧安装备份、提交ZIP、恢复clone与下载副本;不能扩大为整盘清理。密钥/证书不在Git,发布时重新验证,身份与锁按本机全局约定。
|
||||
最终Release386/附件30已发布并回读:https://dayu.media/git/dayu/dayu-color/releases/tag/v1.8.5-light-dark-20261104。标签完整提交def8c2f6386a3d34453912b9e8f96e37e192796c;草稿Edge真实下载与发布后再次完整下载均核对43010987字节、SHA-256 b4540c2be931d9e042ed1a6f2673c001e4b6e0ec67eef0bc22f4b3977af4952b。PKG公证04fae6f1-7e38-4ab4-8c12-7bcae0ea77fd Accepted。独立远程版本标签498个文件与8个依赖归档校验,编译输入一致;本轮未独立重新编译。生成APP、旧安装备份、候选66包、下载副本及恢复clone按SoftCleanup1.8.5.json清理,正式67安装和最终PKG/历史包保留。标签包含最终Package.json;标签快照里的旧Release.json是上一版历史,1.8.5发布回读在后续main,不移动既有标签。
|
||||
在新工单中引用
屏蔽一个用户