按当前帧取样关键帧与旋转随动合同修正宿主回归断言

这个提交包含在:
mac 于 2026-11-14 23:03:35 +08:00 提交
1 父节点 7763be5468
当前提交 bb4be3166f
5 个文件已更改
+5221 -6

没有与搜索条件相匹配的文件

@@ -154,15 +154,15 @@
NSArray *preview=[plugin toolCanvasMaskAtTime:kCMTimeZero][@"stampSource"];
up(236,259.75,part);drain();
NSDictionary *edited=DYSharedMaskWithID(DYReadTools(host,kCMTimeZero).document,stampID);
NSArray *relocated=edited[@"stampSource"];
run.record(@"native-osc-drag-moves-only-the-stamp-source-and-keeps-tracking-keys",part==7&&fabs([relocated[0]doubleValue]-.35)<1e-6&&fabs([relocated[1]doubleValue]-.35)<1e-6&&[relocated isEqual:preview]&&[edited[@"parameters"]isEqual:trackedStamp[@"parameters"]]&&[edited[@"keys"]isEqual:keys]&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1,@{@"part":@(part),@"source":relocated?:@[],@"keys":@([edited[@"keys"]count]),@"undoGroups":@(base->_undoStarts-undo)});
NSArray *relocated=DYStampSourceAtTime(edited,kCMTimeZero);
run.record(@"native-osc-source-drag-keys-current-frame-and-preserves-other-tracking-keys",part==7&&fabs([relocated[0]doubleValue]-.35)<1e-6&&fabs([relocated[1]doubleValue]-.35)<1e-6&&fabs([relocated[0]doubleValue]-[preview[0]doubleValue])<1e-6&&fabs([relocated[1]doubleValue]-[preview[1]doubleValue])<1e-6&&[edited[@"stampSource"]isEqual:source]&&[edited[@"parameters"]isEqual:trackedStamp[@"parameters"]]&&[edited[@"keys"]count]==keys.count&&[edited[@"keys"][0][@"stampManualSource"]boolValue]&&[edited[@"keys"][1]isEqual:keys[1]]&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1,@{@"part":@(part),@"source":relocated?:@[],@"keys":@([edited[@"keys"]count]),@"undoGroups":@(base->_undoStarts-undo)});
[osc drawOSCWithWidth:640 height:400 activePart:0 destinationImage:overlay atTime:kCMTimeZero];
part=down(236,259.75);
[osc mouseDraggedAtPositionX:270 positionY:240 activePart:part modifiers:0 forceUpdate:&update atTime:kCMTimeZero];
BOOL handled=NO;
[osc keyDownAtPositionX:270 positionY:240 keyPressed:27 modifiers:0 forceUpdate:&update didHandle:&handled atTime:kCMTimeZero];
drain();
run.record(@"native-osc-escape-cancels-the-stamp-source-drag-without-another-undo",handled&&[DYSharedMaskWithID(DYReadTools(host,kCMTimeZero).document,stampID)[@"stampSource"]isEqual:relocated]&&base->_undoStarts==undo+1);
run.record(@"native-osc-escape-cancels-the-stamp-source-drag-without-another-undo",handled&&[DYSharedMaskWithID(DYReadTools(host,kCMTimeZero).document,stampID)isEqual:edited]&&base->_undoStarts==undo+1);
[osc drawOSCWithWidth:640 height:400 activePart:0 destinationImage:overlay atTime:kCMTimeZero];
BOOL rotationHandle=NO;
for(NSDictionary *handle in [(id)osc valueForKey:@"handles"])rotationHandle|=[handle[@"part"]integerValue]==6;
@@ -171,7 +171,7 @@
up(320,260,part);drain();
NSDictionary *resized=DYSharedMaskWithID(DYReadTools(host,kCMTimeZero).document,stampID);
DYMaskParameters enlarged=DYMaskAtTime(resized,kCMTimeZero);
run.record(@"native-osc-stamp-resizes-coverage-without-rotation-handle-or-track-changes",!rotationHandle&&part==2&&enlarged.width>target.width&&enlarged.height>target.height&&enlarged.centerX==target.centerX&&enlarged.centerY==target.centerY&&[resized[@"keys"]isEqual:keys]);
run.record(@"native-osc-stamp-resizes-coverage-without-rotation-handle-or-track-changes",!rotationHandle&&part==2&&enlarged.width>target.width&&enlarged.height>target.height&&enlarged.centerX==target.centerX&&enlarged.centerY==target.centerY&&[resized[@"keys"]isEqual:edited[@"keys"]]);
[osc drawOSCWithWidth:640 height:400 activePart:0 destinationImage:overlay atTime:kCMTimeZero];
undo=base->_undoStarts;
part=down(404,212.5);
@@ -224,7 +224,9 @@
stamp[@"stampTrackMode"]=@"linked";DYWriteTools(base,stampDoc,kCMTimeZero);paired=requestStamp(0);
for(int i=0;i<6&&paired;i++){pairedFrame(i,true);paired&=[plugin analyzeFrame:frame atTime:timeAt(i) error:nil];}finish();
saved=DYSharedMaskWithID(DYReadTools(base,kCMTimeZero).document,stampID);motion=DYStampMotionAtTime(saved,timeAt(5));covered=DYMaskAtTime(saved,timeAt(5));sampled=DYStampSourceAtTime(saved,timeAt(5));
run.record(@"linked-clone-tracks-with-completely-flat-clean-source",paired&&[saved[@"keys"]count]==6&&fabs([sampled[0]doubleValue]-(covered.centerX-.5*motion.targetScaleX))<1e-5&&fabs(motion.sourceScaleX-motion.targetScaleX)<1e-6);
double linkedDistance=std::hypot(([sampled[0]doubleValue]-covered.centerX)*double(tw)/th,[sampled[1]doubleValue]-covered.centerY);
run.record(@"linked-clone-tracks-with-completely-flat-clean-source",paired&&[saved[@"keys"]count]==6&&fabs(linkedDistance-.5*double(tw)/th*motion.targetScaleX)<1e-5&&fabs(motion.sourceScaleX-motion.targetScaleX)<1e-6,
@{@"keys":@([saved[@"keys"]count]),@"paired":@(paired),@"source":sampled?:@[],@"target":@[@(covered.centerX),@(covered.centerY)],@"distance":@(linkedDistance),@"targetScale":@(motion.targetScaleX),@"status":saved[@"status"]?:@""});
// A tiny flat repair ellipse follows a separate textured rectangle without
// increasing the pixels that the repair covers.