From 96fa0a49a51d23a2c32338c7cc8c673aadbebbe2 Mon Sep 17 00:00:00 2001 From: mac Date: Mon, 2 Nov 2026 15:19:04 +0800 Subject: [PATCH] Preserve FCP omitted legacy values while seeding automatic mapping in new templates --- README.md | 4 ++-- template/sources/RegisteredParameters.json | 3 ++- template/verification/Compatibility.json | 6 +++--- template/verification/Files.sha256.json | 12 ++++++------ template/verification/SavedSelection.json | 2 +- template/verification/SkillAudit.json | 2 +- template/verification/StaticContract.json | 2 +- template/大鱼调色.moef | 2 +- tools/build_template.py | 5 +++-- .../PrimaryDefaultBuild38Superseded.json | 18 ++++++++++++++++++ 大鱼调色/Plugin/DYModel.mm | 7 +++++-- 大鱼调色/Plugin/Info.plist | 2 +- 大鱼调色/Wrapper Application/Info.plist | 2 +- 13 files changed, 45 insertions(+), 22 deletions(-) create mode 100644 verification/PrimaryDefaultBuild38Superseded.json diff --git a/README.md b/README.md index 09d017c..10fea90 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 大鱼调色 -原生 FxPlug 4 调色器,当前正式安装版本 **1.6.0(38)**。唯一安装位置为 `/Library/Plug-Ins/FxPlug/大鱼调色.app`;Final Cut Pro 中从“效果 → 大鱼调色”添加。 +原生 FxPlug 4 调色器,当前正式安装版本 **1.6.0(39)**。唯一安装位置为 `/Library/Plug-Ins/FxPlug/大鱼调色.app`;Final Cut Pro 中从“效果 → 大鱼调色”添加。 交接与恢复入口:[大鱼调色FxPlug4交接.md](大鱼调色FxPlug4交接.md)。 @@ -16,7 +16,7 @@ 349项原生检查、四种尺寸184项原版组件对照通过。FCP12.4验证旧234参数、LUT路径、蜘蛛盘和全部287键蒙版载荷不变;新增层默认值、蒙版数量、折叠、删除撤销/重做、冷重开通过。1920×1080正式导出验证“两帧保持”,组合预设8987字节及颗粒预设8420字节重开前后逐字节一致。见[研究与边界](research/ColorFinaleFilmMixer.md)、[组件对照](verification/FilmMixerReference.json)、[宿主验收](verification/HostFilmMixer1.5.0.json)。 -新实例、全部还原及新加一级层的自动色调映射默认开启;已保存的关闭设置和旧独立一级层的缺省关闭保持。在主标题区增加可点击的“更多插件访问 https://dayu.media”。 +FCP新实例、全部还原及新加一级层的自动色调映射默认开启;已保存的关闭设置和旧独立一级层的缺省关闭保持。在主标题区增加可点击的“更多插件访问 https://dayu.media”。 ## 1.6.0 八种印片与简洁模板 diff --git a/template/sources/RegisteredParameters.json b/template/sources/RegisteredParameters.json index 84addaf..acddacf 100644 --- a/template/sources/RegisteredParameters.json +++ b/template/sources/RegisteredParameters.json @@ -853,6 +853,7 @@ { "cmTab": 2, "default": 1, + "hostDefault": 0, "key": "cmtoneMapping", "kind": "popup", "max": 1, @@ -3638,7 +3639,7 @@ "大鱼调色/Plugin/DYFilmMath.h": "945b7036c6aa6d27941a3bf96c4d70dec65a14b1747fba618e650738fa7108f0", "大鱼调色/Plugin/DYFilmTypes.h": "c35a43b5b93988e8517e5db8f281da0dfd1e02f5b0e7bfb62e7345cec444a36d", "大鱼调色/Plugin/DYModel.h": "80e88add97deeac7a9dc47d12f68b0245905786297de2e6553b3da15c729da6e", - "大鱼调色/Plugin/DYModel.mm": "60c60bfbddeaaa23083e0283714248b60e3952dcda9acb6a65cd6b7fa15fd893", + "大鱼调色/Plugin/DYModel.mm": "bde987e48f79e5cf8e2e6bccc49cac27d420979d27e0e6859a27e98d0bd7bad7", "大鱼调色/Plugin/DYSpiderState.h": "0c80747e41e8fc97762e301b011bd08c18865a825eaafde086ed79ace37b22f9", "大鱼调色/Plugin/DYToolState.h": "28088ec819307a60f2e52334fd807a514c3ff8a550bc0efbe7069b68a6242320", "大鱼调色/Plugin/DYToolState.mm": "7b113450ae43e0e5d478d8f0e4212b7d25e47d3cc8bc0d4d868ab58c98d3c56c", diff --git a/template/verification/Compatibility.json b/template/verification/Compatibility.json index b7f0e3a..9386fc8 100644 --- a/template/verification/Compatibility.json +++ b/template/verification/Compatibility.json @@ -1,6 +1,6 @@ { "passed": true, - "sha256": "6368e0026bb0270f507e7595852fba3c39a25743ccfe56a7f8f47cfd0872fed2", + "sha256": "fe6b9ed9a59e1e00de7bcad4526bc98fa2d5fde5cab490fd65ec999835ab2250", "version": "5.11", "displayversion": "5.4.5", "nativeReference": { @@ -18,7 +18,7 @@ }, "staticContract": { "passed": true, - "sha256": "6368e0026bb0270f507e7595852fba3c39a25743ccfe56a7f8f47cfd0872fed2", + "sha256": "fe6b9ed9a59e1e00de7bcad4526bc98fa2d5fde5cab490fd65ec999835ab2250", "version": "5.11", "displayversion": "5.4.5", "filterCount": 1, @@ -55,7 +55,7 @@ }, "savedSelection": { "passed": true, - "sha256": "6368e0026bb0270f507e7595852fba3c39a25743ccfe56a7f8f47cfd0872fed2", + "sha256": "fe6b9ed9a59e1e00de7bcad4526bc98fa2d5fde5cab490fd65ec999835ab2250", "version": "5.11", "selectionMask": "0x10000001", "projectID": "10000", diff --git a/template/verification/Files.sha256.json b/template/verification/Files.sha256.json index c9404bd..4510167 100644 --- a/template/verification/Files.sha256.json +++ b/template/verification/Files.sha256.json @@ -5,11 +5,11 @@ "sources/NativeFactories.xml": "5db79ab22e948ca2bdf9162beb60d8380a95ceff6c74e86ff095804ae1d832b6", "sources/NativeFxPlugShell.xml": "5d2a1e807fb7148e5a682c83ba30d7022c8680d2ca8309c502d30f4b12efad64", "sources/Provenance.json": "9cfa41fd1f02b35b99cad56a4a048bafa1c627da181006f5b9186a104664f421", - "sources/RegisteredParameters.json": "93e6e053adeac8d7b66486aef546d6e61c92cc66ac122b154fda3095cce2b0b6", + "sources/RegisteredParameters.json": "9937a076df8b1f8dba7aea8701810bf84f9819337bbfe87ddcecb36d6f279289", "tools/dump_model.mm": "04e04446aa351d774913bc25b06512fefe7969bdf4c6e471a91f1e9d6c4fc3b5", - "verification/SavedSelection.json": "6a182996deea48a975c1954d71e90e84d3aacb0443f2472578a6c425166ce674", - "verification/SkillAudit.json": "4d5bb2abbc4d502b2455b0c6a6be6d750bbc090fd12fa440e5aa624e92416fab", - "verification/StaticContract.json": "a1df90a64a103c0ec36cc641eca274a9584387b70dd02fe1a8557f504260b627", - "大鱼调色.moef": "6368e0026bb0270f507e7595852fba3c39a25743ccfe56a7f8f47cfd0872fed2", - "verification/Compatibility.json": "f2db568f806cdfb29a7bab3c6ea5e4a404b780d0468f079f30dfbd75a2875d9d" + "verification/SavedSelection.json": "7408fb149fcb88db9335af7076d6e7afb07c3074a19e9935343b4d8c5c76bec5", + "verification/SkillAudit.json": "eda67532a7ab8abaf24d8eff890235d2dd13bf4c70472684fcfbbd9b2b21e08b", + "verification/StaticContract.json": "afc6ed629d21b6f535b767f180891566bc6700ea9a7d85e1e364a435efe2d063", + "大鱼调色.moef": "fe6b9ed9a59e1e00de7bcad4526bc98fa2d5fde5cab490fd65ec999835ab2250", + "verification/Compatibility.json": "517cff6f5cb7229fdf725adf687e6039e91b20359c412e4bdbd71e4fcb1bed88" } diff --git a/template/verification/SavedSelection.json b/template/verification/SavedSelection.json index 8382110..aa45a8a 100644 --- a/template/verification/SavedSelection.json +++ b/template/verification/SavedSelection.json @@ -1,6 +1,6 @@ { "passed": true, - "sha256": "6368e0026bb0270f507e7595852fba3c39a25743ccfe56a7f8f47cfd0872fed2", + "sha256": "fe6b9ed9a59e1e00de7bcad4526bc98fa2d5fde5cab490fd65ec999835ab2250", "version": "5.11", "selectionMask": "0x10000001", "projectID": "10000", diff --git a/template/verification/SkillAudit.json b/template/verification/SkillAudit.json index f44dd1f..874df90 100644 --- a/template/verification/SkillAudit.json +++ b/template/verification/SkillAudit.json @@ -16,7 +16,7 @@ }, "savedSelection": { "passed": false, - "sha256": "6368e0026bb0270f507e7595852fba3c39a25743ccfe56a7f8f47cfd0872fed2", + "sha256": "fe6b9ed9a59e1e00de7bcad4526bc98fa2d5fde5cab490fd65ec999835ab2250", "selectionMask": "0x10000001", "nativeUIVerified": false, "scope": "Saved selection fields for observed schema; no rendering or GUI operation", diff --git a/template/verification/StaticContract.json b/template/verification/StaticContract.json index 8c67701..2423adb 100644 --- a/template/verification/StaticContract.json +++ b/template/verification/StaticContract.json @@ -1,6 +1,6 @@ { "passed": true, - "sha256": "6368e0026bb0270f507e7595852fba3c39a25743ccfe56a7f8f47cfd0872fed2", + "sha256": "fe6b9ed9a59e1e00de7bcad4526bc98fa2d5fde5cab490fd65ec999835ab2250", "version": "5.11", "displayversion": "5.4.5", "filterCount": 1, diff --git a/template/大鱼调色.moef b/template/大鱼调色.moef index a642810..605f558 100644 --- a/template/大鱼调色.moef +++ b/template/大鱼调色.moef @@ -270,7 +270,7 @@ - + diff --git a/tools/build_template.py b/tools/build_template.py index 3d9d008..9a6b873 100644 --- a/tools/build_template.py +++ b/tools/build_template.py @@ -91,7 +91,8 @@ def build(model): E.SubElement(param,'defaultVal').text=text;E.SubElement(param,'dataValue').text=text for row in model['parameters']: value=format(float(row['default']),'.17g') - E.SubElement(filt,'parameter',name=row['title'],id=str(row['pid']),flags='12889161776' if row.get('notAnimatable') else '12889161760',default=value,value=value) + host_default=format(float(row.get('hostDefault',row['default'])),'.17g') + E.SubElement(filt,'parameter',name=row['title'],id=str(row['pid']),flags='12889161776' if row.get('notAnimatable') else '12889161760',default=host_default,value=value) for node in host: if node.get("id")=="10005":node.set("value","1");node.set("default","0");node.set("flags","8589934592") filt.append(node) @@ -127,7 +128,7 @@ def verify(data,model): assert len(params)==len(list(f.findall('parameter'))) assert params["10005"].get("value")=="1" and params["10005"].get("flags")=="8589934592" and f.get("pluginVersion")=="0" for row in model['parameters']: - p=params[str(row['pid'])];assert float(p.get('default'))==float(row['default'])==float(p.get('value')) + p=params[str(row['pid'])];assert float(p.get('default'))==float(row.get('hostDefault',row['default'])) and float(p.get('value'))==float(row['default']) assert all(not v in data for v in (b'CameraRawTables',b'1.png',b'relativeURL')) assert len(root.findall('.//behavior'))==0 and len(root.findall('.//keypoint'))==0 assert scene.find('.//scenenode[@name="效果源"]/parameter[@id="2"]/parameter[@id="321"]').get('value')=='3' diff --git a/verification/PrimaryDefaultBuild38Superseded.json b/verification/PrimaryDefaultBuild38Superseded.json new file mode 100644 index 0000000..4c3c7c3 --- /dev/null +++ b/verification/PrimaryDefaultBuild38Superseded.json @@ -0,0 +1,18 @@ +{ + "status": "superseded-during-host-acceptance", + "path": "/Library/Plug-Ins/FxPlug/大鱼调色.app", + "bundleID": "com.dayu.color", + "version": "1.6.0", + "build": "38", + "team": "B3W25FX5H5", + "notaryID": "9dc58db0-4d1d-4019-9735-c163198ad772", + "notaryStatus": "Accepted", + "gatekeeper": "/Library/Plug-Ins/FxPlug/大鱼调色.app: accepted\nsource=Notarized Developer ID", + "sourceCommit": "378cd2b6ec6ed9654bf9a33c807779d0c2636728", + "templatePath": "/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef", + "templateSHA256": "6368e0026bb0270f507e7595852fba3c39a25743ccfe56a7f8f47cfd0872fed2", + "shaderSHA256": "6ec98b85aeb841f9988a4b66e3e5fba9e34d5ab3d7542c9205b0480c77f9ac6d", + "previousInstallBackup": "/Library/Plug-Ins/FxPlug/.dayu-color-previous-684c5c21673647e88760e9a82acc0564.app", + "reason": "FCP omits historical default-zero values; host acceptance detected old instance mapping changed. Preserve the registered zero default and explicitly seed enabled in new MOEF.", + "published": false +} diff --git a/大鱼调色/Plugin/DYModel.mm b/大鱼调色/Plugin/DYModel.mm index e43f90e..6a4c754 100644 --- a/大鱼调色/Plugin/DYModel.mm +++ b/大鱼调色/Plugin/DYModel.mm @@ -110,7 +110,10 @@ static void initialize(){static dispatch_once_t once;dispatch_once(&once,^{ CM(white,@"白点",.5,1.5,1,1);CM(shoulder,@"肩部压缩",0,1,.5,1);CM(highlights,@"一级高光",-1,1,0,1);CM(midtones,@"一级中间调",-1,1,0,1);CM(shadows,@"一级阴影",-1,1,0,1);CM(black,@"黑点",-1,1,0,1);CM(toe,@"趾部压缩",0,1,.5,1);CM(chromaMix,@"色度混合",0,1,.5,1); CM(bypassExposure,@"旁路一级曝光",0,1,0,1);CM(bypassBalance,@"旁路一级色彩",0,1,0,1);CM(bypassContrast,@"旁路一级对比",0,1,0,1);CM(bypassTone,@"旁路一级影调",0,1,0,1); CM(outputEnabled,@"输出转换启用",0,1,1,2);CH(outputTransfer,@"输出曲线",1002,2,transfers);CH(outputGamut,@"输出色域",22,2,DYCMGamuts()); - [cm addObject:cmRow(@"cmtoneMapping",@"自动色调映射",offsetof(DYCMSettings,toneMapping),0,1,1,2,@[@{@"id":@0,@"name":@"关闭"},@{@"id":@1,@"name":@"开启"}])]; + NSMutableDictionary *mapping=[[cmRow(@"cmtoneMapping",@"自动色调映射",offsetof(DYCMSettings,toneMapping),0,1,1,2,@[@{@"id":@0,@"name":@"关闭"},@{@"id":@1,@"name":@"开启"}]) mutableCopy]autorelease]; + // Keep the host's historical stored default. FCP omits unchanged values in + // old projects; the current template explicitly seeds the new enabled value. + mapping[@"hostDefault"]=@0;[descriptors replaceObjectAtIndex:descriptors.count-1 withObject:mapping];[cm addObject:mapping]; #undef CM #undef CH NSMutableArray *input=[NSMutableArray array],*primary=[NSMutableArray array],*output=[NSMutableArray array]; @@ -195,7 +198,7 @@ void DYReadUniforms(idm,CMTime t,DYUniforms*u){DYDefaultUniform } BOOL DYCreateParameters(idm,NSError**error){ida=[m apiForProtocol:@protocol(FxParameterCreationAPI_v5)];BOOL ok=a!=nil; ok=[a addCustomParameterWithName:@"大鱼调色" parameterID:DYInspectorParameterID defaultValue:[[[DYInspectorToken alloc]init]autorelease] parameterFlags:kFxParameterFlag_CUSTOM_UI|kFxParameterFlag_USE_FULL_VIEW_WIDTH|kFxParameterFlag_DONT_DISPLAY_IN_DASHBOARD|kFxParameterFlag_NOT_ANIMATABLE]&&ok; - for(NSDictionary*r in DYDescriptors())ok=[a addFloatSliderWithName:r[@"title"] parameterID:[r[@"pid"]unsignedIntValue] defaultValue:[r[@"default"]doubleValue] parameterMin:[r[@"min"]doubleValue] parameterMax:[r[@"max"]doubleValue] sliderMin:[r[@"min"]doubleValue] sliderMax:[r[@"max"]doubleValue] delta:[r[@"step"]doubleValue] parameterFlags:kFxParameterFlag_HIDDEN|([r[@"notAnimatable"]boolValue]?kFxParameterFlag_NOT_ANIMATABLE:0)]&&ok; + for(NSDictionary*r in DYDescriptors())ok=[a addFloatSliderWithName:r[@"title"] parameterID:[r[@"pid"]unsignedIntValue] defaultValue:[r[@"hostDefault"]?:r[@"default"] doubleValue] parameterMin:[r[@"min"]doubleValue] parameterMax:[r[@"max"]doubleValue] sliderMin:[r[@"min"]doubleValue] sliderMax:[r[@"max"]doubleValue] delta:[r[@"step"]doubleValue] parameterFlags:kFxParameterFlag_HIDDEN|([r[@"notAnimatable"]boolValue]?kFxParameterFlag_NOT_ANIMATABLE:0)]&&ok; ok=[a addCustomParameterWithName:@"LUT 文件" parameterID:DYAssetsParameterID defaultValue:[[[DYAssetState alloc]init]autorelease] parameterFlags:kFxParameterFlag_HIDDEN|kFxParameterFlag_NOT_ANIMATABLE]&&ok; ok=[a addCustomParameterWithName:@"工具与蒙版" parameterID:DYToolsParameterID defaultValue:[[[DYToolDocument alloc]init]autorelease] parameterFlags:kFxParameterFlag_HIDDEN|kFxParameterFlag_NOT_ANIMATABLE]&&ok; ok=[a addStringParameterWithName:@"蒙版画布会话" parameterID:DYCanvasSessionParameterID defaultValue:@"" parameterFlags:kFxParameterFlag_HIDDEN|kFxParameterFlag_NOT_ANIMATABLE|kFxParameterFlag_DONT_SAVE]&&ok; diff --git a/大鱼调色/Plugin/Info.plist b/大鱼调色/Plugin/Info.plist index 58b6ad4..6fb5a4c 100644 --- a/大鱼调色/Plugin/Info.plist +++ b/大鱼调色/Plugin/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 1.6.0 CFBundleVersion - 38 + 39 NSHumanReadableCopyright PlugInKit diff --git a/大鱼调色/Wrapper Application/Info.plist b/大鱼调色/Wrapper Application/Info.plist index 3727e27..19d4d2c 100644 --- a/大鱼调色/Wrapper Application/Info.plist +++ b/大鱼调色/Wrapper Application/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 1.6.0 CFBundleVersion - 38 + 39 LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) NSHumanReadableCopyright