fix: preserve curve layer selection across frame gaps and keep canvas controls reachable; prepare 1.10.0 build71

这个提交包含在:
mac 于 2026-11-04 21:56:32 +08:00 提交
1 父节点 031c704f0f
当前提交 fe8b298c33
7 个文件已更改
+41 -10

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

@@ -26,5 +26,9 @@
[osc hitTestOSCAtMousePositionX:450 mousePositionY:200 activePart:&part atTime:kCMTimeZero];BOOL insideViewer=part>=20000;[osc mouseDraggedAtPositionX:450 positionY:200 activePart:part modifiers:0 forceUpdate:&update atTime:kCMTimeZero];[osc mouseUpAtPositionX:450 positionY:200 activePart:part modifiers:0 forceUpdate:&update atTime:kCMTimeZero];drain();
DYMaskParameters p=DYMaskAtTime(DYReadTools(base,kCMTimeZero).document[@"baseMasks"][@"hsl"][0],kCMTimeZero);
run.record(@"native-osc-mask-gesture-keeps-capture-when-crossing-the-open-viewer-panel",insideViewer&&fabs(p.centerX-(.5+190./560))<1e-5&&fabs(p.centerY-(.5+12.5/315))<1e-5&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
BOOL toolbarBounded=YES;for(NSRect view:{NSMakeRect(400,310,480,100),NSMakeRect(0,0,120,80),NSMakeRect(-100,-50,400,300)}){
[(id)osc setValue:[NSValue valueWithRect:view]forKey:@"imageRect"];[(id)osc setValue:@2 forKey:@"uiScale"];NSRect visible=NSIntersectionRect(view,NSMakeRect(0,0,640,400));
for(NSInteger i=0;i<9;i++)toolbarBounded&=NSContainsRect(visible,[(id)osc toolbarRectForItem:i]);}
run.record(@"native-osc-mask-toolbar-stays-inside-small-letterboxed-image",toolbarBounded);
[osc release];[plugin release];drain();
}
+1 -1
查看文件
@@ -31,7 +31,7 @@ static const NSInteger DYViewerPartBase=20000;
for(DYViewerParameterPanel*p in [[_panels copy]autorelease]){if(!p.visible){if(p==_capture){[p finishCapture];_capture=nil;}p.bridge=nil;[_panels removeObjectIdenticalTo:p];continue;}[p setViewport:v];[p prepareWithSize:size scale:s atTime:time];}
if(_capture&&![_capture capturing])_capture=nil;
[_areas removeAllObjects];if(!_bridge||v.size.width<100||v.size.height<80)return;
NSInteger cap=MAX(1,MIN(14,(NSInteger)floor((v.size.height-72*s)/(30*s))));NSInteger pages=(14+cap-1)/cap;_railPage=MAX(0,_railPage)%pages;
NSInteger cap=MAX(1,MIN(14,(NSInteger)floor((v.size.height-72*s)/(30*s))));if(cap<14)cap=MAX(1,MIN(13,(NSInteger)floor((v.size.height-96*s)/(30*s))));NSInteger pages=(14+cap-1)/cap;_railPage=MAX(0,_railPage)%pages;
CGFloat x=NSMinX(v)+8*s,y=NSMinY(v)+8*s,w=40*s;
_rail=NSMakeRect(x,y,w,(30*MIN(cap,14-_railPage*cap)+54+(pages>1?24:0))*s);
NSArray*titles=@[@"一级",@"蜘蛛",@"基础",@"肤色",@"LUT",@"HSL",@"曲线",@"分级",@"原色",@"色阶",@"黑白",@"平衡",@"通道",@"胶片"];
@@ -29,6 +29,14 @@
[controls event:NSEventTypeLeftMouseUp point:NSMakePoint(-100,1000)atTime:host->_time];drain();publish();
run.record(@"viewer-slider-captures-outside-and-closes-one-undo",value(@"exposure")==-5&&![controls capturing]&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);click(areaFor(panel,@"reset",@"exposure"));drain();publish();
click(areaFor(panel,@"headerBool",@"baseEnabled"));drain();publish();run.record(@"viewer-base-tone-and-color-eyes-remain-independent",value(@"baseEnabled")==0&&value(@"colorEnabled")==1);click(areaFor(panel,@"headerBool",@"baseEnabled"));drain();publish();
// Empty panels cannot close the shared bridge gesture owned by a live panel.
NSMutableDictionary*removedDoc=DYMutablePlist(DYReadTools(host,host->_time).document);DYSetBaseToolRemoved(removedDoc,@"film",YES);DYWriteTools(host,removedDoc,host->_time);publish();click(areaFor(controls,@"tool",@"film"));[panelFor(@"film")setValue:[NSValue valueWithPoint:NSMakePoint(.72,.1)]forKey:@"position"];publish();
// Base is still visible; raise it by an inert label down/up.
exposure=areaFor(panel,@"slider",@"exposure");row=[exposure[@"rect"]rectValue];label=NSMakePoint(row.origin.x+10,row.origin.y+5);[controls event:NSEventTypeLeftMouseDown point:label atTime:host->_time];[controls event:NSEventTypeLeftMouseUp point:label atTime:host->_time];
track=NSMakeRect(row.origin.x+5,row.origin.y+28,row.size.width-10,4);knob=NSMakePoint(NSMidX(track),NSMidY(track));undo=base->_undoStarts;
[controls event:NSEventTypeLeftMouseDown point:knob atTime:host->_time];[controls event:NSEventTypeLeftMouseDragged point:NSMakePoint(knob.x+track.size.width*.1,knob.y)atTime:host->_time];drain();publish();[controls event:NSEventTypeLeftMouseDragged point:NSMakePoint(knob.x+track.size.width*.2,knob.y)atTime:host->_time];[controls event:NSEventTypeLeftMouseUp point:NSMakePoint(knob.x+track.size.width*.3,knob.y)atTime:host->_time];drain();publish();
run.record(@"viewer-empty-removed-tool-never-terminates-another-panels-live-gesture",fabs(value(@"exposure")-3)<1e-5&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
click(areaFor(controls,@"tool",@"film"));click(areaFor(panel,@"reset",@"exposure"));drain();publish();
click(areaFor(controls,@"tool",@"curve"));id curve=panelFor(@"curve");
run.record(@"viewer-curve-opens-an-editable-graph-beside-existing-panel",curve&&panelFor(@"base")&&areaFor(curve,@"curvePlot",nil)&&!areaFor(curve,@"slider",nil));
NSRect plot=[areaFor(curve,@"curvePlot",nil)[@"rect"]rectValue];NSPoint point=NSMakePoint(plot.origin.x+.43*plot.size.width,plot.origin.y+.18*plot.size.height);undo=base->_undoStarts;
@@ -45,6 +53,7 @@
[controls event:NSEventTypeLeftMouseDown point:wp atTime:host->_time];[controls event:NSEventTypeLeftMouseDragged point:NSMakePoint(NSMidX(wr),NSMidY(wr)-wr.size.width*.3)atTime:host->_time];[controls event:NSEventTypeLeftMouseUp point:NSMakePoint(NSMidX(wr),NSMidY(wr)-wr.size.width*.4)atTime:host->_time];drain();publish();
run.record(@"viewer-grading-wheel-edits-hue-and-saturation-in-one-gesture",wheel&&fabs(value(@"grade0_0")-90)<1e-5&&fabs(value(@"grade0_1")-80)<1e-4&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1&&[[controls valueForKey:@"panels"]count]==3);
click(areaFor(grading,@"graphMode",nil));run.record(@"viewer-graph-panel-retains-precise-parameter-view",areaFor(grading,@"slider",nil)&&!areaFor(grading,@"wheel",nil));
NSRect modeRect=[areaFor(grading,@"graphMode",nil)[@"rect"]rectValue],nextRect=[areaFor(grading,@"next",nil)[@"rect"]rectValue];run.record(@"viewer-graph-mode-and-page-buttons-never-overlap",!NSIntersectsRect(modeRect,nextRect));
click(areaFor(grading,@"close",nil));run.record(@"viewer-closing-one-panel-preserves-other-graph-and-controls",!panelFor(@"grading")&&panelFor(@"curve")&&panelFor(@"base"));
// A repeated curve layer selects its UUID, rather than redirecting writes to root.
NSMutableDictionary*doc=DYMutablePlist(DYReadTools(host,host->_time).document);NSDictionary*layer=DYInsertTool(doc,@"curve",@"base:curve");NSString*layerID=[[layer[@"id"]copy]autorelease];DYWriteTools(host,doc,host->_time);publish();
@@ -52,11 +61,16 @@
click(areaFor(curve,@"open",nil));click(areaFor(curve,@"open",nil));click(areaFor(curve,@"catalog",nil));NSDictionary*module=areaFor(curve,@"module",layerID);click(module);
run.record(@"viewer-floating-editor-layer-menu-selects-only-its-tool-type",module&&[[curve valueForKey:@"nodeID"]isEqual:layerID]&&[[curve valueForKey:@"nodes"]count]==2);
plot=[areaFor(curve,@"curvePlot",nil)[@"rect"]rectValue];point=NSMakePoint(NSMidX(plot),NSMidY(plot));[controls event:NSEventTypeLeftMouseDown point:point atTime:host->_time];[controls prepareWithSize:size scale:1 atTime:CMTimeMake(1,24)];
run.record(@"viewer-playhead-change-clears-graphic-capture",![controls capturing]);publish();
run.record(@"viewer-playhead-change-clears-graphic-capture",![controls capturing]);
run.record(@"viewer-missing-next-frame-snapshot-preserves-selected-independent-layer",[[curve valueForKey:@"nodeID"]isEqual:layerID]&&!areaFor(curve,@"curvePlot",nil));
host->_time=CMTimeMake(1,24);publish();run.record(@"viewer-new-frame-restores-the-same-independent-editor-target",[[curve valueForKey:@"nodeID"]isEqual:layerID]&&areaFor(curve,@"curvePlot",nil));host->_time=kCMTimeZero;publish();
doc=DYMutablePlist(DYReadTools(host,host->_time).document);DYRemoveTool(doc,layerID);DYWriteTools(host,doc,host->_time);publish();run.record(@"viewer-deleted-layer-falls-back-to-surviving-same-tool",[[curve valueForKey:@"nodeID"]isEqual:@"base:curve"]);
click(areaFor(controls,@"hidePanels",nil));BOOL bounded=YES;
for(NSSize next:{NSMakeSize(120,80),NSMakeSize(320,240),NSMakeSize(1280,720)})for(CGFloat scale:{1.,2.}){[controls setViewport:NSMakeRect(0,0,next.width,next.height)];[controls prepareWithSize:next scale:scale atTime:host->_time];bounded&=[controls partAtPoint:NSMakePoint(-1,20)]==0&&[controls partAtPoint:NSMakePoint(next.width+1,20)]==0&&[controls partAtPoint:NSMakePoint(30,next.height+1)]==0;}
for(NSSize next:{NSMakeSize(120,80),NSMakeSize(180,200),NSMakeSize(320,240),NSMakeSize(1000,462),NSMakeSize(1280,720)})for(CGFloat scale:{1.,2.}){[controls setViewport:NSMakeRect(0,0,next.width,next.height)];[controls prepareWithSize:next scale:scale atTime:host->_time];for(NSDictionary*a in [controls valueForKey:@"areas"])bounded&=NSContainsRect(NSMakeRect(0,0,next.width,next.height),[a[@"rect"]rectValue]);bounded&=[controls partAtPoint:NSMakePoint(-1,20)]==0&&[controls partAtPoint:NSMakePoint(next.width+1,20)]==0&&[controls partAtPoint:NSMakePoint(30,next.height+1)]==0;}
run.record(@"viewer-small-and-retina-canvases-never-hit-outside-visible-image",bounded);
[controls setViewport:NSMakeRect(0,0,180,200)];[controls prepareWithSize:NSMakeSize(180,200)scale:1 atTime:host->_time];click(areaFor(controls,@"tool",@"base"));NSDictionary*railEntry=areaFor(controls,@"tool",@"base");NSRect entryRect=[railEntry[@"rect"]rectValue];run.record(@"viewer-vertical-entry-remains-reachable-above-overlapping-small-panel",[controls partAtPoint:NSMakePoint(NSMidX(entryRect),NSMidY(entryRect))]==[railEntry[@"part"]integerValue]);
click(areaFor(controls,@"hidePanels",nil));
[controls setViewport:NSMakeRect(40,30,1160,650)];[controls prepareWithSize:size scale:1 atTime:host->_time];NSRect rail=[[controls valueForKey:@"rail"]rectValue];run.record(@"viewer-rail-is-anchored-to-image-and-not-letterbox",NSContainsRect(NSMakeRect(40,30,1160,650),rail)&&[controls partAtPoint:NSMakePoint(NSMidX(rail),20)]==0);
// Offscreen drawing checks the actual OSC renderer, without opening an APP.
[controls setViewport:NSMakeRect(0,0,1280,720)];[controls prepareWithSize:size scale:1 atTime:host->_time];
@@ -12,3 +12,7 @@
- (BOOL)finishCapture;
- (id)valueForKey:(NSString*)key;
@end
@interface NSObject (DYMaskToolbarDiagnosticGeometry)
- (NSRect)toolbarRectForItem:(NSInteger)item;
@end
@@ -30,11 +30,20 @@
run.record(@"workspace-async-color-context-conflict-preserves-state",completed&&selectionError&&[DYReadAssets(host,kCMTimeZero).paths[@"look0"]isEqual:@"user-new.cube"]);
completed=NO;selectionError=nil;NSProgress *pending=[workspace selectLUT:@"late.cube" completion:^(NSError *e){completed=YES;selectionError=e;}];[workspace close];[scopeRenderer completePreparation];
run.record(@"workspace-close-cancels-pending-selection-without-write",pending.cancelled&&completed&&selectionError&&[DYReadAssets(host,kCMTimeZero).paths[@"look0"]isEqual:@"user-new.cube"]);
NSMutableDictionary *document=DYMutablePlist(DYReadTools(host,kCMTimeZero).document);NSDictionary *look=DYInsertTool(document,@"look",nil);NSString *nodeID=[[look[@"id"]copy]autorelease];DYWriteTools(host,document,kCMTimeZero);
NSMutableDictionary *document=DYMutablePlist(DYReadTools(host,kCMTimeZero).document);NSDictionary *look=DYInsertTool(document,@"look",@"base:look");NSString *nodeID=[[look[@"id"]copy]autorelease];BOOL inserted=look&&DYWriteTools(host,document,kCMTimeZero);run.need(@"workspace-independent-style-fixture-inserted",inserted,@{@"node":nodeID?:@"missing",@"validDocument":@(DYValidToolDocument(document))});
DYToolManager *node=[[[DYToolManager alloc]initWithHost:host node:look]autorelease];DYColorWorkspace *nodeWorkspace=[[[DYColorWorkspace alloc]initWithManager:node renderer:scopeRenderer library:scopeLibrary title:@"独立风格"]autorelease];starts=host->_undoStarts;host->_nodeCommitHadUndo=NO;
wrote=[nodeWorkspace commitLUT:@"node.cube" expected:[nodeWorkspace selectionContext] error:&workspaceError];
run.record(@"workspace-independent-style1-writes-target-node-inside-undo",wrote&&[DYToolWithID(DYReadTools(host,kCMTimeZero).document,nodeID)[@"paths"][@"look0"]isEqual:@"node.cube"]&&[DYReadAssets(host,kCMTimeZero).paths[@"look0"]isEqual:@"user-new.cube"]&&host->_nodeCommitHadUndo&&host->_undoStarts==starts+1);
run.record(@"workspace-independent-style1-writes-target-node-inside-undo",wrote&&[DYToolWithID(DYReadTools(host,kCMTimeZero).document,nodeID)[@"paths"][@"look0"]isEqual:@"node.cube"]&&[DYReadAssets(host,kCMTimeZero).paths[@"look0"]isEqual:@"user-new.cube"]&&host->_nodeCommitHadUndo&&host->_undoStarts==starts+1,@{@"written":@(wrote),@"error":workspaceError.localizedDescription?:@"none",@"nodePaths":DYToolWithID(DYReadTools(host,kCMTimeZero).document,nodeID)[@"paths"]?:@{},@"rootStyle1":DYReadAssets(host,kCMTimeZero).paths[@"look0"]?:@"none",@"commitWithinUndo":@(host->_nodeCommitHadUndo),@"undoStartsBefore":@(starts),@"undoStartsAfter":@(host->_undoStarts)});
document=DYMutablePlist(DYReadTools(host,kCMTimeZero).document);DYRemoveTool(document,nodeID);DYWriteTools(host,document,kCMTimeZero);starts=host->_undoStarts;workspaceError=nil;
wrote=[nodeWorkspace commitLUT:@"deleted.cube" expected:[nodeWorkspace selectionContext] error:&workspaceError];run.record(@"workspace-deleted-node-does-not-write-another-layer",!wrote&&workspaceError&&host->_undoStarts==starts&&[DYReadAssets(host,kCMTimeZero).paths[@"look0"]isEqual:@"user-new.cube"]);
[nodeWorkspace close];run.record(@"workspace-offscreen-fixtures-never-presented",!fixture.visible&&!host->_permissionFailure&&host->_actionDepth==0);
// Run the production final-tile sampling and worker color conversion on a
// known premultiplied half-float host output, independently of LUT analysis.
DYDiagnosticTile *finalTile=[[[DYDiagnosticTile alloc]initWithDevice:gpu width:4 height:4]autorelease];CGColorSpaceRef finalSpace=CGColorSpaceCreateWithName(kCGColorSpaceExtendedLinearSRGB);[finalTile setDiagnosticColorSpace:finalSpace];CGColorSpaceRelease(finalSpace);
std::vector<__fp16> finalPixels(4*4*4);for(unsigned i=0;i<16;i++){finalPixels[i*4]=.125f;finalPixels[i*4+1]=.25f;finalPixels[i*4+2]=.375f;finalPixels[i*4+3]=.5f;}[[finalTile metalTextureForDevice:gpu]replaceRegion:MTLRegionMake2D(0,0,4,4) mipmapLevel:0 withBytes:finalPixels.data() bytesPerRow:4*8];
[scopeRenderer setScopeEnabled:YES];[scopeRenderer captureScopeTile:finalTile atTime:CMTimeMake(7,24)];double scopeDeadline=NSProcessInfo.processInfo.systemUptime+5;while(!scopeRenderer.scopeMetadata&&NSProcessInfo.processInfo.systemUptime<scopeDeadline)[[NSRunLoop mainRunLoop]runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:.005]];
NSDictionary *scopeData=scopeRenderer.scopeMetadata;NSData *finalPreview=scopeRenderer.scopePreview;const float *finalSample=(const float*)finalPreview.bytes;
run.record(@"workspace-final-output-sample-unpremultiplies-and-converts-real-icc",[scopeData[@"converted"]boolValue]&&[scopeData[@"valid"]unsignedIntegerValue]==320*180&&finalPreview.length==320*180*16&&fabs(finalSample[0]-.537099)<.003&&fabs(finalSample[1]-.735357)<.003&&fabs(finalSample[2]-.880825)<.003&&finalSample[3]==.5f);
run.record(@"workspace-final-output-worker-publishes-real-scope-rasters",[scopeData[@"waveform"]length]==320*256*4&&[scopeData[@"parade"]length]==3*320*256*4&&[scopeData[@"histogram"]length]==4*256*4&&[scopeData[@"wholeImage"]boolValue]);
[scopeRenderer setScopeEnabled:NO];[scopeRenderer captureScopeTile:finalTile atTime:CMTimeMake(8,24)];workspaceDrain();run.record(@"workspace-hidden-scope-capture-does-no-work",[scopeRenderer.scopeMetadata isEqual:scopeData]);
}
+3 -3
查看文件
@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.9.0</string>
<string>1.10.0</string>
<key>CFBundleVersion</key>
<string>70</string>
<string>71</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>PlugInKit</key>
@@ -71,7 +71,7 @@
<key>uuid</key>
<string>1C17B73B-F229-4C09-A434-EAF6DFF5F22A</string>
<key>version</key>
<string>1.9.0</string>
<string>1.10.0</string>
</dict>
<dict>
<key>className</key>
+2 -2
查看文件
@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.9.0</string>
<string>1.10.0</string>
<key>CFBundleVersion</key>
<string>70</string>
<string>71</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>