Map single-step source time to timeline time for offset clips; 292 native checks pass
这个提交包含在:
1 父节点
6de86a8ec3
当前提交
020f064a28
6 个文件已更改
+18
-8
没有与搜索条件相匹配的文件
+7
-2
@@ -92,8 +92,13 @@ def main():
|
||||
if old:unregister(old/PLUGIN)
|
||||
archive.unlink();backup=CACHE/'previous-template.moef'
|
||||
if backup.exists():backup.unlink()
|
||||
run('pluginkit','-a',str(DEST/PLUGIN));registry=run('pluginkit','-m','-A','-D','-v','-i','com.dayu.color.XPC')
|
||||
entries=[l for l in registry.splitlines() if 'com.dayu.color.XPC(' in l]
|
||||
# Unregistering an old copy can race the host's launch registration. Re-add
|
||||
# only the verified installed path; never repeat signing/notarization/install.
|
||||
for attempt in range(3):
|
||||
run('pluginkit','-a',str(DEST/PLUGIN));registry=run('pluginkit','-m','-A','-D','-v','-i','com.dayu.color.XPC')
|
||||
entries=[l for l in registry.splitlines() if 'com.dayu.color.XPC(' in l]
|
||||
if entries:break
|
||||
time.sleep(.5)
|
||||
if len(entries)!=1 or not entries[0].rstrip().endswith('\t'+str(DEST/PLUGIN)):raise RuntimeError('PluginKit发现多份/错误版本: '+registry)
|
||||
record=dict(status='installed-awaiting-host-verification',path=str(DEST),bundleID='com.dayu.color',version=plistlib.loads((DEST/'Contents/Info.plist').read_bytes())['CFBundleShortVersionString'],build=plistlib.loads((DEST/'Contents/Info.plist').read_bytes())['CFBundleVersion'],team='B3W25FX5H5',notaryID=result['id'],notaryStatus=result['status'],gatekeeper=gate,sourceCommit=run('git','rev-parse','HEAD'),templatePath=str(TEMPLATE),templateSHA256=hashlib.sha256(TEMPLATE.read_bytes()).hexdigest(),shaderSHA256=hashlib.sha256((DEST/PLUGIN/'Contents/Resources/default.metallib').read_bytes()).hexdigest())
|
||||
if old:record['previousInstallBackup']=str(old)
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
BOOL hasResults=![self->_trackingCandidate[@"keys"]isEqual:self->_trackingFrozenMask[@"keys"]];NSString *message=self->_trackingMessage?:[NSString stringWithFormat:@"%@跟踪完成 · %lu 个轨迹键",self->_trackingBoth?@"双向":(self->_trackingBackward?@"反向":@"正向"),(unsigned long)[self->_trackingCandidate[@"keys"]count]];
|
||||
if(hasResults&&!self->_trackingDiscard){id<FxCustomParameterActionAPI_v4>a=[self->_apiManager apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];if(a){[a startAction:self];@try{NSMutableDictionary *doc=DYMutablePlist(DYReadTools(self->_apiManager,a.currentTime).document);NSMutableDictionary *mask=[self toolMask:self->_trackingMaskID node:self->_trackingNode document:doc];if(mask&&[mask isEqual:self->_trackingFrozenMask]){self->_trackingCandidate[@"status"]=message;[mask setDictionary:self->_trackingCandidate];id<FxUndoAPI>undo=[self->_apiManager apiForProtocol:@protocol(FxUndoAPI)];[undo startUndoGroup:@"蒙版区域跟踪"];BOOL written=DYWriteTools(self->_apiManager,doc,a.currentTime);[undo endUndoGroup];if(!written)message=@"宿主未接受轨迹,原蒙版已保留";}else message=@"目标工具或蒙版已更改,已丢弃过期跟踪结果";}@finally{[a endAction:self];}}}
|
||||
CMTime stepTime=self->_trackingPreviousTime;BOOL advance=self->_trackingSingle&&hasResults&&!self->_trackingDiscard&&!self->_trackingCancelled.load()&&CMTIME_IS_NUMERIC(stepTime);
|
||||
self->_trackingActive.store(false);if(advance){id<FxCustomParameterActionAPI_v4>seek=[self->_apiManager apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];if(seek){[seek startAction:self];@try{id<FxCommandAPI_v2>command=[self->_apiManager apiForProtocol:@protocol(FxCommandAPI_v2)];[command movePlayheadToTime:stepTime error:nil];}@finally{[seek endAction:self];}}}[self->_toolAnalysisTimer invalidate];[self->_toolAnalysisTimer release];self->_toolAnalysisTimer=nil;[self toolStatus:message];[NSNotificationCenter.defaultCenter postNotificationName:DYModelChanged object:self->_apiManager];
|
||||
self->_trackingActive.store(false);if(advance){id<FxCustomParameterActionAPI_v4>seek=[self->_apiManager apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];if(seek){[seek startAction:self];@try{id<FxTimingAPI_v4>timing=[self->_apiManager apiForProtocol:@protocol(FxTimingAPI_v4)];CMTime timelineTime=kCMTimeInvalid;[timing timelineTime:&timelineTime fromInputTime:stepTime];id<FxCommandAPI_v2>command=[self->_apiManager apiForProtocol:@protocol(FxCommandAPI_v2)];if(!CMTIME_IS_NUMERIC(timelineTime)||![command movePlayheadToTime:timelineTime error:nil])message=[message stringByAppendingString:@";轨迹已保存,宿主未能移动播放头"];}@finally{[seek endAction:self];}}}[self->_toolAnalysisTimer invalidate];[self->_toolAnalysisTimer release];self->_toolAnalysisTimer=nil;[self toolStatus:message];[NSNotificationCenter.defaultCenter postNotificationName:DYModelChanged object:self->_apiManager];
|
||||
});return YES;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,10 @@
|
||||
capture(0);request(1);callbacks=[plugin desiredAnalysisTimeRange:&desired forInputWithTimeRange:inputRange error:nil]&&[plugin setupAnalysisForTimeRange:desired frameDuration:timeAt(1) error:nil];for(int i=0;i<3&&callbacks;i++){setFrame(i);callbacks&=[plugin analyzeFrame:frame atTime:timeAt(i) error:nil];}NSMutableDictionary *changed=DYMutablePlist(DYReadTools(base,kCMTimeZero).document);changed[@"baseMasks"][@"hsl"][0][@"enabled"]=@NO;DYWriteTools(base,changed,kCMTimeZero);[plugin cleanupAnalysis:nil];drain();run.record(@"stale-analysis-cannot-overwrite-edited-mask",[DYReadTools(base,kCMTimeZero).document isEqual:changed]&&base->_undoStarts==writes);
|
||||
DYWriteTools(base,doc,kCMTimeZero);capture(0);request(1);callbacks=[plugin desiredAnalysisTimeRange:&desired forInputWithTimeRange:inputRange error:nil]&&[plugin setupAnalysisForTimeRange:desired frameDuration:timeAt(1) error:nil];for(int i=0;i<3&&callbacks;i++){setFrame(i);callbacks&=[plugin analyzeFrame:frame atTime:timeAt(i) error:nil];}request(9);setFrame(3);NSError *cancelError=nil;BOOL stopped=![plugin analyzeFrame:frame atTime:timeAt(3) error:&cancelError];drain();tracked=DYReadTools(base,kCMTimeZero).document[@"baseMasks"][@"hsl"][0];run.record(@"cancel-keeps-only-contiguous-trusted-segment",callbacks&&stopped&&[tracked[@"keys"]count]==3&&base->_undoStarts==writes+1);run.record(@"cancel-sends-sdk-quiet-analysis-termination",[cancelError.domain isEqual:FxPlugErrorDomain]&&cancelError.code==kFxError_UserCancelled);
|
||||
DYWriteTools(base,doc,kCMTimeZero);capture(2);host->_state=kFxAnalysisState_NotAnalyzing;request(0);callbacks=[plugin desiredAnalysisTimeRange:&desired forInputWithTimeRange:inputRange error:nil]&&[plugin setupAnalysisForTimeRange:desired frameDuration:timeAt(1) error:nil];for(int i=2;i<6&&callbacks;i++){setFrame(i);callbacks&=[plugin analyzeFrame:frame atTime:timeAt(i) error:nil];}[plugin cleanupAnalysis:nil];drain();BOOL backward=host->_backwardStarts==1;callbacks&=[plugin desiredAnalysisTimeRange:&desired forInputWithTimeRange:inputRange error:nil]&&[plugin setupAnalysisForTimeRange:desired frameDuration:timeAt(1) error:nil];for(int i=2;i>=0&&callbacks;i--){setFrame(i);callbacks&=[plugin analyzeFrame:frame atTime:timeAt(i) error:nil];}[plugin cleanupAnalysis:nil];drain();tracked=DYReadTools(base,kCMTimeZero).document[@"baseMasks"][@"hsl"][0];run.record(@"bidirectional-passes-share-reference-and-merge-once",callbacks&&backward&&[tracked[@"keys"]count]==6&&base->_undoStarts==writes+2);
|
||||
DYWriteTools(base,doc,kCMTimeZero);capture(2);host->_state=kFxAnalysisState_NotAnalyzing;request(-2);BOOL range=[plugin desiredAnalysisTimeRange:&desired forInputWithTimeRange:inputRange error:nil]&&CMTimeCompare(desired.start,timeAt(1))==0&&CMTimeCompare(desired.duration,timeAt(2))==0;[plugin setupAnalysisForTimeRange:desired frameDuration:timeAt(1) error:nil];for(int i=2;i>=1;i--){setFrame(i);[plugin analyzeFrame:frame atTime:timeAt(i) error:nil];}setFrame(0);NSError *singleStopError=nil;stopped=![plugin analyzeFrame:frame atTime:timeAt(0) error:&singleStopError];drain();tracked=DYReadTools(base,kCMTimeZero).document[@"baseMasks"][@"hsl"][0];run.record(@"backward-single-step-includes-reference-and-one-neighbor",range&&stopped&&[tracked[@"keys"]count]==2);run.record(@"single-step-sends-sdk-quiet-analysis-termination",[singleStopError.domain isEqual:FxPlugErrorDomain]&&singleStopError.code==kFxError_UserCancelled);
|
||||
DYWriteTools(base,doc,kCMTimeZero);capture(2);host->_timelineOffset=CMTimeMake(4,1);host->_state=kFxAnalysisState_NotAnalyzing;request(-2);BOOL range=[plugin desiredAnalysisTimeRange:&desired forInputWithTimeRange:inputRange error:nil]&&CMTimeCompare(desired.start,timeAt(1))==0&&CMTimeCompare(desired.duration,timeAt(2))==0;[plugin setupAnalysisForTimeRange:desired frameDuration:timeAt(1) error:nil];for(int i=2;i>=1;i--){setFrame(i);[plugin analyzeFrame:frame atTime:timeAt(i) error:nil];}setFrame(0);NSError *singleStopError=nil;stopped=![plugin analyzeFrame:frame atTime:timeAt(0) error:&singleStopError];drain();tracked=DYReadTools(base,kCMTimeZero).document[@"baseMasks"][@"hsl"][0];run.record(@"backward-single-step-includes-reference-and-one-neighbor",range&&stopped&&[tracked[@"keys"]count]==2);run.record(@"single-step-sends-sdk-quiet-analysis-termination",[singleStopError.domain isEqual:FxPlugErrorDomain]&&singleStopError.code==kFxError_UserCancelled);
|
||||
run.record(@"backward-single-step-seeks-timeline-with-clip-offset",host->_seekCount==1&&CMTimeCompare(host->_seekTime,CMTimeAdd(CMTimeMake(4,1),timeAt(1)))==0&&CMTimeCompare(host->_time,timeAt(1))==0);
|
||||
DYWriteTools(base,doc,kCMTimeZero);capture(2);BOOL repeated=YES;for(int first=2;first<4;first++){request(2);repeated&=[plugin desiredAnalysisTimeRange:&desired forInputWithTimeRange:inputRange error:nil]&&[plugin setupAnalysisForTimeRange:desired frameDuration:timeAt(1) error:nil];for(int i=first;i<=first+1&&repeated;i++){setFrame(i);repeated&=[plugin analyzeFrame:frame atTime:timeAt(i) error:nil];}[plugin cleanupAnalysis:nil];drain();repeated&=CMTimeCompare(host->_time,timeAt(first+1))==0;}run.record(@"repeated-forward-single-step-continues-source-frames-at-offset-clip",repeated&&host->_seekCount==3&&CMTimeCompare(host->_seekTime,CMTimeAdd(CMTimeMake(4,1),timeAt(4)))==0);
|
||||
|
||||
// An expected loss must end the host job, not only our local tracking state.
|
||||
DYWriteTools(base,doc,kCMTimeZero);capture(0);request(1);callbacks=[plugin desiredAnalysisTimeRange:&desired forInputWithTimeRange:inputRange error:nil]&&[plugin setupAnalysisForTimeRange:desired frameDuration:timeAt(1) error:nil];for(int i=0;i<3&&callbacks;i++){setFrame(i);callbacks&=[plugin analyzeFrame:frame atTime:timeAt(i) error:nil];}
|
||||
Pixels flat(tw*th*4,.1f);for(size_t i=3;i<flat.size();i+=4)flat[i]=1;[[frame metalTextureForDevice:gpu]replaceRegion:MTLRegionMake2D(0,0,tw,th) mipmapLevel:0 withBytes:flat.data() bytesPerRow:tw*8];NSError *lossError=nil;stopped=![plugin analyzeFrame:frame atTime:timeAt(3) error:&lossError];drain();tracked=DYReadTools(base,kCMTimeZero).document[@"baseMasks"][@"hsl"][0];run.record(@"texture-loss-keeps-prefix-and-sends-sdk-quiet-termination",callbacks&&stopped&&[tracked[@"keys"]count]==3&&[lossError.domain isEqual:FxPlugErrorDomain]&&lossError.code==kFxError_UserCancelled);
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
#include "MaskCore/DYTracker.hpp"
|
||||
@interface DYToolTrackingProbe : NSObject<PROAPIAccessing> {
|
||||
@public
|
||||
id _base;CMTime _time;FxAnalysisState _state;int _forwardStarts,_backwardStarts;
|
||||
id _base;CMTime _time,_timelineOffset,_seekTime;int _seekCount;FxAnalysisState _state;int _forwardStarts,_backwardStarts;
|
||||
}
|
||||
@end
|
||||
@implementation DYToolTrackingProbe
|
||||
- (id)apiForProtocol:(Protocol*)protocol{NSString *name=NSStringFromProtocol(protocol);if([@[@"FxAnalysisAPI",@"FxTimingAPI_v4",@"FxCustomParameterActionAPI_v4"]containsObject:name])return self;return [_base apiForProtocol:protocol];}
|
||||
- (id)apiForProtocol:(Protocol*)protocol{NSString *name=NSStringFromProtocol(protocol);if([@[@"FxAnalysisAPI",@"FxTimingAPI_v4",@"FxCustomParameterActionAPI_v4",@"FxCommandAPI_v2"]containsObject:name])return self;return [_base apiForProtocol:protocol];}
|
||||
- (void)startAction:(id)sender{[(id<FxCustomParameterActionAPI_v4>)_base startAction:sender];}
|
||||
- (void)endAction:(id)sender{[(id<FxCustomParameterActionAPI_v4>)_base endAction:sender];}
|
||||
- (CMTime)currentTime{return _time;}
|
||||
- (void)timelineTime:(CMTime*)timeline fromInputTime:(CMTime)input{*timeline=CMTimeAdd(input,CMTIME_IS_NUMERIC(_timelineOffset)?_timelineOffset:kCMTimeZero);}
|
||||
- (BOOL)movePlayheadToTime:(CMTime)time error:(NSError**)error{_seekTime=time;_seekCount++;_time=CMTimeSubtract(time,CMTIME_IS_NUMERIC(_timelineOffset)?_timelineOffset:kCMTimeZero);return YES;}
|
||||
- (FxAnalysisState)analysisStateForEffect{return _state;}
|
||||
- (BOOL)startForwardAnalysis:(FxAnalysisLocation)location error:(NSError**)error{_forwardStarts++;_state=kFxAnalysisState_AnalysisStarted;return YES;}
|
||||
- (BOOL)startBackwardAnalysis:(FxAnalysisLocation)location error:(NSError**)error{_backwardStarts++;_state=kFxAnalysisState_AnalysisStarted;return YES;}
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.4.2</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>28</string>
|
||||
<string>29</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string></string>
|
||||
<key>PlugInKit</key>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.4.2</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>28</string>
|
||||
<string>29</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
||||
在新工单中引用
屏蔽一个用户