feat: complete independent tools, per-stage masks and host Metal tracking; native checks pass, prepare formal 1.4.0 build 20
这个提交包含在:
1 父节点
cec044f124
当前提交
659a8c540d
4 个文件已更改
+4
-2
没有与搜索条件相匹配的文件
@@ -3072,7 +3072,7 @@
|
||||
"大鱼调色/Plugin/DYModel.mm": "beadabb0773e911581dedc263f55a49e03dde6e6d1fc2329df18cb384710d234",
|
||||
"大鱼调色/Plugin/DYSpiderState.h": "0c80747e41e8fc97762e301b011bd08c18865a825eaafde086ed79ace37b22f9",
|
||||
"大鱼调色/Plugin/DYToolState.h": "a1b0e328faae5dce7bb8497186f028a45d2da4f1a87e1980cd30c7a59a098a9f",
|
||||
"大鱼调色/Plugin/DYToolState.mm": "125aa5d03a0fbb3049ca2d9a22854ead6b260fa84398883e754a05041e2b98f0",
|
||||
"大鱼调色/Plugin/DYToolState.mm": "d78d64ac6edbcd1e4702a054bbdae26593bfdf9f9bd7a8a3fd600ae05d14b353",
|
||||
"大鱼调色/Plugin/DYUniforms.h": "8ef480025c739b29f55884ba0c7218e9d6fd8d80c46cfc72d6ee3da90215abe4",
|
||||
"大鱼调色/Plugin/MaskCore/DYMask.h": "5b9aa44390d4a1fca1baf5e34cb9eefc8483c939a65cc2a0412b7b41fc85bc16",
|
||||
"大鱼调色/Plugin/MaskCore/DYMaskOperator.h": "43fa701ad574f38ce0ab4f4d3900bb034edaaa1adc09821d2f4443ee2b687ba2",
|
||||
|
||||
@@ -1065,6 +1065,7 @@ static NSImage *DYWheelImage(void) {
|
||||
if(![path isKindOfClass:NSString.class]||![path isAbsolutePath]||![[path pathExtension].lowercaseString isEqual:@"cube"]){[self showError:@"预设包含无效 LUT 路径,尚未修改当前调色。"];return;}
|
||||
if([[NSFileManager defaultManager] isReadableFileAtPath:path])validPaths[key]=path;else [missing addObject:[path lastPathComponent]];
|
||||
}
|
||||
NSMutableDictionary *restoredTools=DYMutablePlist(tools);for(NSMutableDictionary *node in restoredTools[@"layers"]){NSMutableDictionary *nodePaths=node[@"paths"];for(NSString *key in [[nodePaths.allKeys copy]autorelease])if(![NSFileManager.defaultManager isReadableFileAtPath:nodePaths[key]]){[missing addObject:[nodePaths[key]lastPathComponent]];[nodePaths removeObjectForKey:key];}}tools=restoredTools;
|
||||
[self cancelAssetLoads];
|
||||
id<FxCustomParameterActionAPI_v4> action=[self actionAPI];if(!action)return;
|
||||
[action startAction:self];
|
||||
|
||||
@@ -33,5 +33,6 @@
|
||||
mask[@"enabled"]=@YES;p.width=p.height=4;mask[@"parameters"]=[NSData dataWithBytes:&p length:sizeof(p)];actual=renderTools(doc,hu,nil,@"all-one-mask-render");run.record(@"all-one-mask-preserves-native-operation",difference(actual,unmasked).maximum<.001);
|
||||
p.strength=0;mask[@"parameters"]=[NSData dataWithBytes:&p length:sizeof(p)];actual=renderTools(doc,hu,nil,@"all-zero-mask-render");run.record(@"all-zero-mask-bypasses-only-own-tool",difference(actual,noHSL).maximum<.003,measure(difference(actual,noHSL)));
|
||||
error=nil;NSURL *blocked=[NSURL fileURLWithPath:[runtime stringByAppendingPathComponent:@"masked-export-must-not-exist.cube"]];BOOL exported=[renderer exportLUT:blocked uniforms:hu paths:@{} spider:nil tools:doc error:&error];run.record(@"cube-export-refuses-spatial-mask-with-clear-error",!exported&&error&&![NSFileManager.defaultManager fileExistsAtPath:blocked.path]);
|
||||
DYUniforms primary=defaults;primary.cm.exposure=.6;Pixels primaryFull=render(run,renderer,source,destination,gpu,primary,@{},@"primary-mask-full-reference");DYUniforms primaryOff=primary;primaryOff.primarySectionEnabled=0;Pixels primaryBypass=render(run,renderer,source,destination,gpu,primaryOff,@{},@"primary-mask-bypass-reference");mask=DYMutablePlist(DYNewMask(DYMaskRectangle));p=DYMaskAtTime(mask,kCMTimeZero);p.feather=0;p.width=p.height=.5;mask[@"parameters"]=[NSData dataWithBytes:&p length:sizeof(p)];doc=DYMutablePlist(empty.document);doc[@"baseMasks"][@"primary"]=[NSMutableArray arrayWithObject:mask];actual=renderTools(doc,primary,nil,@"primary-cst-mask-render");BOOL primaryRegion=YES;for(NSUInteger y=0;y<height;y++)for(NSUInteger x=0;x<width;x++)for(int c=0;c<4;c++){BOOL inside=x>=width/4&&x<width*3/4&&y>=height/4&&y<height*3/4;auto i=(y*width+x)*4+c;primaryRegion&=fabs((float)actual[i]-(float)(inside?primaryFull:primaryBypass)[i])<.003;}run.record(@"primary-mask-blends-cst-only-in-selected-region",primaryRegion);
|
||||
DYWriteTools(manager,empty.document,kCMTimeZero);
|
||||
}
|
||||
@@ -29,7 +29,7 @@ BOOL DYValidToolDocument(NSDictionary *doc){
|
||||
NSMutableDictionary *descriptors=[NSMutableDictionary dictionary];for(NSDictionary *d in DYDescriptors())descriptors[d[@"key"]]=d;
|
||||
for(NSDictionary *node in doc[@"layers"]){if(![node isKindOfClass:NSDictionary.class]||!validID(node[@"id"])||[ids containsObject:node[@"id"]]||![DYToolTypes()containsObject:node[@"type"]]||![node[@"values"]isKindOfClass:NSDictionary.class]||[node[@"values"]count]>descriptors.count||![node[@"paths"]isKindOfClass:NSDictionary.class]||[node[@"paths"]count]>6||!validMasks(node[@"masks"],ids))return NO;[ids addObject:node[@"id"]];
|
||||
for(NSString *key in node[@"values"]){NSDictionary *d=descriptors[key];id v=node[@"values"][key];if(!d||!finiteNumber(v)||[v doubleValue]<[d[@"min"]doubleValue]||[v doubleValue]>[d[@"max"]doubleValue]||(d[@"values"]&&![d[@"values"]containsObject:@((int)llround([v doubleValue]))]))return NO;}
|
||||
for(id key in node[@"paths"]){id p=node[@"paths"][key];if(![@[@"input",@"look0",@"look1",@"look2",@"look3",@"look4"]containsObject:key]||![p isKindOfClass:NSString.class]||[p length]>8192)return NO;}if(node[@"spider"]&&(![node[@"spider"]isKindOfClass:NSData.class]||!DYSpiderMeshIsValid(node[@"spider"])))return NO;
|
||||
for(id key in node[@"paths"]){id p=node[@"paths"][key];if(![@[@"input",@"look0",@"look1",@"look2",@"look3",@"look4"]containsObject:key]||![p isKindOfClass:NSString.class]||[p length]>8192||![p isAbsolutePath]||![[p pathExtension].lowercaseString isEqual:@"cube"])return NO;}if(node[@"spider"]&&(![node[@"spider"]isKindOfClass:NSData.class]||!DYSpiderMeshIsValid(node[@"spider"])))return NO;
|
||||
}NSUInteger totalKeys=0;for(NSArray *masks in [doc[@"baseMasks"]allValues])for(NSDictionary *mask in masks)totalKeys+=[mask[@"keys"]count];for(NSDictionary *node in doc[@"layers"])for(NSDictionary *mask in node[@"masks"])totalKeys+=[mask[@"keys"]count];if(totalKeys>65536)return NO;NSData *bounded=[NSPropertyListSerialization dataWithPropertyList:doc format:NSPropertyListBinaryFormat_v1_0 options:0 error:nil];return bounded&&bounded.length<=24*1024*1024;
|
||||
}
|
||||
@implementation DYToolDocument
|
||||
|
||||
在新工单中引用
屏蔽一个用户