Use existing preset snapshot selector in deletion checks and add isolated host fixtures
这个提交包含在:
1 父节点
5212187cc8
当前提交
85ec27d49f
3 个文件已更改
+37
-2
没有与搜索条件相匹配的文件
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Create isolated synthetic timelines for module deletion; no library edits."""
|
||||
from pathlib import Path
|
||||
import uuid
|
||||
import xml.etree.ElementTree as E
|
||||
|
||||
qa = Path.home() / 'Library/Caches/CodexBuilds/com.dayu.color/fcp-qa'
|
||||
chart = qa / '大鱼调色验收图.png'
|
||||
assert chart.is_file(), 'Generate the existing synthetic chart fixture first.'
|
||||
root = E.Element('fcpxml', version='1.12')
|
||||
resources = E.SubElement(root, 'resources')
|
||||
E.SubElement(resources, 'format', id='f1', width='1920', height='1080',
|
||||
frameDuration='1/25s', colorSpace='1-1-1 (Rec. 709)')
|
||||
E.SubElement(resources, 'format', id='f2', width='1920', height='1080',
|
||||
name='FFVideoFormatRateUndefined')
|
||||
asset = E.SubElement(resources, 'asset', id='a1', name='模块删除验收图', start='0s',
|
||||
duration='0s', format='f2', hasVideo='1', videoSources='1')
|
||||
E.SubElement(asset, 'media-rep', kind='original-media', src=chart.as_uri())
|
||||
template = Path.home() / 'Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef'
|
||||
E.SubElement(resources, 'effect', id='fx', name='大鱼调色',
|
||||
uid='~/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef', src=template.as_uri())
|
||||
event = E.SubElement(E.SubElement(root, 'library'), 'event',
|
||||
name='大鱼调色_1.7.4_模块删除验收', uid=str(uuid.uuid4()).upper())
|
||||
for title in ['大鱼调色_1.7.4_删除与撤销', '大鱼调色_1.7.4_删空与重新添加']:
|
||||
project = E.SubElement(event, 'project', name=title, uid=str(uuid.uuid4()).upper())
|
||||
sequence = E.SubElement(project, 'sequence', format='f1', duration='4s',
|
||||
tcStart='0s', tcFormat='NDF', audioLayout='stereo', audioRate='48k')
|
||||
clip = E.SubElement(E.SubElement(sequence, 'spine'), 'video', ref='a1',
|
||||
name=title, offset='0s', start='0s', duration='4s')
|
||||
E.SubElement(clip, 'filter-video', ref='fx', name='大鱼调色', enabled='1')
|
||||
E.indent(root)
|
||||
output = qa / '大鱼调色_1.7.4_模块删除验收.fcpxml'
|
||||
output.write_text('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE fcpxml>\n'
|
||||
+ E.tostring(root, encoding='unicode') + '\n')
|
||||
print(output)
|
||||
@@ -34,7 +34,7 @@
|
||||
- (void)resetAll:(id)sender;
|
||||
- (void)removeTool:(NSButton *)sender;
|
||||
- (void)addModule:(NSMenuItem *)sender;
|
||||
- (NSDictionary *)presetPayload;
|
||||
- (NSDictionary *)presetSnapshot;
|
||||
@end
|
||||
@protocol DYSpiderProbe
|
||||
@property(nonatomic,copy) NSData *meshData;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
everyUndo&=host->_undoStarts==undo+1&&host->_undoStarts==host->_undoEnds&&!host->_undoActive;
|
||||
DYAssetState *cleared=DYReadAssets(host,kCMTimeZero);NSMutableDictionary *expected=[[assets.paths mutableCopy]autorelease];if([type isEqual:@"primary"])[expected removeObjectForKey:@"input"];if([type isEqual:@"look"]){[expected removeObjectForKey:@"look0"];[expected removeObjectForKey:@"look4"];}
|
||||
everyAsset&=[cleared.paths isEqual:expected]&&([type isEqual:@"spider"]?cleared.spiderMesh==nil&&cleared.spiderLinked:[cleared.spiderMesh isEqual:assets.spiderMesh]&&!cleared.spiderLinked);
|
||||
NSDictionary *preset=[view presetPayload];NSData *toolData=[[[NSData alloc]initWithBase64EncodedString:preset[@"tools"] options:0]autorelease];NSDictionary *presetDoc=[NSPropertyListSerialization propertyListWithData:toolData options:0 format:NULL error:nil];
|
||||
NSDictionary *preset=[view presetSnapshot];NSData *toolData=[[[NSData alloc]initWithBase64EncodedString:preset[@"tools"] options:0]autorelease];NSDictionary *presetDoc=[NSPropertyListSerialization propertyListWithData:toolData options:0 format:NULL error:nil];
|
||||
DYToolDocument *author=DYReadTools(host,kCMTimeZero);NSData *encoded=[NSKeyedArchiver archivedDataWithRootObject:author requiringSecureCoding:YES error:nil];DYToolDocument *restored=[NSKeyedUnarchiver unarchivedObjectOfClass:DYToolDocument.class fromData:encoded error:nil];
|
||||
DYInspector *reopened=[[[DYInspector alloc]initWithAPIManager:host]autorelease];[reopened refresh];BOOL hiddenAgain=NO;for(NSDictionary *c in [reopened valueForKey:@"cards"])if([c[@"section"][@"key"]isEqual:type])hiddenAgain=[c[@"removed"]boolValue];everyReopen&=hiddenAgain&&DYBaseToolRemoved(presetDoc,type)&&[restored.document isEqual:deleted];
|
||||
NSMenuItem *add=[[[NSMenuItem alloc]init]autorelease];add.representedObject=type;[view addModule:add];pumpDeletion();NSDictionary *added=DYReadTools(host,kCMTimeZero).document;NSDictionary *fresh=nil;for(NSDictionary *n in added[@"layers"])if([n[@"type"]isEqual:type]&&![n[@"id"]isEqual:siblingID]){fresh=n;break;}
|
||||
|
||||
在新工单中引用
屏蔽一个用户