Implement persistent leveling and all standalone module templates; validation pending
这个提交包含在:
1 父节点
81b50538b4
当前提交
dc5769492d
33 个文件已更改
+8585
-88
没有与搜索条件相匹配的文件
@@ -218,6 +218,15 @@ if(faceFixture.length){
|
||||
alpha=MIN(alpha,corrected[i+3]);
|
||||
}
|
||||
run.record(@"level-metal-inverse-rotation-and-full-corner-coverage",ok&&worst<.002&&alpha==1,@{@"error":reason(failure),@"maximumError":@(worst),@"minimumAlpha":@(alpha)});
|
||||
u.lensStrength=80;
|
||||
BOOL positiveOK=[renderer renderSource:source destination:destination uniforms:u paths:@{} spider:nil tools:doc colorManagement:nil hostPrimaries:kFxColorPrimaries_Rec709 error:&failure];Pixels warped=read(destination,gpu);
|
||||
u.lensStrength=-80;
|
||||
BOOL negativeOK=[renderer renderSource:source destination:destination uniforms:u paths:@{} spider:nil tools:doc colorManagement:nil hostPrimaries:kFxColorPrimaries_Rec709 error:&failure];Pixels opposite=read(destination,gpu);
|
||||
run.record(@"level-then-lens-keeps-both-spatial-operations-active",positiveOK&&negativeOK&&difference(warped,corrected).maximum>.01&&difference(warped,opposite).maximum>.01);
|
||||
u.lensStrength=0;doc[@"levelMeasureOnly"]=@YES;
|
||||
BOOL measured=[renderer renderSource:source destination:destination uniforms:u paths:@{} spider:nil tools:doc colorManagement:nil hostPrimaries:kFxColorPrimaries_Rec709 error:&failure];
|
||||
run.record(@"level-measure-only-preserves-source-pixels",measured&&difference(read(destination,gpu),grid).maximum<.002);
|
||||
[doc removeObjectForKey:@"levelMeasureOnly"];
|
||||
NSURL *cube=[NSURL fileURLWithPath:[runtime stringByAppendingPathComponent:@"unsupported-level.cube"]];
|
||||
run.record(@"level-spatial-transform-is-refused-by-cube-export",![renderer exportLUT:cube uniforms:u paths:@{} spider:nil tools:doc error:&failure]&&failure);
|
||||
}
|
||||
@@ -251,6 +260,18 @@ if(faceFixture.length){
|
||||
control(20026);
|
||||
click(150,280);click(390,200);drain();
|
||||
run.record(@"level-osc-two-points-horizontal-one-undo",fabs(angle()+atan2(80.,240.))<1e-6&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
|
||||
NSDictionary *savedLevel=[[DYReadTools(host,kCMTimeZero).document copy]autorelease];
|
||||
run.record(@"level-placed-line-is-persisted-with-reference-points",[savedLevel[@"levelReference"][@"points"]count]==4&&[[(id)osc valueForKey:@"levelPlaced"]boolValue]);
|
||||
[osc drawOSCWithWidth:640 height:400 activePart:0 destinationImage:overlay atTime:kCMTimeZero];
|
||||
NSPoint lineFirst=[[(id)osc valueForKey:@"levelFirst"]pointValue];
|
||||
DYLevelTransform transform(angle(),640./400.);NSPoint display=transform.toOutput(lineFirst);
|
||||
NSInteger endpoint=down(display.x*640,400-display.y*400);up(display.x*640+6,400-display.y*400+10,endpoint);drain();
|
||||
run.record(@"level-retained-endpoint-edits-with-one-undo",endpoint==10016&&base->_undoStarts==undo+2&&base->_undoEnds==undo+2&&![DYReadTools(host,kCMTimeZero).document[@"levelReference"]isEqual:savedLevel[@"levelReference"]]);
|
||||
control(20034);drain();
|
||||
run.record(@"level-measure-toggle-preserves-line-and-angle",[DYReadTools(host,kCMTimeZero).document[@"levelMeasureOnly"]boolValue]&&[DYReadTools(host,kCMTimeZero).document[@"levelReference"][@"points"]count]==4);
|
||||
control(20026);control(20026);drain();
|
||||
run.record(@"level-reopening-restores-saved-line",[[(id)osc valueForKey:@"levelPlaced"]boolValue]);
|
||||
undo=base->_undoStarts-1;
|
||||
control(20033);drain();
|
||||
control(20032);
|
||||
NSInteger part=down(200,270);up(230,150,part);drain();
|
||||
@@ -262,3 +283,16 @@ if(faceFixture.length){
|
||||
run.record(@"level-osc-escape-discards-uncommitted-point",handled&&angle()==previous&&base->_undoStarts==undo+3);
|
||||
[osc release];[plugin release];drain();
|
||||
}
|
||||
|
||||
{
|
||||
for(NSString *starter in [DYToolTypes()arrayByAddingObject:@"cst"]){
|
||||
DYDiagnosticManager *host=[[[DYDiagnosticManager alloc]init]autorelease];DYCreateParameters(host,nil);
|
||||
NSDictionary *doc=DYInitialToolDocument(starter);BOOL valid=DYValidToolDocument(doc)&&DYWriteTools(host,doc,kCMTimeZero);
|
||||
DYInspector *inspector=[[[DYInspector alloc]initWithAPIManager:host]autorelease];[inspector refresh];
|
||||
NSString *expected=[starter isEqual:@"cst"]?@"primary":starter;
|
||||
NSUInteger visible=0;BOOL match=NO,cstFields=YES;
|
||||
for(NSDictionary *card in [inspector valueForKey:@"cards"])if(![card[@"removed"]boolValue]){visible++;match=[card[@"section"][@"key"]isEqual:expected];if([starter isEqual:@"cst"]){cstFields=[card[@"section"][@"title"]isEqual:@"CST 色彩空间转换"];for(NSDictionary *row in card[@"section"][@"rows"])cstFields&=![row[@"key"]isEqual:@"cmexposure"]&&![row[@"key"]isEqual:@"primaryBalance"];}}
|
||||
NSMutableDictionary *expanded=DYMutablePlist(doc);BOOL add=DYInsertTool(expanded,@"curve",[@"base:" stringByAppendingString:expected])!=nil;
|
||||
run.record([@"standalone-initial-module-and-add-layer-" stringByAppendingString:starter],valid&&visible==1&&match&&cstFields&&add&&DYValidToolDocument(expanded));
|
||||
}
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户