Implement adaptive inspector, mask clock repair, and selectable face mosaic; validation pending

这个提交包含在:
mac 于 2026-11-06 15:56:42 +08:00 提交
1 父节点 f05cf05451
当前提交 3b4c612edf
19 个文件已更改
+245 -103

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

@@ -61,9 +61,20 @@
run.record(@"native-osc-shape-escape-keeps-author-and-all-shared-bindings",handled&&[before isEqual:DYReadTools(base,kCMTimeZero).document]&&base->_undoStarts==undo&&![[plugin toolCanvasMaskAtTime:kCMTimeZero][@"drawShape"]boolValue]);
selectShape();[osc mouseDownAtPositionX:180 positionY:280 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];[osc mouseUpAtPositionX:180 positionY:280 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];drain();run.record(@"native-osc-shape-click-without-area-does-not-write-or-create-undo",[before isEqual:DYReadTools(base,kCMTimeZero).document]&&base->_undoStarts==undo);
selectShape();[osc mouseDownAtPositionX:180 positionY:280 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];[osc mouseDraggedAtPositionX:400 positionY:160 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];host->_time=CMTimeMake(1,24);[plugin toolCanvasMaskAtTime:host->_time];[osc mouseUpAtPositionX:400 positionY:160 activePart:1 modifiers:0 forceUpdate:&update atTime:host->_time];drain();run.record(@"native-osc-shape-playhead-change-cancels-before-write",[before isEqual:DYReadTools(base,kCMTimeZero).document]&&base->_undoStarts==undo&&![[plugin toolCanvasMaskAtTime:host->_time][@"drawShape"]boolValue]);host->_time=kCMTimeZero;
selectShape();[osc mouseDownAtPositionX:180 positionY:280 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];[osc mouseUpAtPositionX:400 positionY:160 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];host->_time=CMTimeMake(1,24);drain();run.record(@"native-osc-queued-shape-commit-rechecks-host-playhead",[before isEqual:DYReadTools(base,kCMTimeZero).document]&&base->_undoStarts==undo);host->_time=kCMTimeZero;
selectShape();[osc mouseDownAtPositionX:180 positionY:280 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];drain();[osc mouseUpAtPositionX:400 positionY:160 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];host->_time=CMTimeMake(1,24);drain();run.record(@"native-osc-queued-shape-commit-rechecks-host-playhead",[before isEqual:DYReadTools(base,kCMTimeZero).document]&&base->_undoStarts==undo);host->_time=kCMTimeZero;
doc=DYMutablePlist(DYReadTools(base,kCMTimeZero).document);NSMutableDictionary *ellipse=(id)DYSharedMaskWithID(doc,maskID);p=DYMaskAtTime(ellipse,kCMTimeZero);p.kind=DYMaskEllipse;ellipse[@"parameters"]=[NSData dataWithBytes:&p length:sizeof(p)];DYWriteTools(base,doc,kCMTimeZero);selectShape();undo=base->_undoStarts;
[osc mouseDownAtPositionX:488 positionY:149.5 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];[osc mouseUpAtPositionX:208 positionY:275.5 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];drain();p=DYMaskAtTime(DYSharedMaskWithID(DYReadTools(base,kCMTimeZero).document,maskID),kCMTimeZero);run.record(@"native-osc-ellipse-draws-reverse-direction-with-positive-shared-extents",p.kind==DYMaskEllipse&&fabs(p.centerX-.55)<1e-5&&fabs(p.centerY-.5)<1e-5&&fabs(p.width-.5)<1e-5&&fabs(p.height-.4)<1e-5&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
// Reproduce FCP's action clock offset while OSC and redraw use different clocks.
host->_time=CMTimeMake(39,25);selectShape();undo=base->_undoStarts;
[osc mouseDownAtPositionX:152 positionY:307 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];drain();
[osc mouseDraggedAtPositionX:432 positionY:181 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];
[osc drawOSCWithWidth:640 height:400 activePart:1 destinationImage:overlay atTime:host->_time];
run.record(@"native-osc-shape-keeps-draft-across-different-redraw-clock",[[plugin toolCanvasMaskAtTime:host->_time][@"shapeStarted"]boolValue]);
[osc mouseUpAtPositionX:488 positionY:149.5 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];drain();
p=DYMaskAtTime(DYSharedMaskWithID(DYReadTools(base,host->_time).document,maskID),kCMTimeZero);
run.record(@"native-osc-mask-release-saves-with-different-action-clock",fabs(p.centerX-.5)<1e-5&&fabs(p.centerY-.45)<1e-5&&fabs(p.width-.6)<1e-5&&fabs(p.height-.5)<1e-5&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
NSData *archive=[NSKeyedArchiver archivedDataWithRootObject:DYReadTools(base,host->_time) requiringSecureCoding:YES error:nil];DYToolDocument *restored=[NSKeyedUnarchiver unarchivedObjectOfClass:DYToolDocument.class fromData:archive error:nil];
run.record(@"native-osc-drawn-mask-persists-after-secure-reopen",[restored.document isEqual:DYReadTools(base,host->_time).document]);
[osc release];[plugin release];drain();
}