From 378cd2b6ec6ed9654bf9a33c807779d0c2636728 Mon Sep 17 00:00:00 2001 From: mac Date: Mon, 2 Nov 2026 15:14:41 +0800 Subject: [PATCH] Render automatic mapping in new primary layers and preserve old layer defaults --- README.md | 2 +- template/sources/RegisteredParameters.json | 2 +- template/verification/Files.sha256.json | 2 +- verification/PrimaryDefaultBuild37Superseded.json | 15 +++++++++++++++ 大鱼调色/Plugin/DYToolDiagnostics.inc.h | 2 +- 大鱼调色/Plugin/DYToolState.mm | 2 +- 大鱼调色/Plugin/Info.plist | 2 +- 大鱼调色/Wrapper Application/Info.plist | 2 +- 8 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 verification/PrimaryDefaultBuild37Superseded.json diff --git a/README.md b/README.md index 1b20ae3..09d017c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 大鱼调色 -原生 FxPlug 4 调色器,当前正式安装版本 **1.6.0(37)**。唯一安装位置为 `/Library/Plug-Ins/FxPlug/大鱼调色.app`;Final Cut Pro 中从“效果 → 大鱼调色”添加。 +原生 FxPlug 4 调色器,当前正式安装版本 **1.6.0(38)**。唯一安装位置为 `/Library/Plug-Ins/FxPlug/大鱼调色.app`;Final Cut Pro 中从“效果 → 大鱼调色”添加。 交接与恢复入口:[大鱼调色FxPlug4交接.md](大鱼调色FxPlug4交接.md)。 diff --git a/template/sources/RegisteredParameters.json b/template/sources/RegisteredParameters.json index fbe0e73..84addaf 100644 --- a/template/sources/RegisteredParameters.json +++ b/template/sources/RegisteredParameters.json @@ -3641,7 +3641,7 @@ "大鱼调色/Plugin/DYModel.mm": "60c60bfbddeaaa23083e0283714248b60e3952dcda9acb6a65cd6b7fa15fd893", "大鱼调色/Plugin/DYSpiderState.h": "0c80747e41e8fc97762e301b011bd08c18865a825eaafde086ed79ace37b22f9", "大鱼调色/Plugin/DYToolState.h": "28088ec819307a60f2e52334fd807a514c3ff8a550bc0efbe7069b68a6242320", - "大鱼调色/Plugin/DYToolState.mm": "5df0cbe265f13844b80fbf952561505ef04a0286f930079fa826551d70c3927c", + "大鱼调色/Plugin/DYToolState.mm": "7b113450ae43e0e5d478d8f0e4212b7d25e47d3cc8bc0d4d868ab58c98d3c56c", "大鱼调色/Plugin/DYUniforms.h": "207d36b5b53ab084fa8eb3813ccbbeb5193178e3468a37e9dc692ab196ffbb6a", "大鱼调色/Plugin/MaskCore/DYMask.h": "5b9aa44390d4a1fca1baf5e34cb9eefc8483c939a65cc2a0412b7b41fc85bc16", "大鱼调色/Plugin/MaskCore/DYMaskOperator.h": "43fa701ad574f38ce0ab4f4d3900bb034edaaa1adc09821d2f4443ee2b687ba2", diff --git a/template/verification/Files.sha256.json b/template/verification/Files.sha256.json index 49eac65..c9404bd 100644 --- a/template/verification/Files.sha256.json +++ b/template/verification/Files.sha256.json @@ -5,7 +5,7 @@ "sources/NativeFactories.xml": "5db79ab22e948ca2bdf9162beb60d8380a95ceff6c74e86ff095804ae1d832b6", "sources/NativeFxPlugShell.xml": "5d2a1e807fb7148e5a682c83ba30d7022c8680d2ca8309c502d30f4b12efad64", "sources/Provenance.json": "9cfa41fd1f02b35b99cad56a4a048bafa1c627da181006f5b9186a104664f421", - "sources/RegisteredParameters.json": "145bcf31ef792ba6076a57a1652e9b0ed9fef5a5aa70a72e6cee74fec35e5c63", + "sources/RegisteredParameters.json": "93e6e053adeac8d7b66486aef546d6e61c92cc66ac122b154fda3095cce2b0b6", "tools/dump_model.mm": "04e04446aa351d774913bc25b06512fefe7969bdf4c6e471a91f1e9d6c4fc3b5", "verification/SavedSelection.json": "6a182996deea48a975c1954d71e90e84d3aacb0443f2472578a6c425166ce674", "verification/SkillAudit.json": "4d5bb2abbc4d502b2455b0c6a6be6d750bbc090fd12fa440e5aa624e92416fab", diff --git a/verification/PrimaryDefaultBuild37Superseded.json b/verification/PrimaryDefaultBuild37Superseded.json new file mode 100644 index 0000000..57cf36d --- /dev/null +++ b/verification/PrimaryDefaultBuild37Superseded.json @@ -0,0 +1,15 @@ +{ + "version": "1.6.0", + "build": "37", + "status": "superseded-before-install", + "compiledSource": "378956e130d36d9cf83f8331e72aae60ce54af4a", + "notaryID": "6783e9cd-b84e-4849-9312-6a4ac91959a7", + "notaryStatusAtInterruption": "In Progress", + "submissionSHA256": "7ff9e5b3f0a26152071eb36c0235ed80b0e928e127fb35892b14171a4a1aa382", + "submissionBytes": 40152455, + "nativeChecks": 394, + "nativePassed": true, + "reason": "Final inspection found new primary automatic-mapping layer would be skipped by neutral detection; corrected before host installation. Submission is not reused or resubmitted.", + "formalInstallRemainedBuild": "36", + "published": false +} diff --git a/大鱼调色/Plugin/DYToolDiagnostics.inc.h b/大鱼调色/Plugin/DYToolDiagnostics.inc.h index 6b2e6d8..0c36560 100644 --- a/大鱼调色/Plugin/DYToolDiagnostics.inc.h +++ b/大鱼调色/Plugin/DYToolDiagnostics.inc.h @@ -19,7 +19,7 @@ [[source metalTextureForDevice:gpu]replaceRegion:MTLRegionMake2D(0,0,width,height) mipmapLevel:0 withBytes:input.data() bytesPerRow:width*8]; Pixels baseline=renderTools(empty.document,defaults,nil,@"empty-tool-document-render");run.record(@"empty-tool-document-preserves-legacy-pixels-exactly",difference(baseline,neutral).maximum==0); DYUniforms newPrimary=DYToolUniforms(DYNewTool(@"primary")),oldPrimary=DYToolUniforms(@{@"type":@"primary",@"values":@{}}); - run.record(@"new-primary-layer-auto-mapping-on-old-omitted-default-stays-off",newPrimary.cm.toneMapping==1&&oldPrimary.cm.toneMapping==0); + run.record(@"new-primary-layer-auto-mapping-on-old-omitted-default-stays-off",newPrimary.cm.toneMapping==1&&oldPrimary.cm.toneMapping==0&&!DYToolIsNeutral(DYNewTool(@"primary"))&&DYToolIsNeutral(@{@"type":@"primary",@"values":@{}})); doc=DYMutablePlist(empty.document);for(NSString *type in DYToolTypes()){NSMutableDictionary *n=DYMutablePlist(DYNewTool(type));if([type isEqual:@"primary"])n[@"values"][@"cmtoneMapping"]=@0;[doc[@"layers"]addObject:n];}Pixels initialized=renderTools(doc,defaults,nil,@"all-initialized-tool-types-with-legacy-primary-mapping-render");run.record(@"legacy-neutral-repeated-tools-preserve-pixels",difference(initialized,neutral).maximum==0); // Reference is two explicit isolated native operations, which catches shared // uniform or lookup caches, ordering, repeated CST and accidental base replay. diff --git a/大鱼调色/Plugin/DYToolState.mm b/大鱼调色/Plugin/DYToolState.mm index 7361998..739b5e3 100644 --- a/大鱼调色/Plugin/DYToolState.mm +++ b/大鱼调色/Plugin/DYToolState.mm @@ -74,7 +74,7 @@ DYUniforms DYToolUniforms(NSDictionary *node){DYUniforms u;DYDefaultUniforms(&u) // new layers explicitly store the user's new automatic-mapping default. if([type isEqual:@"primary"]){u.primarySectionEnabled=1;u.cm.configured=1;u.cm.inputTransfer=u.cm.outputTransfer;u.cm.inputGamut=u.cm.outputGamut;u.cm.toneMapping=0;} for(NSDictionary *d in DYDescriptors()){NSNumber *v=node[@"values"][d[@"key"]];if(v&&[d[@"offset"]integerValue]>=0)*(float*)((uint8_t*)&u+[d[@"offset"]unsignedIntegerValue])=v.floatValue;}return u;} -BOOL DYToolIsNeutral(NSDictionary *node){NSString *type=node[@"type"];DYUniforms u=DYToolUniforms(node);NSDictionary *section=DYToolSection(type);BOOL enabled=YES;if([type isEqual:@"primary"])enabled=u.primarySectionEnabled>.5;else if([type isEqual:@"base"])enabled=u.baseSectionEnabled>.5||u.colorSectionEnabled>.5;else for(NSDictionary *d in DYDescriptors())if([d[@"pid"]isEqual:section[@"enabled"]])enabled=*(float*)((uint8_t*)&u+[d[@"offset"]unsignedIntegerValue])>.5;if(!enabled)return YES;if([type isEqual:@"mixer"])return !DYChannelMixerActive(u);if([type isEqual:@"film"])return !DYFilmToolActive(u);if([type isEqual:@"skin"])return u.skinProtection.y==0;if([node[@"type"]isEqual:@"spider"]&&[node[@"spider"]length]){auto mesh=DYSpiderMesh(node[@"spider"]);for(float v:dy::meshSamples(mesh))if(v!=0)return NO;}if([node[@"paths"]count])return NO;for(NSDictionary *d in DYDescriptors()){NSNumber *v=node[@"values"][d[@"key"]];if(v&&v.floatValue!=[d[@"default"]floatValue])return NO;}return YES;} +BOOL DYToolIsNeutral(NSDictionary *node){NSString *type=node[@"type"];DYUniforms u=DYToolUniforms(node);NSDictionary *section=DYToolSection(type);BOOL enabled=YES;if([type isEqual:@"primary"])enabled=u.primarySectionEnabled>.5;else if([type isEqual:@"base"])enabled=u.baseSectionEnabled>.5||u.colorSectionEnabled>.5;else for(NSDictionary *d in DYDescriptors())if([d[@"pid"]isEqual:section[@"enabled"]])enabled=*(float*)((uint8_t*)&u+[d[@"offset"]unsignedIntegerValue])>.5;if(!enabled)return YES;if([type isEqual:@"primary"]&&u.cm.toneMapping>.5)return NO;if([type isEqual:@"mixer"])return !DYChannelMixerActive(u);if([type isEqual:@"film"])return !DYFilmToolActive(u);if([type isEqual:@"skin"])return u.skinProtection.y==0;if([node[@"type"]isEqual:@"spider"]&&[node[@"spider"]length]){auto mesh=DYSpiderMesh(node[@"spider"]);for(float v:dy::meshSamples(mesh))if(v!=0)return NO;}if([node[@"paths"]count])return NO;for(NSDictionary *d in DYDescriptors()){NSNumber *v=node[@"values"][d[@"key"]];if(v&&v.floatValue!=[d[@"default"]floatValue])return NO;}return YES;} @implementation DYToolManager { id _host;NSString *_nodeID,*_type;NSInteger _depth;CMTime _time;NSMutableDictionary *_pending;DYInspectorToken *_token; diff --git a/大鱼调色/Plugin/Info.plist b/大鱼调色/Plugin/Info.plist index 7842f58..58b6ad4 100644 --- a/大鱼调色/Plugin/Info.plist +++ b/大鱼调色/Plugin/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 1.6.0 CFBundleVersion - 37 + 38 NSHumanReadableCopyright PlugInKit diff --git a/大鱼调色/Wrapper Application/Info.plist b/大鱼调色/Wrapper Application/Info.plist index c6e5170..3727e27 100644 --- a/大鱼调色/Wrapper Application/Info.plist +++ b/大鱼调色/Wrapper Application/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 1.6.0 CFBundleVersion - 37 + 38 LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) NSHumanReadableCopyright