fix: leave LUT menu tracking before opening file and browser panels

这个提交包含在:
mac 于 2026-11-01 11:29:59 +08:00 提交
1 父节点 cc7f9c952a
当前提交 d64430cd66
5 个文件已更改
+37 -10

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

+1 -1
查看文件
@@ -14,7 +14,7 @@
- [主题与 LUT 库的 FCP 验收](verification/HostThemeLUT.json)
- [早期调色链的 FCP 验收](verification/Host.json)
当前版本为 1.1.3(13),源码标签 `v1.1.3-async-lut-20261101`。所有调色分组统一为展开即启用、折叠即停用;新建实例与全部还原只展开基础调节。折叠保留参数和 LUT 路径,重新展开继续使用;打开已保存的调色时按各组实际启用状态展开。基础调节同时控制其光影、白平衡与颜色子组。
当前版本为 1.1.3(14),源码标签 `v1.1.3-async-lut-20261101`。所有调色分组统一为展开即启用、折叠即停用;新建实例与全部还原只展开基础调节。折叠保留参数和 LUT 路径,重新展开继续使用;打开已保存的调色时按各组实际启用状态展开。基础调节同时控制其光影、白平衡与颜色子组。
程序图标与 FCP 缩略图采用统一的光谱鱼。两张原始生成图及提示词保存在 `design/`;运行 `python3 tools/build_brand_assets.py` 使用 macOS 工具导出 ICNS、640×360 与 240×135 的效果预览。
+16 -1
查看文件
@@ -1,7 +1,11 @@
#!/usr/bin/env python3
"""Create synthetic large LUTs for formal FCP responsiveness acceptance only."""
from pathlib import Path
import hashlib,json
import hashlib,json,argparse,os
parser=argparse.ArgumentParser(description=__doc__)
parser.add_argument('--cancel-pack',action='store_true',help='Also create 192 hard-linked LUTs to allow interactive cancellation during preflight')
args=parser.parse_args()
root=Path('/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/fcp-qa/LUT后台加载验收')
root.mkdir(parents=True,exist_ok=True)
@@ -24,3 +28,14 @@ for i in range(24):
entries.append({'path':str(path),'sha256':hashlib.sha256(path.read_bytes()).hexdigest()})
manifest.write_text(json.dumps({'authoredSyntheticFixture':True,'cubeDimension':65,'files':entries},ensure_ascii=False,indent=2)+'\n')
print(json.dumps({'folder':str(root),'files':len(entries)},ensure_ascii=False))
if args.cancel_pack:
cancel=root.with_name('LUT后台取消验收');cancel.mkdir(exist_ok=True)
if any(cancel.iterdir()) and not (cancel/'manifest.json').exists():
raise RuntimeError('Refusing to replace an unrecognized cancellation fixture')
files=[]
for i in range(192):
source=Path(entries[i%24]['path']);target=cancel/f'取消压力-{i:03d}.cube'
if not target.exists():os.link(source,target)
files.append({'path':str(target),'sourceSHA256':entries[i%24]['sha256']})
(cancel/'manifest.json').write_text(json.dumps({'authoredSyntheticFixture':True,'hardLinkedFiles':files},ensure_ascii=False,indent=2)+'\n')
print(json.dumps({'folder':str(cancel),'files':len(files)},ensure_ascii=False))
+18 -6
查看文件
@@ -390,6 +390,7 @@ static NSImage *DYWheelImage(void) {
NSMutableDictionary *_assetLoads,*_assetLoadIDs;
NSUInteger _nextAssetLoadID;
NSProgress *_menuScan;
NSDictionary *_pendingAssetMenuCommand;
}
@end
@@ -440,7 +441,7 @@ static NSImage *DYWheelImage(void) {
return self;
}
- (void)dealloc {
for(NSProgress *p in _assetLoads.allValues)[p cancel];[_assetLoads release];[_assetLoadIDs release];[_menuScan cancel];[_menuScan release];
for(NSProgress *p in _assetLoads.allValues)[p cancel];[_assetLoads release];[_assetLoadIDs release];[_menuScan cancel];[_menuScan release];[_pendingAssetMenuCommand release];
[[NSNotificationCenter defaultCenter] removeObserver:self];
[_brand release]; [_subtitle release]; [_resetAll release]; [_save release]; [_load release]; [_export release];
[_scroll release]; [_document release]; [_sections release]; [_cards release]; [_controls release]; [_assetButtons release]; [_graphics release]; [_sampler release];
@@ -828,6 +829,7 @@ static NSImage *DYWheelImage(void) {
[self postChanged];
}
- (void)chooseAsset:(NSButton *)sender {
[_pendingAssetMenuCommand release];_pendingAssetMenuCommand=nil;
if(!_menuScan)_menuScan=[[_library reloadAsync:^(NSError *error){[_menuScan release];_menuScan=nil;}]retain];
NSMenu *menu=[[[NSMenu alloc]initWithTitle:@"LUT"]autorelease];
NSMenuItem *none=[menu addItemWithTitle:@"无" action:@selector(assetMenuItem:) keyEquivalent:@""];none.target=self;none.representedObject=@{@"key":sender.identifier,@"path":@"",@"profile":@0};
@@ -841,13 +843,23 @@ static NSImage *DYWheelImage(void) {
}
if(_library.entries.count>100){NSMenuItem *more=[menu addItemWithTitle:@"更多 LUT,请打开缩略图浏览库…" action:@selector(assetMenuBrowse:) keyEquivalent:@""];more.target=self;more.representedObject=sender.identifier;}
[menu popUpMenuPositioningItem:nil atLocation:NSMakePoint(0,sender.bounds.size.height) inView:sender];
// Return from menu tracking and the remote button action before opening a panel.
NSDictionary *command=[_pendingAssetMenuCommand autorelease];_pendingAssetMenuCommand=nil;
if(command)dispatch_async(dispatch_get_main_queue(),^{if(self.window)[self performAssetMenuCommand:command];});
}
- (void)assetMenuBrowse:(NSMenuItem *)item {NSButton *button=_assetButtons[item.representedObject][@"browse"];[self browseAsset:button];}
- (void)assetMenuFile:(NSMenuItem *)item {[self chooseFileForKey:item.representedObject];}
- (void)assetMenuItem:(NSMenuItem *)item {
NSString *key=item.representedObject[@"key"],*path=item.representedObject[@"path"];
- (void)queueAssetMenuCommand:(NSString *)kind payload:(id)payload {
[_pendingAssetMenuCommand release];_pendingAssetMenuCommand=[@{@"kind":kind,@"payload":payload}copy];
}
- (void)assetMenuBrowse:(NSMenuItem *)item {[self queueAssetMenuCommand:@"browse" payload:item.representedObject];}
- (void)assetMenuFile:(NSMenuItem *)item {[self queueAssetMenuCommand:@"file" payload:item.representedObject];}
- (void)assetMenuItem:(NSMenuItem *)item {[self queueAssetMenuCommand:@"item" payload:item.representedObject];}
- (void)performAssetMenuCommand:(NSDictionary *)command {
NSString *kind=command[@"kind"];id payload=command[@"payload"];
if([kind isEqual:@"browse"]){[self browseAsset:_assetButtons[payload][@"browse"]];return;}
if([kind isEqual:@"file"]){[self chooseFileForKey:payload];return;}
NSString *key=payload[@"key"],*path=payload[@"path"];
[self setAssetPath:path forKey:key];
if([key isEqual:@"input"]&&item.representedObject[@"profile"]){id<FxCustomParameterActionAPI_v4> a=[self actionAPI];[a startAction:self];@try{[[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)]setFloatValue:[item.representedObject[@"profile"]doubleValue] toParameter:2013 atTime:a.currentTime];}@finally{[a endAction:self];}[self postChanged];}
if([key isEqual:@"input"]&&payload[@"profile"]){id<FxCustomParameterActionAPI_v4> a=[self actionAPI];[a startAction:self];@try{[[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)]setFloatValue:[payload[@"profile"]doubleValue] toParameter:2013 atTime:a.currentTime];}@finally{[a endAction:self];}[self postChanged];}
}
- (void)chooseFileForKey:(NSString *)key {
NSOpenPanel *panel=[NSOpenPanel openPanel];panel.allowedFileTypes=@[@"cube"];panel.allowsMultipleSelection=NO;
+1 -1
查看文件
@@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>1.1.3</string>
<key>CFBundleVersion</key>
<string>13</string>
<string>14</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>PlugInKit</key>
+1 -1
查看文件
@@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>1.1.3</string>
<key>CFBundleVersion</key>
<string>13</string>
<string>14</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>