diff --git a/大鱼调色/Plugin/DYPlugIn.mm b/大鱼调色/Plugin/DYPlugIn.mm index 35b6e74..515627f 100644 --- a/大鱼调色/Plugin/DYPlugIn.mm +++ b/大鱼调色/Plugin/DYPlugIn.mm @@ -50,7 +50,7 @@ - (void)applyValues:(NSDictionary*)values{if(!values){[self alert:@"尚未拿到当前片段画面,请移动播放头后重试。"];return;}ida=[_apiManager apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];[a startAction:self];@try{ids=[_apiManager apiForProtocol:@protocol(FxParameterSettingAPI_v6)];for(NSDictionary*r in DYDescriptors()){NSNumber*v=values[r[@"key"]];if(v)[s setFloatValue:v.doubleValue toParameter:[r[@"pid"]unsignedIntValue] atTime:a.currentTime];}}@finally{[a endAction:self];}[NSNotificationCenter.defaultCenter postNotificationName:DYModelChanged object:_apiManager];} - (void)autoRequested:(NSNotification*)n{NSData*frame=[_renderer preview];[self applyValues:[n.name isEqual:@"DYAutoGrade"]?DYAutoGrade(frame):DYAutoWhiteBalance(frame)];} - (void)canvasWhiteBalanceRequested:(NSNotification*)note { - CMTime time=[note.userInfo[@"time"] CMTimeValue]; + CMTime time=[(NSValue*)note.userInfo[@"time"] CMTimeValue]; if(_canvasSampler||!CMTIME_IS_NUMERIC(time))return; _canvasSampler=[NSColorSampler new]; [_canvasSampler showSamplerWithSelectionHandler:^(NSColor *color){ @@ -96,7 +96,7 @@ [self alert:@"所选颜色过暗,请选择白色或中性灰区域。"];return; } NSDictionary *values=@{@"temperature":@(temperature),@"tint":@(tint)}; - if(n.userInfo[@"time"])[self applyCanvasWhiteBalance:values atTime:[n.userInfo[@"time"] CMTimeValue]]; + if(n.userInfo[@"time"])[self applyCanvasWhiteBalance:values atTime:[(NSValue*)n.userInfo[@"time"] CMTimeValue]]; else [self applyValues:values]; } @end diff --git a/大鱼调色/Plugin/DYViewerControlsDiagnostics.inc.h b/大鱼调色/Plugin/DYViewerControlsDiagnostics.inc.h index 6f0503b..8264865 100644 --- a/大鱼调色/Plugin/DYViewerControlsDiagnostics.inc.h +++ b/大鱼调色/Plugin/DYViewerControlsDiagnostics.inc.h @@ -24,7 +24,7 @@ run.record(@"viewer-persistent-mask-entries-route-shapes-to-shared-workspace",maskRoutes&&base->_undoStarts==undo); [NSNotificationCenter.defaultCenter removeObserver:observer];[requestedPage release]; __block NSInteger eyedropperRequests=0;__block CMTime eyedropperTime=kCMTimeInvalid; - id sampleObserver=[NSNotificationCenter.defaultCenter addObserverForName:@"DYViewerWhiteBalanceRequested" object:host queue:nil usingBlock:^(NSNotification *note){eyedropperRequests++;eyedropperTime=[note.userInfo[@"time"] CMTimeValue];}]; + id sampleObserver=[NSNotificationCenter.defaultCenter addObserverForName:@"DYViewerWhiteBalanceRequested" object:host queue:nil usingBlock:^(NSNotification *note){eyedropperRequests++;eyedropperTime=[(NSValue*)note.userInfo[@"time"] CMTimeValue];}]; click(areaFor(controls,@"tool",@"whiteBalance"));drain(); run.record(@"viewer-white-balance-icon-routes-a-single-time-bound-pick",eyedropperRequests==1&&CMTimeCompare(eyedropperTime,host->_time)==0&&!panelFor(@"whiteBalance")&&[initial isEqual:base->_values]); [NSNotificationCenter.defaultCenter removeObserver:sampleObserver];