diff --git a/大鱼调色/Plugin/DYInspector.mm b/大鱼调色/Plugin/DYInspector.mm index ec8ab1d..569f977 100644 --- a/大鱼调色/Plugin/DYInspector.mm +++ b/大鱼调色/Plugin/DYInspector.mm @@ -855,7 +855,7 @@ static NSImage *DYWheelImage(void) { id maskHost=_embedded?[(DYToolManager*)_manager host]:_manager;NSDictionary *tools=DYReadTools(maskHost,t).document;for(NSDictionary *card in _cards){ NSString *type=card[@"section"][@"key"];BOOL visible=YES; if(!_embedded){DYInspectorToken *token=nil;[get getCustomParameterValue:&token fromParameter:DYInspectorParameterID atTime:t];visible=[@[@"primary",@"base",@"spider",@"hsl"]containsObject:type]||[token.folds[[@"visible:" stringByAppendingString:type]]boolValue]; - if(!visible){for(NSDictionary*d in DYBaseToolDescriptors(type)){double value=[d[@"default"]doubleValue];[get getFloatValue:&value fromParameter:[d[@"pid"]unsignedIntValue]atTime:t];if(std::isfinite(value)&&fabs(value-[d[@"default"]doubleValue])>1e-6){visible=YES;break;}}if([tools[@"baseMasks"][type]count])visible=YES;if([type isEqual:@"look"]&&DYReadAssets(_manager,t).paths.count)visible=YES;} + if(!visible){for(NSDictionary*d in DYBaseToolDescriptors(type)){double value=[d[@"default"]doubleValue];[get getFloatValue:&value fromParameter:[d[@"pid"]unsignedIntValue]atTime:t];if(std::isfinite(value)&&fabs(value-[d[@"default"]doubleValue])>1e-6){visible=YES;break;}}if([tools[@"baseMasks"][type]count])visible=YES;if([type isEqual:@"look"])for(NSString *assetKey in DYReadAssets(_manager,t).paths)if([assetKey hasPrefix:@"look"])visible=YES;} } BOOL removed=!_embedded&&(DYBaseToolRemoved(tools,type)||!visible);groupingChanged|=[card[@"removed"]boolValue]!=removed;((NSMutableDictionary *)card)[@"removed"]=@(removed); [card[@"maskPanel"]refreshWithDocument:tools time:t]; @@ -1024,7 +1024,7 @@ static NSImage *DYWheelImage(void) { NSError *failure=nil;if(!DYResetToolParameters(_manager,DYDescriptors(),t,&failure)){dispatch_async(dispatch_get_main_queue(),^{[self showError:failure.localizedDescription?:@"未能完整还原参数。"];});return;} DYAssetState *assets=[[[DYAssetState alloc] init] autorelease];assets.paths=@{};DYWriteAssets(_manager,assets,t);DYWriteTools(_manager,[[[DYToolDocument alloc]init]autorelease].document,t); [set setCustomParameterValue:[[[DYInspectorToken alloc]init]autorelease] toParameter:DYInspectorParameterID atTime:t]; - for(NSMutableDictionary *card in _cards)card[@"collapsed"]=@(![@[@"primary",@"spider",@"base"]containsObject:card[@"section"][@"key"]]); + for(NSMutableDictionary *card in _cards)card[@"collapsed"]=@YES; } @finally {if(grouped)[undo endUndoGroup];[action endAction:self];} [self postChanged]; }