WIP: unify project, product and plugin class spelling; migration pending

这个提交包含在:
dayu 于 2026-10-22 18:30:09 +08:00 提交
1 父节点 d1137edd83
当前提交 47f6e55ecd
40 个文件已更改
+138 -116

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

@@ -8,7 +8,7 @@
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
6945FC8F3088B7220013E108 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6945FC8E3088B7220013E108 /* Cocoa.framework */; }; 6945FC8F3088B7220013E108 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6945FC8E3088B7220013E108 /* Cocoa.framework */; };
6945FC973088B7220013E108 /* beatygril XPC Service.pluginkit in Embed PlugIns */ = {isa = PBXBuildFile; fileRef = 6945FC963088B7220013E108 /* beatygril XPC Service.pluginkit */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 6945FC973088B7220013E108 /* FCP-BeautyGirl XPC Service.pluginkit in Embed PlugIns */ = {isa = PBXBuildFile; fileRef = 6945FC963088B7220013E108 /* FCP-BeautyGirl XPC Service.pluginkit */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
6945FC9B3088B7220013E108 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6945FC9A3088B7220013E108 /* Foundation.framework */; }; 6945FC9B3088B7220013E108 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6945FC9A3088B7220013E108 /* Foundation.framework */; };
6945FC9D3088B7220013E108 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6945FC9C3088B7220013E108 /* AppKit.framework */; }; 6945FC9D3088B7220013E108 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6945FC9C3088B7220013E108 /* AppKit.framework */; };
6945FC9F3088B7220013E108 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6945FC9E3088B7220013E108 /* Accelerate.framework */; }; 6945FC9F3088B7220013E108 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6945FC9E3088B7220013E108 /* Accelerate.framework */; };
@@ -39,16 +39,16 @@
dstPath = ""; dstPath = "";
dstSubfolder = PlugIns; dstSubfolder = PlugIns;
files = ( files = (
6945FC973088B7220013E108 /* beatygril XPC Service.pluginkit in Embed PlugIns */, 6945FC973088B7220013E108 /* FCP-BeautyGirl XPC Service.pluginkit in Embed PlugIns */,
); );
name = "Embed PlugIns"; name = "Embed PlugIns";
}; };
/* End PBXCopyFilesBuildPhase section */ /* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
6945FC8B3088B7220013E108 /* beatygril.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = beatygril.app; sourceTree = BUILT_PRODUCTS_DIR; }; 6945FC8B3088B7220013E108 /* FCP-BeautyGirl.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FCP-BeautyGirl.app; sourceTree = BUILT_PRODUCTS_DIR; };
6945FC8E3088B7220013E108 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 6945FC8E3088B7220013E108 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
6945FC963088B7220013E108 /* beatygril XPC Service.pluginkit */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "beatygril XPC Service.pluginkit"; sourceTree = BUILT_PRODUCTS_DIR; }; 6945FC963088B7220013E108 /* FCP-BeautyGirl XPC Service.pluginkit */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "FCP-BeautyGirl XPC Service.pluginkit"; sourceTree = BUILT_PRODUCTS_DIR; };
6945FC9A3088B7220013E108 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 6945FC9A3088B7220013E108 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
6945FC9C3088B7220013E108 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 6945FC9C3088B7220013E108 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
6945FC9E3088B7220013E108 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; 6945FC9E3088B7220013E108 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; };
@@ -57,12 +57,12 @@
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ /* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
6945FCCB3088B7220013E108 /* Exceptions for "beatygril" folder in "Wrapper Application" target */ = { 6945FCCB3088B7220013E108 /* Exceptions for "FCP-BeautyGirl" folder in "Wrapper Application" target */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet; isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = ( membershipExceptions = (
"/Localized: Plugin/InfoPlist.strings", "/Localized: Plugin/InfoPlist.strings",
"/Localized: Plugin/Localizable.strings", "/Localized: Plugin/Localizable.strings",
Plugin/beatygrilPlugIn.m, Plugin/FCPBeautyGirlPlugIn.m,
Plugin/Info.plist, Plugin/Info.plist,
Plugin/main.m, Plugin/main.m,
Plugin/PGBeautyRenderer.m, Plugin/PGBeautyRenderer.m,
@@ -74,7 +74,7 @@
); );
target = 6945FC8A3088B7220013E108 /* Wrapper Application */; target = 6945FC8A3088B7220013E108 /* Wrapper Application */;
}; };
6945FCD33088B7220013E108 /* Exceptions for "beatygril" folder in "XPC Service" target */ = { 6945FCD33088B7220013E108 /* Exceptions for "FCP-BeautyGirl" folder in "XPC Service" target */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet; isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = ( membershipExceptions = (
"/Localized: Wrapper Application/Credits.rtf", "/Localized: Wrapper Application/Credits.rtf",
@@ -91,13 +91,13 @@
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ /* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
/* Begin PBXFileSystemSynchronizedRootGroup section */ /* Begin PBXFileSystemSynchronizedRootGroup section */
6945FCA63088B7220013E108 /* beatygril */ = { 6945FCA63088B7220013E108 /* FCP-BeautyGirl */ = {
isa = PBXFileSystemSynchronizedRootGroup; isa = PBXFileSystemSynchronizedRootGroup;
exceptions = ( exceptions = (
6945FCCB3088B7220013E108 /* Exceptions for "beatygril" folder in "Wrapper Application" target */, 6945FCCB3088B7220013E108 /* Exceptions for "FCP-BeautyGirl" folder in "Wrapper Application" target */,
6945FCD33088B7220013E108 /* Exceptions for "beatygril" folder in "XPC Service" target */, 6945FCD33088B7220013E108 /* Exceptions for "FCP-BeautyGirl" folder in "XPC Service" target */,
); );
path = beatygril; path = FCP-BeautyGirl;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
/* End PBXFileSystemSynchronizedRootGroup section */ /* End PBXFileSystemSynchronizedRootGroup section */
@@ -125,7 +125,7 @@
6945FC823088B7220013E108 = { 6945FC823088B7220013E108 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
6945FCA63088B7220013E108 /* beatygril */, 6945FCA63088B7220013E108 /* FCP-BeautyGirl */,
6945FC8D3088B7220013E108 /* Frameworks */, 6945FC8D3088B7220013E108 /* Frameworks */,
6945FC8C3088B7220013E108 /* Products */, 6945FC8C3088B7220013E108 /* Products */,
); );
@@ -134,8 +134,8 @@
6945FC8C3088B7220013E108 /* Products */ = { 6945FC8C3088B7220013E108 /* Products */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
6945FC8B3088B7220013E108 /* beatygril.app */, 6945FC8B3088B7220013E108 /* FCP-BeautyGirl.app */,
6945FC963088B7220013E108 /* beatygril XPC Service.pluginkit */, 6945FC963088B7220013E108 /* FCP-BeautyGirl XPC Service.pluginkit */,
); );
name = Products; name = Products;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -172,11 +172,11 @@
6945FCA53088B7220013E108 /* PBXTargetDependency */, 6945FCA53088B7220013E108 /* PBXTargetDependency */,
); );
fileSystemSynchronizedGroups = ( fileSystemSynchronizedGroups = (
6945FCA63088B7220013E108 /* beatygril */, 6945FCA63088B7220013E108 /* FCP-BeautyGirl */,
); );
name = "Wrapper Application"; name = "Wrapper Application";
productName = "Wrapper Application"; productName = "Wrapper Application";
productReference = 6945FC8B3088B7220013E108 /* beatygril.app */; productReference = 6945FC8B3088B7220013E108 /* FCP-BeautyGirl.app */;
productType = "com.apple.product-type.application"; productType = "com.apple.product-type.application";
}; };
6945FC953088B7220013E108 /* XPC Service */ = { 6945FC953088B7220013E108 /* XPC Service */ = {
@@ -192,11 +192,11 @@
buildRules = ( buildRules = (
); );
fileSystemSynchronizedGroups = ( fileSystemSynchronizedGroups = (
6945FCA63088B7220013E108 /* beatygril */, 6945FCA63088B7220013E108 /* FCP-BeautyGirl */,
); );
name = "XPC Service"; name = "XPC Service";
productName = "XPC Service"; productName = "XPC Service";
productReference = 6945FC963088B7220013E108 /* beatygril XPC Service.pluginkit */; productReference = 6945FC963088B7220013E108 /* FCP-BeautyGirl XPC Service.pluginkit */;
productType = "com.apple.product-type.bundle"; productType = "com.apple.product-type.bundle";
}; };
/* End PBXNativeTarget section */ /* End PBXNativeTarget section */
@@ -216,7 +216,7 @@
}; };
}; };
}; };
buildConfigurationList = 6945FC863088B7220013E108 /* Build configuration list for PBXProject "beatygril" */; buildConfigurationList = 6945FC863088B7220013E108 /* Build configuration list for PBXProject "FCP-BeautyGirl" */;
developmentRegion = en; developmentRegion = en;
hasScannedForEncodings = 0; hasScannedForEncodings = 0;
knownRegions = ( knownRegions = (
@@ -316,15 +316,15 @@
ENABLE_HARDENED_RUNTIME = YES; ENABLE_HARDENED_RUNTIME = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
INFOPLIST_FILE = beatygril/Plugin/Info.plist; INFOPLIST_FILE = FCP-BeautyGirl/Plugin/Info.plist;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@loader_path/../Frameworks", "@loader_path/../Frameworks",
); );
MACH_O_TYPE = mh_execute; MACH_O_TYPE = mh_execute;
PRODUCT_BUNDLE_IDENTIFIER = com.dayu.beatygril.fxplug; PRODUCT_BUNDLE_IDENTIFIER = com.dayu.fcpbeautygirl.fxplug;
PRODUCT_NAME = "beatygril $(TARGET_NAME)"; PRODUCT_NAME = "FCP-BeautyGirl $(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "beatygril/Plugin/XPC Service-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "FCP-BeautyGirl/Plugin/XPC Service-Bridging-Header.h";
WRAPPER_EXTENSION = pluginkit; WRAPPER_EXTENSION = pluginkit;
}; };
name = Debug; name = Debug;
@@ -339,15 +339,15 @@
ENABLE_HARDENED_RUNTIME = YES; ENABLE_HARDENED_RUNTIME = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
INFOPLIST_FILE = beatygril/Plugin/Info.plist; INFOPLIST_FILE = FCP-BeautyGirl/Plugin/Info.plist;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@loader_path/../Frameworks", "@loader_path/../Frameworks",
); );
MACH_O_TYPE = mh_execute; MACH_O_TYPE = mh_execute;
PRODUCT_BUNDLE_IDENTIFIER = com.dayu.beatygril.fxplug; PRODUCT_BUNDLE_IDENTIFIER = com.dayu.fcpbeautygirl.fxplug;
PRODUCT_NAME = "beatygril $(TARGET_NAME)"; PRODUCT_NAME = "FCP-BeautyGirl $(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "beatygril/Plugin/XPC Service-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "FCP-BeautyGirl/Plugin/XPC Service-Bridging-Header.h";
WRAPPER_EXTENSION = pluginkit; WRAPPER_EXTENSION = pluginkit;
}; };
name = Release; name = Release;
@@ -355,7 +355,7 @@
6945FCD13088B7220013E108 /* Debug configuration for PBXNativeTarget "Wrapper Application" */ = { 6945FCD13088B7220013E108 /* Debug configuration for PBXNativeTarget "Wrapper Application" */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
CODE_SIGN_ENTITLEMENTS = "beatygril/Wrapper Application/SandboxEntitlements.entitlements"; CODE_SIGN_ENTITLEMENTS = "FCP-BeautyGirl/Wrapper Application/SandboxEntitlements.entitlements";
OTHER_LDFLAGS = ("$(inherited)", "-framework", CoreServices, ); OTHER_LDFLAGS = ("$(inherited)", "-framework", CoreServices, );
CODE_SIGN_IDENTITY = "Developer ID Application"; CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
@@ -363,17 +363,17 @@
DEVELOPMENT_TEAM = B3W25FX5H5; DEVELOPMENT_TEAM = B3W25FX5H5;
ENABLE_HARDENED_RUNTIME = YES; ENABLE_HARDENED_RUNTIME = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
INFOPLIST_FILE = "beatygril/Wrapper Application/Info.plist"; INFOPLIST_FILE = "FCP-BeautyGirl/Wrapper Application/Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = com.dayu.beatygril; PRODUCT_BUNDLE_IDENTIFIER = com.dayu.fcpbeautygirl;
PRODUCT_NAME = beatygril; PRODUCT_NAME = FCP-BeautyGirl;
SWIFT_OBJC_BRIDGING_HEADER = "beatygril/Wrapper Application/Wrapper Application-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "FCP-BeautyGirl/Wrapper Application/Wrapper Application-Bridging-Header.h";
}; };
name = Debug; name = Debug;
}; };
6945FCD23088B7220013E108 /* Release configuration for PBXNativeTarget "Wrapper Application" */ = { 6945FCD23088B7220013E108 /* Release configuration for PBXNativeTarget "Wrapper Application" */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
CODE_SIGN_ENTITLEMENTS = "beatygril/Wrapper Application/SandboxEntitlements.entitlements"; CODE_SIGN_ENTITLEMENTS = "FCP-BeautyGirl/Wrapper Application/SandboxEntitlements.entitlements";
OTHER_LDFLAGS = ("$(inherited)", "-framework", CoreServices, ); OTHER_LDFLAGS = ("$(inherited)", "-framework", CoreServices, );
CODE_SIGN_IDENTITY = "Developer ID Application"; CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
@@ -381,14 +381,14 @@
DEVELOPMENT_TEAM = B3W25FX5H5; DEVELOPMENT_TEAM = B3W25FX5H5;
ENABLE_HARDENED_RUNTIME = YES; ENABLE_HARDENED_RUNTIME = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
INFOPLIST_FILE = "beatygril/Wrapper Application/Info.plist"; INFOPLIST_FILE = "FCP-BeautyGirl/Wrapper Application/Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = com.dayu.beatygril; PRODUCT_BUNDLE_IDENTIFIER = com.dayu.fcpbeautygirl;
PRODUCT_NAME = beatygril; PRODUCT_NAME = FCP-BeautyGirl;
SWIFT_OBJC_BRIDGING_HEADER = "beatygril/Wrapper Application/Wrapper Application-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "FCP-BeautyGirl/Wrapper Application/Wrapper Application-Bridging-Header.h";
}; };
name = Release; name = Release;
}; };
6945FCD43088B7220013E108 /* Debug configuration for PBXProject "beatygril" */ = { 6945FCD43088B7220013E108 /* Debug configuration for PBXProject "FCP-BeautyGirl" */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ADDITIONAL_SDKS = /Library/Developer/SDKs/FxPlug.sdk; ADDITIONAL_SDKS = /Library/Developer/SDKs/FxPlug.sdk;
@@ -461,7 +461,7 @@
}; };
name = Debug; name = Debug;
}; };
6945FCD53088B7220013E108 /* Release configuration for PBXProject "beatygril" */ = { 6945FCD53088B7220013E108 /* Release configuration for PBXProject "FCP-BeautyGirl" */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ADDITIONAL_SDKS = /Library/Developer/SDKs/FxPlug.sdk; ADDITIONAL_SDKS = /Library/Developer/SDKs/FxPlug.sdk;
@@ -531,11 +531,11 @@
/* End XCBuildConfiguration section */ /* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */ /* Begin XCConfigurationList section */
6945FC863088B7220013E108 /* Build configuration list for PBXProject "beatygril" */ = { 6945FC863088B7220013E108 /* Build configuration list for PBXProject "FCP-BeautyGirl" */ = {
isa = XCConfigurationList; isa = XCConfigurationList;
buildConfigurations = ( buildConfigurations = (
6945FCD43088B7220013E108 /* Debug configuration for PBXProject "beatygril" */, 6945FCD43088B7220013E108 /* Debug configuration for PBXProject "FCP-BeautyGirl" */,
6945FCD53088B7220013E108 /* Release configuration for PBXProject "beatygril" */, 6945FCD53088B7220013E108 /* Release configuration for PBXProject "FCP-BeautyGirl" */,
); );
defaultConfigurationName = Release; defaultConfigurationName = Release;
}; };
@@ -2,7 +2,7 @@
#import <FxPlug/FxPlugSDK.h> #import <FxPlug/FxPlugSDK.h>
#import "PGBeautyTypes.h" #import "PGBeautyTypes.h"
@interface beatygrilPlugIn : NSObject <FxTileableEffect, FxAnalyzer, FxCustomParameterViewHost_v2> @interface FCPBeautyGirlPlugIn : NSObject <FxTileableEffect, FxAnalyzer, FxCustomParameterViewHost_v2>
@property (nonatomic, assign) id<PROAPIAccessing> apiManager; @property (nonatomic, assign) id<PROAPIAccessing> apiManager;
- (PGBeautySettings)settingsAtTime:(CMTime)time; - (PGBeautySettings)settingsAtTime:(CMTime)time;
- (void)analyzeForward; - (void)analyzeForward;
@@ -1,4 +1,4 @@
#import "beatygrilPlugIn.h" #import "FCPBeautyGirlPlugIn.h"
#import "PGParameterIDs.h" #import "PGParameterIDs.h"
#import "PGBeautyRenderer.h" #import "PGBeautyRenderer.h"
#import "PGFaceProcessor.h" #import "PGFaceProcessor.h"
@@ -12,7 +12,7 @@
static os_log_t PGRenderLog(void) { static os_log_t PGRenderLog(void) {
static os_log_t log; static dispatch_once_t once; static os_log_t log; static dispatch_once_t once;
dispatch_once(&once, ^{ log=os_log_create("com.dayu.beatygril", "render"); }); dispatch_once(&once, ^{ log=os_log_create("com.dayu.fcpbeautygirl", "render"); });
return log; return log;
} }
@@ -84,7 +84,7 @@ static CIImage *PGImageFromTile(FxImageTile *tile) {
return [image imageByApplyingTransform:CGAffineTransformMakeTranslation(b.left,b.bottom)]; return [image imageByApplyingTransform:CGAffineTransformMakeTranslation(b.left,b.bottom)];
} }
@interface beatygrilPlugIn () @interface FCPBeautyGirlPlugIn ()
@property (strong) PGBeautyRenderer *beautyRenderer; @property (strong) PGBeautyRenderer *beautyRenderer;
@property (strong) PGFaceProcessor *faceProcessor; @property (strong) PGFaceProcessor *faceProcessor;
@property (strong) PGFaceProcessor *analysisFaceProcessor; @property (strong) PGFaceProcessor *analysisFaceProcessor;
@@ -99,7 +99,7 @@ static CIImage *PGImageFromTile(FxImageTile *tile) {
@property (strong) NSHashTable<PGInspectorView *> *inspectorViews; @property (strong) NSHashTable<PGInspectorView *> *inspectorViews;
@end @end
@implementation beatygrilPlugIn @implementation FCPBeautyGirlPlugIn
- (instancetype)initWithAPIManager:(id<PROAPIAccessing>)manager { - (instancetype)initWithAPIManager:(id<PROAPIAccessing>)manager {
if ((self=[super init])) { if ((self=[super init])) {
_apiManager=manager; _apiManager=manager;
@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>XPC!</string> <string>XPC!</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.3.1</string> <string>1.3.2</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>16</string> <string>17</string>
<key>NSHumanReadableCopyright</key> <key>NSHumanReadableCopyright</key>
<string></string> <string></string>
<key>PlugInKit</key> <key>PlugInKit</key>
@@ -57,7 +57,7 @@
<array> <array>
<dict> <dict>
<key>className</key> <key>className</key>
<string>beatygrilPlugIn</string> <string>FCPBeautyGirlPlugIn</string>
<key>displayName</key> <key>displayName</key>
<string>大鱼人像美化</string> <string>大鱼人像美化</string>
<key>group</key> <key>group</key>
@@ -72,7 +72,7 @@
<key>uuid</key> <key>uuid</key>
<string>FB14B0E6-59B2-4836-916F-CD0C559E9241</string> <string>FB14B0E6-59B2-4836-916F-CD0C559E9241</string>
<key>version</key> <key>version</key>
<string>1.3.1</string> <string>1.3.2</string>
</dict> </dict>
<dict> <dict>
<key>className</key> <key>className</key>
@@ -84,7 +84,7 @@
<key>uuid</key> <key>uuid</key>
<string>E0E432C8-3D71-4ABA-B006-E7F519E06C87</string> <string>E0E432C8-3D71-4ABA-B006-E7F519E06C87</string>
<key>version</key> <key>version</key>
<string>1.3.1</string> <string>1.3.2</string>
<key>protocolNames</key> <key>protocolNames</key>
<array> <array>
<string>FxOnScreenControl</string> <string>FxOnScreenControl</string>
@@ -5,7 +5,7 @@
#include <math.h> #include <math.h>
#include <float.h> #include <float.h>
static NSString * const PGFaceErrorDomain = @"media.dayu.PaintFCP.Face"; static NSString * const PGFaceErrorDomain = @"com.dayu.fcpbeautygirl.face";
// Contour origin / internal anchor, in the reference's recovered pin order. // Contour origin / internal anchor, in the reference's recovered pin order.
// The unused middle entry of each reference triplet is intentionally omitted. // The unused middle entry of each reference triplet is intentionally omitted.
static const uint8_t PGThinPins[17][2] = { static const uint8_t PGThinPins[17][2] = {
@@ -0,0 +1 @@
"FCP-BeautyGirl::FxPlug Name" = "大鱼人像美化";
@@ -0,0 +1 @@
"FCP-BeautyGirl::FxPlug Description" = "Portrait smoothing, skin tone, face shaping and automatic face tracking.";
文件已重命名,内容未更改。
@@ -1,6 +1,6 @@
// //
// AppDelegate.h // AppDelegate.h
// beatygril // FCP-BeautyGirl
// //
// Created by dayu on 2026/10/21. // Created by dayu on 2026/10/21.
// //
@@ -8,7 +8,7 @@
@implementation AppDelegate @implementation AppDelegate
- (void)applicationDidFinishLaunching:(NSNotification *)notification { - (void)applicationDidFinishLaunching:(NSNotification *)notification {
self.window.title = @"大鱼人像美化 · 免费开源"; self.window.title = @"FCP-BeautyGirl · 大鱼人像美化";
[self.window setContentSize:NSMakeSize(800, 450)]; [self.window setContentSize:NSMakeSize(800, 450)];
self.window.styleMask &= ~NSWindowStyleMaskResizable; self.window.styleMask &= ~NSWindowStyleMaskResizable;
self.window.backgroundColor = [NSColor colorWithRed:0.94 green:0.92 blue:0.85 alpha:1]; self.window.backgroundColor = [NSColor colorWithRed:0.94 green:0.92 blue:0.85 alpha:1];
@@ -20,11 +20,11 @@
<customObject id="YLy-65-1bz" customClass="NSFontManager"/> <customObject id="YLy-65-1bz" customClass="NSFontManager"/>
<menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6"> <menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
<items> <items>
<menuItem title="beatygril" id="1Xt-HY-uBw"> <menuItem title="FCP-BeautyGirl" id="1Xt-HY-uBw">
<modifierMask key="keyEquivalentModifierMask"/> <modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="beatygril" systemMenu="apple" id="uQy-DD-JDr"> <menu key="submenu" title="FCP-BeautyGirl" systemMenu="apple" id="uQy-DD-JDr">
<items> <items>
<menuItem title="About beatygril" id="5kV-Vb-QxS"> <menuItem title="About FCP-BeautyGirl" id="5kV-Vb-QxS">
<modifierMask key="keyEquivalentModifierMask"/> <modifierMask key="keyEquivalentModifierMask"/>
<connections> <connections>
<action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/> <action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/>
@@ -38,7 +38,7 @@
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/> <menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
</menuItem> </menuItem>
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/> <menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
<menuItem title="Hide beatygril" keyEquivalent="h" id="Olw-nP-bQN"> <menuItem title="Hide FCP-BeautyGirl" keyEquivalent="h" id="Olw-nP-bQN">
<connections> <connections>
<action selector="hide:" target="-1" id="PnN-Uc-m68"/> <action selector="hide:" target="-1" id="PnN-Uc-m68"/>
</connections> </connections>
@@ -56,7 +56,7 @@
</connections> </connections>
</menuItem> </menuItem>
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/> <menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
<menuItem title="Quit beatygril" keyEquivalent="q" id="4sb-4s-VLi"> <menuItem title="Quit FCP-BeautyGirl" keyEquivalent="q" id="4sb-4s-VLi">
<connections> <connections>
<action selector="terminate:" target="-1" id="Te7-pn-YzF"/> <action selector="terminate:" target="-1" id="Te7-pn-YzF"/>
</connections> </connections>
@@ -669,7 +669,7 @@
<modifierMask key="keyEquivalentModifierMask"/> <modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ"> <menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
<items> <items>
<menuItem title="beatygril Help" keyEquivalent="?" id="FKE-Sm-Kum"> <menuItem title="FCP-BeautyGirl Help" keyEquivalent="?" id="FKE-Sm-Kum">
<connections> <connections>
<action selector="showHelp:" target="-1" id="y7X-2Q-9no"/> <action selector="showHelp:" target="-1" id="y7X-2Q-9no"/>
</connections> </connections>
@@ -679,7 +679,7 @@
</menuItem> </menuItem>
</items> </items>
</menu> </menu>
<window title="beatygril" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g"> <window title="FCP-BeautyGirl" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/> <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/> <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="335" y="390" width="480" height="360"/> <rect key="contentRect" x="335" y="390" width="480" height="360"/>
@@ -4,6 +4,8 @@
<dict> <dict>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string> <string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>FCP-BeautyGirl · 大鱼人像美化</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string> <string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIconFile</key> <key>CFBundleIconFile</key>
@@ -17,9 +19,9 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.3.1</string> <string>1.3.2</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>16</string> <string>17</string>
<key>LSMinimumSystemVersion</key> <key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string> <string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key> <key>NSHumanReadableCopyright</key>
@@ -1,3 +0,0 @@
/* Localized versions of Info.plist keys */
"beatygril::FxPlug Name" = "beatygril";
@@ -1,4 +0,0 @@
/* Localized versions of Info.plist keys */
"beatygril::FxPlug Description" = "A helpful description of\nwhat this plugin does.";
+25
查看文件
@@ -0,0 +1,25 @@
{
"name": "FCP-BeautyGirl",
"version": "1.3.2",
"build": "17",
"bundleIdentifier": "com.dayu.fcpbeautygirl",
"pluginName": "FCP-BeautyGirl XPC Service.pluginkit",
"pluginBundleIdentifier": "com.dayu.fcpbeautygirl.fxplug",
"pluginClass": "FCPBeautyGirlPlugIn",
"sourceRoot": "FCP-BeautyGirl",
"sourceDirectory": "FCP-BeautyGirl/FCP-BeautyGirl",
"xcodeProject": "FCP-BeautyGirl/FCP-BeautyGirl.xcodeproj",
"scheme": "Wrapper Application",
"installationPath": "/Library/Plug-Ins/FxPlug/FCP-BeautyGirl.app",
"filterUUID": "FB14B0E6-59B2-4836-916F-CD0C559E9241",
"teamIdentifier": "B3W25FX5H5",
"legacyProducts": [
{
"name": "beatygril",
"bundleIdentifier": "com.dayu.beatygril",
"pluginName": "beatygril XPC Service.pluginkit",
"pluginBundleIdentifier": "com.dayu.beatygril.fxplug",
"installationPath": "/Library/Plug-Ins/FxPlug/beatygril.app"
}
]
}
+10 -10
查看文件
@@ -9,7 +9,7 @@ parser.add_argument('--wait-for-hosts',action='store_true',help='After notarizat
parser.add_argument('--user-tests',action='store_true',help='After non-UI installed-app verification, record native effect QA as pending user testing and clean known generated copies without the interactive validation prompt.') parser.add_argument('--user-tests',action='store_true',help='After non-UI installed-app verification, record native effect QA as pending user testing and clean known generated copies without the interactive validation prompt.')
parser.add_argument('--resume-prepared',action='store_true',help='Resume an already Accepted and stapled staged app after checking its recorded signature, version and unchanged product source.') parser.add_argument('--resume-prepared',action='store_true',help='Resume an already Accepted and stapled staged app after checking its recorded signature, version and unchanged product source.')
args=parser.parse_args() args=parser.parse_args()
bundle_id='com.dayu.beatygril' bundle_id='com.dayu.fcpbeautygirl'
lock=pathlib.Path('/Users/dayu/.codex/app-delivery-locks')/(bundle_id+'.lock') lock=pathlib.Path('/Users/dayu/.codex/app-delivery-locks')/(bundle_id+'.lock')
lock.parent.mkdir(parents=True,exist_ok=True) lock.parent.mkdir(parents=True,exist_ok=True)
try:lock.mkdir() try:lock.mkdir()
@@ -17,12 +17,12 @@ except FileExistsError:raise SystemExit('Delivery lock occupied; inspect owner.j
(lock/'owner.json').write_text(json.dumps({'pid':os.getpid(),'cwd':str(root),'bundle_id':bundle_id})) (lock/'owner.json').write_text(json.dumps({'pid':os.getpid(),'cwd':str(root),'bundle_id':bundle_id}))
staging=pathlib.Path('/tmp/paintfcp-build-20261021') staging=pathlib.Path('/tmp/paintfcp-build-20261021')
logs=root/'build'/'delivery';logs.mkdir(parents=True,exist_ok=True) logs=root/'build'/'delivery';logs.mkdir(parents=True,exist_ok=True)
app=staging/'Build/Products/Release/beatygril.app' app=staging/'Build/Products/Release/FCP-BeautyGirl.app'
installed=pathlib.Path('/Library/Plug-Ins/FxPlug/beatygril.app') installed=pathlib.Path('/Library/Plug-Ins/FxPlug/FCP-BeautyGirl.app')
archive=logs/'notarization.zip' archive=logs/'notarization.zip'
identity='Developer ID Application: zhong luo (B3W25FX5H5)' identity='Developer ID Application: zhong luo (B3W25FX5H5)'
keychain='/Users/dayu/Library/Keychains/login.keychain-db' keychain='/Users/dayu/Library/Keychains/login.keychain-db'
previous=logs/'previous-beatygril.app' previous=logs/'previous-FCP-BeautyGirl.app'
receipt_path=logs/'delivery-receipt.json' receipt_path=logs/'delivery-receipt.json'
receipt={'status':'preparing','bundleIdentifier':bundle_id,'installationPath':str(installed), receipt={'status':'preparing','bundleIdentifier':bundle_id,'installationPath':str(installed),
'options':{'waitForHosts':args.wait_for_hosts,'userTests':args.user_tests}, 'options':{'waitForHosts':args.wait_for_hosts,'userTests':args.user_tests},
@@ -80,7 +80,7 @@ def cleanup_known_products():
try: try:
delivery_source={'commit':run(['git','rev-parse','HEAD']).strip(), delivery_source={'commit':run(['git','rev-parse','HEAD']).strip(),
'trackedWorktreeChanges':run(['git','status','--porcelain','--untracked-files=no']).splitlines()} 'trackedWorktreeChanges':run(['git','status','--porcelain','--untracked-files=no']).splitlines()}
plugin=app/'Contents/PlugIns/beatygril XPC Service.pluginkit' plugin=app/'Contents/PlugIns/FCP-BeautyGirl XPC Service.pluginkit'
if args.resume_prepared: if args.resume_prepared:
old_receipt=json.loads(receipt_path.read_text()) old_receipt=json.loads(receipt_path.read_text())
result=old_receipt.get('notarization',{}) result=old_receipt.get('notarization',{})
@@ -94,7 +94,7 @@ try:
if not expected or not actual or expected.group(1)!=actual.group(1):raise RuntimeError('Prepared signature hash changed') if not expected or not actual or expected.group(1)!=actual.group(1):raise RuntimeError('Prepared signature hash changed')
if info.get('CFBundleShortVersionString')!=old_receipt.get('version') or info.get('CFBundleVersion')!=old_receipt.get('build'):raise RuntimeError('Prepared version changed') if info.get('CFBundleShortVersionString')!=old_receipt.get('version') or info.get('CFBundleVersion')!=old_receipt.get('build'):raise RuntimeError('Prepared version changed')
source_commit=old_receipt.get('source',{}).get('commit') source_commit=old_receipt.get('source',{}).get('commit')
if not source_commit or run(['git','diff',source_commit,'--','beatygril']).strip():raise RuntimeError('Product source changed since prepared build') if not source_commit or run(['git','diff',source_commit,'--','FCP-BeautyGirl']).strip():raise RuntimeError('Product source changed since prepared build')
receipt.update(old_receipt);receipt.pop('failure',None) receipt.update(old_receipt);receipt.pop('failure',None)
receipt['resumedBy']=delivery_source receipt['resumedBy']=delivery_source
receipt['options']={'waitForHosts':args.wait_for_hosts,'userTests':args.user_tests,'resumePrepared':True} receipt['options']={'waitForHosts':args.wait_for_hosts,'userTests':args.user_tests,'resumePrepared':True}
@@ -107,14 +107,14 @@ try:
identities=run(['security','find-identity','-v','-p','codesigning',keychain]) identities=run(['security','find-identity','-v','-p','codesigning',keychain])
if identity not in identities:raise RuntimeError('Valid Developer ID Application identity is unavailable') if identity not in identities:raise RuntimeError('Valid Developer ID Application identity is unavailable')
print('Building universal Release…',flush=True) print('Building universal Release…',flush=True)
run(['xcodebuild','-project','beatygril/beatygril.xcodeproj','-scheme','Wrapper Application','-configuration','Release','-derivedDataPath',str(staging),'-destination','generic/platform=macOS','build'],logs/'build.log') run(['xcodebuild','-project','FCP-BeautyGirl/FCP-BeautyGirl.xcodeproj','-scheme','Wrapper Application','-configuration','Release','-derivedDataPath',str(staging),'-destination','generic/platform=macOS','build'],logs/'build.log')
# Xcode can register a fresh build. Remove this known generated path before # Xcode can register a fresh build. Remove this known generated path before
# lengthy signing/notarization while a user may still be testing the old app. # lengthy signing/notarization while a user may still be testing the old app.
unregister_generated_plugin(plugin) unregister_generated_plugin(plugin)
for framework in sorted((plugin/'Contents/Frameworks').glob('*.framework')): for framework in sorted((plugin/'Contents/Frameworks').glob('*.framework')):
run(['codesign','--force','--timestamp','--options','runtime','--sign',identity,str(framework)]) run(['codesign','--force','--timestamp','--options','runtime','--sign',identity,str(framework)])
run(['codesign','--force','--timestamp','--options','runtime','--sign',identity,str(plugin)]) run(['codesign','--force','--timestamp','--options','runtime','--sign',identity,str(plugin)])
run(['codesign','--force','--timestamp','--options','runtime','--entitlements',str(root/'beatygril/beatygril/Wrapper Application/SandboxEntitlements.entitlements'),'--sign',identity,str(app)]) run(['codesign','--force','--timestamp','--options','runtime','--entitlements',str(root/'FCP-BeautyGirl/FCP-BeautyGirl/Wrapper Application/SandboxEntitlements.entitlements'),'--sign',identity,str(app)])
run(['codesign','--verify','--deep','--strict',str(app)]) run(['codesign','--verify','--deep','--strict',str(app)])
info=require_product(app) info=require_product(app)
receipt['version']=info.get('CFBundleShortVersionString');receipt['build']=info.get('CFBundleVersion') receipt['version']=info.get('CFBundleShortVersionString');receipt['build']=info.get('CFBundleVersion')
@@ -156,11 +156,11 @@ try:
signature=subprocess.run(['codesign','-dvvv',str(installed)],capture_output=True,text=True,check=True).stderr signature=subprocess.run(['codesign','-dvvv',str(installed)],capture_output=True,text=True,check=True).stderr
if info.get('CFBundleIdentifier')!=bundle_id or 'TeamIdentifier=B3W25FX5H5' not in signature:raise RuntimeError('Installed app identity mismatch') if info.get('CFBundleIdentifier')!=bundle_id or 'TeamIdentifier=B3W25FX5H5' not in signature:raise RuntimeError('Installed app identity mismatch')
(logs/'installed-signature.txt').write_text(signature) (logs/'installed-signature.txt').write_text(signature)
run(['pluginkit','-a',str(installed/'Contents/PlugIns/beatygril XPC Service.pluginkit')]) run(['pluginkit','-a',str(installed/'Contents/PlugIns/FCP-BeautyGirl XPC Service.pluginkit')])
# Xcode may register its build product. Only the installed plugin should # Xcode may register its build product. Only the installed plugin should
# be discoverable while native host validation is in progress. # be discoverable while native host validation is in progress.
unregister_generated_plugin(plugin) unregister_generated_plugin(plugin)
installed_plugin=installed/'Contents/PlugIns/beatygril XPC Service.pluginkit' installed_plugin=installed/'Contents/PlugIns/FCP-BeautyGirl XPC Service.pluginkit'
plugin_info=plistlib.loads((installed_plugin/'Contents/Info.plist').read_bytes()) plugin_info=plistlib.loads((installed_plugin/'Contents/Info.plist').read_bytes())
discovered=run(['pluginkit','-m','-A','-D','-v','-i',plugin_info['CFBundleIdentifier']]) discovered=run(['pluginkit','-m','-A','-D','-v','-i',plugin_info['CFBundleIdentifier']])
if str(installed_plugin) not in discovered:raise RuntimeError('PluginKit did not report the formal installed plug-in path') if str(installed_plugin) not in discovered:raise RuntimeError('PluginKit did not report the formal installed plug-in path')
+1 -1
查看文件
@@ -38,7 +38,7 @@ with zipfile.ZipFile(source_zip) as z:
assert z.testzip() is None and any(n.endswith('/Wrapper Application/AppDelegate.m') for n in z.namelist()) assert z.testzip() is None and any(n.endswith('/Wrapper Application/AppDelegate.m') for n in z.namelist())
status=request('/dayu-publisher/v1/status');assert status['can_publish'] and status['can_upload'] and 'seo' in status['fields'] status=request('/dayu-publisher/v1/status');assert status['can_publish'] and status['can_upload'] and 'seo' in status['fields']
source=upload('source',ROOT/'build/Dayu-Portrait-1.2.0-source.zip','application/zip') source=upload('source',ROOT/'build/Dayu-Portrait-1.2.0-source.zip','application/zip')
card=upload('card',ROOT/'beatygril/beatygril/Wrapper Application/Resources/LauncherInfo.png','image/png') card=upload('card',ROOT/'FCP-BeautyGirl/FCP-BeautyGirl/Wrapper Application/Resources/LauncherInfo.png','image/png')
content=(ROOT/'releases/1.2.0/article.html').read_text().replace('{{source_url}}',html.escape(source['url'],quote=True)).replace('{{card_url}}',html.escape(card['url'],quote=True)) content=(ROOT/'releases/1.2.0/article.html').read_text().replace('{{source_url}}',html.escape(source['url'],quote=True)).replace('{{card_url}}',html.escape(card['url'],quote=True))
seo={ seo={
'title':{'enabled':True,'value':'大鱼人像美化 1.2.0|FCP / Motion 免费开源自动美颜插件'}, 'title':{'enabled':True,'value':'大鱼人像美化 1.2.0|FCP / Motion 免费开源自动美颜插件'},
+4 -4
查看文件
@@ -1,13 +1,13 @@
#!/bin/zsh #!/bin/zsh
set -euo pipefail set -euo pipefail
cd "${0:A:h:h}" cd "${0:A:h:h}"
output_dir=$(mktemp -d /tmp/paintfcp-host-tests.XXXXXX) output_dir=$(mktemp -d /tmp/fcp-beautygirl-host-tests.XXXXXX)
trap 'rm -rf "$output_dir"' EXIT trap 'rm -rf "$output_dir"' EXIT
plugin_dir="$PWD/beatygril/beatygril/Plugin" plugin_dir="$PWD/FCP-BeautyGirl/FCP-BeautyGirl/Plugin"
sdk_frameworks=/Library/Developer/SDKs/FxPlug.sdk/Library/Frameworks sdk_frameworks=/Library/Developer/SDKs/FxPlug.sdk/Library/Frameworks
runtime_frameworks=/Library/Developer/Frameworks runtime_frameworks=/Library/Developer/Frameworks
compiler_extra=() compiler_extra=()
if [[ "${PAINTFCP_HOST_ASAN:-0}" == 1 ]]; then if [[ "${FCP_BEAUTYGIRL_HOST_ASAN:-0}" == 1 ]]; then
compiler_extra=(-fsanitize=address -g) compiler_extra=(-fsanitize=address -g)
fi fi
xcrun clang "${compiler_extra[@]}" -fobjc-arc -fmodules -Wall -Wextra -Wno-unused-parameter \ xcrun clang "${compiler_extra[@]}" -fobjc-arc -fmodules -Wall -Wextra -Wno-unused-parameter \
@@ -16,7 +16,7 @@ xcrun clang "${compiler_extra[@]}" -fobjc-arc -fmodules -Wall -Wextra -Wno-unuse
-Wl,-rpath,"$runtime_frameworks" \ -Wl,-rpath,"$runtime_frameworks" \
"$plugin_dir/PGBeautyRenderer.m" "$plugin_dir/PGFaceProcessor.m" \ "$plugin_dir/PGBeautyRenderer.m" "$plugin_dir/PGFaceProcessor.m" \
"$plugin_dir/PGInspectorState.m" "$plugin_dir/PGInspectorView.m" \ "$plugin_dir/PGInspectorState.m" "$plugin_dir/PGInspectorView.m" \
"$plugin_dir/beatygrilPlugIn.m" tests/host_adapter_tests.m \ "$plugin_dir/FCPBeautyGirlPlugIn.m" tests/host_adapter_tests.m \
-framework Foundation -framework AppKit -framework CoreImage -framework CoreGraphics \ -framework Foundation -framework AppKit -framework CoreImage -framework CoreGraphics \
-framework CoreMedia -framework CoreVideo -framework IOSurface -framework Metal \ -framework CoreMedia -framework CoreVideo -framework IOSurface -framework Metal \
-framework Vision -framework ImageIO -framework FxPlug -framework PluginManager \ -framework Vision -framework ImageIO -framework FxPlug -framework PluginManager \
+4 -4
查看文件
@@ -1,11 +1,11 @@
#!/bin/zsh #!/bin/zsh
set -euo pipefail set -euo pipefail
cd "${0:A:h:h}" cd "${0:A:h:h}"
output_dir=$(mktemp -d /tmp/paintfcp-inspector-tests.XXXXXX) output_dir=$(mktemp -d /tmp/fcp-beautygirl-inspector-tests.XXXXXX)
trap 'rm -rf "$output_dir"' EXIT trap 'rm -rf "$output_dir"' EXIT
plugin_dir="$PWD/beatygril/beatygril/Plugin" plugin_dir="$PWD/FCP-BeautyGirl/FCP-BeautyGirl/Plugin"
compiler_extra=() compiler_extra=()
if [[ "${PAINTFCP_INSPECTOR_ASAN:-0}" == 1 ]]; then if [[ "${FCP_BEAUTYGIRL_INSPECTOR_ASAN:-0}" == 1 ]]; then
compiler_extra=(-fsanitize=address -g) compiler_extra=(-fsanitize=address -g)
fi fi
python3 scripts/inspector-template.py audit 'Templates/大鱼人像美化/大鱼人像美化.moef' \ python3 scripts/inspector-template.py audit 'Templates/大鱼人像美化/大鱼人像美化.moef' \
@@ -16,7 +16,7 @@ xcrun clang "${compiler_extra[@]}" -fobjc-arc -fmodules -Wall -Wextra -Wno-unuse
-Wl,-rpath,/Library/Developer/Frameworks \ -Wl,-rpath,/Library/Developer/Frameworks \
"$plugin_dir/PGBeautyRenderer.m" "$plugin_dir/PGFaceProcessor.m" \ "$plugin_dir/PGBeautyRenderer.m" "$plugin_dir/PGFaceProcessor.m" \
"$plugin_dir/PGInspectorState.m" "$plugin_dir/PGInspectorView.m" \ "$plugin_dir/PGInspectorState.m" "$plugin_dir/PGInspectorView.m" \
"$plugin_dir/beatygrilPlugIn.m" tests/inspector_tests.m \ "$plugin_dir/FCPBeautyGirlPlugIn.m" tests/inspector_tests.m \
-framework Foundation -framework AppKit -framework CoreImage -framework CoreGraphics \ -framework Foundation -framework AppKit -framework CoreImage -framework CoreGraphics \
-framework CoreMedia -framework CoreVideo -framework IOSurface -framework Metal \ -framework CoreMedia -framework CoreVideo -framework IOSurface -framework Metal \
-framework Vision -framework ImageIO -framework FxPlug -framework PluginManager \ -framework Vision -framework ImageIO -framework FxPlug -framework PluginManager \
+3 -3
查看文件
@@ -1,13 +1,13 @@
#!/bin/zsh #!/bin/zsh
set -euo pipefail set -euo pipefail
cd "${0:A:h:h}" cd "${0:A:h:h}"
output_dir=$(mktemp -d /tmp/paintfcp-osc-tests.XXXXXX) output_dir=$(mktemp -d /tmp/fcp-beautygirl-osc-tests.XXXXXX)
trap 'rm -rf "$output_dir"' EXIT trap 'rm -rf "$output_dir"' EXIT
plugin_dir="$PWD/beatygril/beatygril/Plugin" plugin_dir="$PWD/FCP-BeautyGirl/FCP-BeautyGirl/Plugin"
sdk_frameworks=/Library/Developer/SDKs/FxPlug.sdk/Library/Frameworks sdk_frameworks=/Library/Developer/SDKs/FxPlug.sdk/Library/Frameworks
runtime_frameworks=/Library/Developer/Frameworks runtime_frameworks=/Library/Developer/Frameworks
compiler_extra=() compiler_extra=()
if [[ "${PAINTFCP_OSC_ASAN:-0}" == 1 ]]; then if [[ "${FCP_BEAUTYGIRL_OSC_ASAN:-0}" == 1 ]]; then
compiler_extra=(-fsanitize=address -g) compiler_extra=(-fsanitize=address -g)
fi fi
xcrun clang "${compiler_extra[@]}" -fobjc-arc -fmodules -Wall -Wextra -Wno-unused-parameter \ xcrun clang "${compiler_extra[@]}" -fobjc-arc -fmodules -Wall -Wextra -Wno-unused-parameter \
+2 -2
查看文件
@@ -1,9 +1,9 @@
#!/bin/zsh #!/bin/zsh
set -euo pipefail set -euo pipefail
cd "${0:A:h:h}" cd "${0:A:h:h}"
output_dir=$(mktemp -d /tmp/paintfcp-tests.XXXXXX) output_dir=$(mktemp -d /tmp/fcp-beautygirl-tests.XXXXXX)
trap 'rm -rf "$output_dir"' EXIT trap 'rm -rf "$output_dir"' EXIT
plugin_dir="$PWD/beatygril/beatygril/Plugin" plugin_dir="$PWD/FCP-BeautyGirl/FCP-BeautyGirl/Plugin"
common=(-fobjc-arc -fmodules -Wall -Wextra -Wno-unused-parameter -DCI_SILENCE_GL_DEPRECATION -mmacosx-version-min=13.0 -I "$plugin_dir" -framework Foundation -framework CoreImage -framework CoreGraphics -framework CoreMedia -framework Metal -framework Vision -framework ImageIO) common=(-fobjc-arc -fmodules -Wall -Wextra -Wno-unused-parameter -DCI_SILENCE_GL_DEPRECATION -mmacosx-version-min=13.0 -I "$plugin_dir" -framework Foundation -framework CoreImage -framework CoreGraphics -framework CoreMedia -framework Metal -framework Vision -framework ImageIO)
xcrun clang "${common[@]}" "$plugin_dir/PGBeautyRenderer.m" tests/beauty_render_tests.m -o "$output_dir/beauty-tests" xcrun clang "${common[@]}" "$plugin_dir/PGBeautyRenderer.m" tests/beauty_render_tests.m -o "$output_dir/beauty-tests"
"$output_dir/beauty-tests" "$output_dir/beauty-tests"
+2 -2
查看文件
@@ -10,7 +10,7 @@ parser.add_argument('--expanded',default='build/pkg-expanded')
parser.add_argument('--fixture',default='build/pkg-isolation') parser.add_argument('--fixture',default='build/pkg-isolation')
args=parser.parse_args() args=parser.parse_args()
expanded=root/args.expanded/'Payload.pkg';payload=expanded/'Payload' expanded=root/args.expanded/'Payload.pkg';payload=expanded/'Payload'
formal=Path('/Library/Plug-Ins/FxPlug/beatygril.app');packed=payload/'Library/Plug-Ins/FxPlug/beatygril.app' formal=Path('/Library/Plug-Ins/FxPlug/FCP-BeautyGirl.app');packed=payload/'Library/Plug-Ins/FxPlug/FCP-BeautyGirl.app'
sha=lambda p:hashlib.sha256(p.read_bytes()).hexdigest() sha=lambda p:hashlib.sha256(p.read_bytes()).hexdigest()
def files(p): def files(p):
return {str(x.relative_to(p)):('symlink:'+os.readlink(x) if x.is_symlink() else sha(x)) for x in p.rglob('*') if x.is_file() or x.is_symlink()} return {str(x.relative_to(p)):('symlink:'+os.readlink(x) if x.is_symlink() else sha(x)) for x in p.rglob('*') if x.is_file() or x.is_symlink()}
@@ -33,7 +33,7 @@ base=root/args.fixture;base.mkdir(exist_ok=False)
volume=base/'volume';home=base/'user';home.mkdir() volume=base/'volume';home=base/'user';home.mkdir()
start=post.index('CURRENT_ACTIVE=0') start=post.index('CURRENT_ACTIVE=0')
isolated='#!/bin/zsh\nset -eu\nTARGET_VOLUME="'+str(volume)+'"\nCONSOLE_USER="'+os.getlogin()+'"\nCONSOLE_UID="'+str(os.getuid())+'"\nCONSOLE_GROUP="staff"\nUSER_HOME="'+str(home)+'"\n'+post[start:] isolated='#!/bin/zsh\nset -eu\nTARGET_VOLUME="'+str(volume)+'"\nCONSOLE_USER="'+os.getlogin()+'"\nCONSOLE_UID="'+str(os.getuid())+'"\nCONSOLE_GROUP="staff"\nUSER_HOME="'+str(home)+'"\n'+post[start:]
isolated=isolated[:isolated.index('fx_verify_app "${TARGET_VOLUME%/}/Library/Plug-Ins/FxPlug/beatygril.app"')]+'exit 0\n' isolated=isolated[:isolated.index('fx_verify_app "${TARGET_VOLUME%/}/Library/Plug-Ins/FxPlug/FCP-BeautyGirl.app"')]+'exit 0\n'
isolated=isolated.replace('/usr/sbin/chown -R','/usr/bin/true') isolated=isolated.replace('/usr/sbin/chown -R','/usr/bin/true')
new_copy=next(l for l in isolated.splitlines() if l.startswith('/usr/bin/ditto "${TARGET_VOLUME%/}')) new_copy=next(l for l in isolated.splitlines() if l.startswith('/usr/bin/ditto "${TARGET_VOLUME%/}'))
def refill(): def refill():
+11 -11
查看文件
@@ -5,7 +5,7 @@
#import <Metal/Metal.h> #import <Metal/Metal.h>
#import <CoreVideo/CoreVideo.h> #import <CoreVideo/CoreVideo.h>
#import <ImageIO/ImageIO.h> #import <ImageIO/ImageIO.h>
#import "beatygrilPlugIn.h" #import "FCPBeautyGirlPlugIn.h"
#import "PGParameterIDs.h" #import "PGParameterIDs.h"
#import "PGFaceProcessor.h" #import "PGFaceProcessor.h"
#import "PGBeautyRenderer.h" #import "PGBeautyRenderer.h"
@@ -209,19 +209,19 @@ static NSData *ExpectedCrop(PGHostTile *source, NSUInteger x, NSUInteger y, NSUI
} }
return result; return result;
} }
static NSData *Snapshot(beatygrilPlugIn *plugin, CMTime time) { static NSData *Snapshot(FCPBeautyGirlPlugIn *plugin, CMTime time) {
NSData *state = nil; NSError *error = nil; NSData *state = nil; NSError *error = nil;
Check([plugin pluginState:&state atTime:time quality:kFxQuality_HIGH error:&error] && state.length > 0 && !error, @"plugin snapshot serializes through host parameter API"); Check([plugin pluginState:&state atTime:time quality:kFxQuality_HIGH error:&error] && state.length > 0 && !error, @"plugin snapshot serializes through host parameter API");
return state; return state;
} }
static BOOL Render(beatygrilPlugIn *plugin, PGHostTile *destination, NSArray *sources, NSData *state, CMTime time, NSError **error, BOOL *escaped) { static BOOL Render(FCPBeautyGirlPlugIn *plugin, PGHostTile *destination, NSArray *sources, NSData *state, CMTime time, NSError **error, BOOL *escaped) {
@try { return [plugin renderDestinationImage:destination sourceImages:sources pluginState:state atTime:time error:error]; } @try { return [plugin renderDestinationImage:destination sourceImages:sources pluginState:state atTime:time error:error]; }
@catch (NSException *exception) { @catch (NSException *exception) {
if (escaped) *escaped = YES; if (escaped) *escaped = YES;
fprintf(stderr, "EXCEPTION: %s\n", exception.reason.UTF8String); return NO; fprintf(stderr, "EXCEPTION: %s\n", exception.reason.UTF8String); return NO;
} }
} }
static void RejectState(beatygrilPlugIn *plugin, PGHostTile *destination, PGHostTile *source, NSData *state, NSString *description) { static void RejectState(FCPBeautyGirlPlugIn *plugin, PGHostTile *destination, PGHostTile *source, NSData *state, NSString *description) {
NSError *error = nil; BOOL escaped = NO; NSError *error = nil; BOOL escaped = NO;
BOOL rendered = Render(plugin, destination, @[source], state, kCMTimeZero, &error, &escaped); BOOL rendered = Render(plugin, destination, @[source], state, kCMTimeZero, &error, &escaped);
Check(!rendered && !escaped && error != nil, description); Check(!rendered && !escaped && error != nil, description);
@@ -353,7 +353,7 @@ static void PortraitAnatomyTests(NSString *fixture, CIImage *portrait) {
NSData *originBaseline = nil; NSData *originBaseline = nil;
for (NSUInteger sourceTop = 0; sourceTop < 2; sourceTop++) for (NSUInteger destinationTop = 0; destinationTop < 2; destinationTop++) { for (NSUInteger sourceTop = 0; sourceTop < 2; sourceTop++) for (NSUInteger destinationTop = 0; destinationTop < 2; destinationTop++) {
@autoreleasepool { @autoreleasepool {
PGHostAPI *api = [PGHostAPI new]; beatygrilPlugIn *plugin = [[beatygrilPlugIn alloc] initWithAPIManager:api]; PGHostAPI *api = [PGHostAPI new]; FCPBeautyGirlPlugIn *plugin = [[FCPBeautyGirlPlugIn alloc] initWithAPIManager:api];
Check([plugin addParametersWithError:nil], @"anatomy case creates the real plugin parameters"); Check([plugin addParametersWithError:nil], @"anatomy case creates the real plugin parameters");
if (effect) api.values[@(controls[effect])] = @(values[effect]); if (effect) api.values[@(controls[effect])] = @(values[effect]);
PGHostTile *input = Tile(width, height, 37, -21, sourceTop ? kFxImageOrigin_TOP_LEFT : kFxImageOrigin_BOTTOM_LEFT); PGHostTile *input = Tile(width, height, 37, -21, sourceTop ? kFxImageOrigin_TOP_LEFT : kFxImageOrigin_BOTTOM_LEFT);
@@ -406,7 +406,7 @@ static void TrackingCoordinateTests(NSDictionary *archive, NSDictionary *hostVal
values[@(PGTarget)] = @2; values[@(PGTrackEnabled)] = @YES; values[@(PGBigEye)] = @1; values[@(PGChin)] = @1; values[@(PGTarget)] = @2; values[@(PGTrackEnabled)] = @YES; values[@(PGBigEye)] = @1; values[@(PGChin)] = @1;
values[@(PGTrackData3)] = legacyString; values[@(PGTrackData3)] = legacyString;
PGHostAPI *legacyAPI = [PGHostAPI new]; legacyAPI.hostTime = time; PGHostAPI *legacyAPI = [PGHostAPI new]; legacyAPI.hostTime = time;
beatygrilPlugIn *legacy = [[beatygrilPlugIn alloc] initWithAPIManager:legacyAPI]; [legacy addParametersWithError:nil]; legacyAPI.values = [values mutableCopy]; FCPBeautyGirlPlugIn *legacy = [[FCPBeautyGirlPlugIn alloc] initWithAPIManager:legacyAPI]; [legacy addParametersWithError:nil]; legacyAPI.values = [values mutableCopy];
PGHostTile *output = Tile(512,512,0,0,kFxImageOrigin_TOP_LEFT); PGHostTile *output = Tile(512,512,0,0,kFxImageOrigin_TOP_LEFT);
Check(Render(legacy, output, @[source], Snapshot(legacy,time), time, nil, NULL), @"unmarked old coordinate archive renders through the real adapter"); Check(Render(legacy, output, @[source], Snapshot(legacy,time), time, nil, NULL), @"unmarked old coordinate archive renders through the real adapter");
NSData *legacyBytes = SurfaceBytes(output); NSData *legacyBytes = SurfaceBytes(output);
@@ -420,7 +420,7 @@ static void TrackingCoordinateTests(NSDictionary *archive, NSDictionary *hostVal
forged[@"hostCoordinateSpace"] = @"iosurface-ci-y-up-v1"; forged[@"hostCoordinateSpace"] = @"iosurface-ci-y-up-v1";
NSData *trustedTrack = PlistState(forged); NSData *trustedTrack = PlistState(forged);
PGHostAPI *trustedAPI = [PGHostAPI new]; trustedAPI.hostTime = time; PGHostAPI *trustedAPI = [PGHostAPI new]; trustedAPI.hostTime = time;
beatygrilPlugIn *trusted = [[beatygrilPlugIn alloc] initWithAPIManager:trustedAPI]; [trusted addParametersWithError:nil]; FCPBeautyGirlPlugIn *trusted = [[FCPBeautyGirlPlugIn alloc] initWithAPIManager:trustedAPI]; [trusted addParametersWithError:nil];
trustedAPI.values = [values mutableCopy]; trustedAPI.values[@(PGTrackData3)] = [trustedTrack base64EncodedStringWithOptions:0]; trustedAPI.values = [values mutableCopy]; trustedAPI.values[@(PGTrackData3)] = [trustedTrack base64EncodedStringWithOptions:0];
Check(Render(trusted, output, @[source], Snapshot(trusted,time), time, nil, NULL), @"fresh plugin accepts a snapshot with marked legacy analysis data"); Check(Render(trusted, output, @[source], Snapshot(trusted,time), time, nil, NULL), @"fresh plugin accepts a snapshot with marked legacy analysis data");
NSData *trustedBytes = SurfaceBytes(output); NSData *trustedBytes = SurfaceBytes(output);
@@ -465,7 +465,7 @@ static BOOL Preview(PGHostTile *before, PGHostTile *after, NSString *path) {
int main(int argc, const char *argv[]) { int main(int argc, const char *argv[]) {
setbuf(stdout, NULL); setbuf(stdout, NULL);
@autoreleasepool { @autoreleasepool {
PGHostAPI *api = [PGHostAPI new]; beatygrilPlugIn *plugin = [[beatygrilPlugIn alloc] initWithAPIManager:api]; PGHostAPI *api = [PGHostAPI new]; FCPBeautyGirlPlugIn *plugin = [[FCPBeautyGirlPlugIn alloc] initWithAPIManager:api];
NSError *error = nil; NSError *error = nil;
Check([plugin addParametersWithError:&error] && !error, @"host creates complete parameter set"); Check([plugin addParametersWithError:&error] && !error, @"host creates complete parameter set");
UInt32 identifiers[] = {PGAmount,PGBrightness,PGRadius,PGSharpness,PGMix,PGThreshold,PGSoftness,PGEdgeProtect,PGShowMask,PGMidtone,PGHue,PGSaturation,PGHighPass,PGThin,PGFaceBoxes,PGSingleFace,PGSelection,PGShort,PGNarrow,PGChin,PGVFace,PGJaw,PGCheekbone,PGSmallHead,PGSmallHeadRange,PGFeatureProtect,PGTeeth,PGEyeBright,PGBigEye,PGTrackBoxes,PGFastMulti,PGJumpGuard,PGEvenTone,PGTonePreset,PGInvertMask,PGDebugChannel,PGTrackEnabled,PGTarget,PGAnalyzeForward,PGAnalyzeBackward,PGClearTrack,PGStatus,PGTrackData1,PGTrackData2,PGTrackData3,PGSmoothingEnabled,PGColorEnabled,PGShapeEnabled,PGDetailEnabled,PGInspectorPanel}; UInt32 identifiers[] = {PGAmount,PGBrightness,PGRadius,PGSharpness,PGMix,PGThreshold,PGSoftness,PGEdgeProtect,PGShowMask,PGMidtone,PGHue,PGSaturation,PGHighPass,PGThin,PGFaceBoxes,PGSingleFace,PGSelection,PGShort,PGNarrow,PGChin,PGVFace,PGJaw,PGCheekbone,PGSmallHead,PGSmallHeadRange,PGFeatureProtect,PGTeeth,PGEyeBright,PGBigEye,PGTrackBoxes,PGFastMulti,PGJumpGuard,PGEvenTone,PGTonePreset,PGInvertMask,PGDebugChannel,PGTrackEnabled,PGTarget,PGAnalyzeForward,PGAnalyzeBackward,PGClearTrack,PGStatus,PGTrackData1,PGTrackData2,PGTrackData3,PGSmoothingEnabled,PGColorEnabled,PGShapeEnabled,PGDetailEnabled,PGInspectorPanel};
@@ -589,7 +589,7 @@ int main(int argc, const char *argv[]) {
TrackingCoordinateTests(trackingArchive,api.values,portraitSource,portrait,api.hostTime); TrackingCoordinateTests(trackingArchive,api.values,portraitSource,portrait,api.hostTime);
Check([api.values[@(PGTrackEnabled)] boolValue] && CMTimeCompare(api.lastSetBoolTime, api.hostTime) == 0, @"analysis enables saved target at host seed time"); Check([api.values[@(PGTrackEnabled)] boolValue] && CMTimeCompare(api.lastSetBoolTime, api.hostTime) == 0, @"analysis enables saved target at host seed time");
NSData *trackedState = Snapshot(plugin, api.hostTime); NSData *trackedState = Snapshot(plugin, api.hostTime);
beatygrilPlugIn *restoredPlugin = [[beatygrilPlugIn alloc] initWithAPIManager:api]; FCPBeautyGirlPlugIn *restoredPlugin = [[FCPBeautyGirlPlugIn alloc] initWithAPIManager:api];
Check(Render(restoredPlugin, portraitOutput, @[portraitSource], trackedState, api.hostTime, &error, NULL), @"fresh plugin instance uses automatic follow despite serialized legacy analysis settings"); Check(Render(restoredPlugin, portraitOutput, @[portraitSource], trackedState, api.hostTime, &error, NULL), @"fresh plugin instance uses automatic follow despite serialized legacy analysis settings");
[plugin analyzeBackward]; [plugin analyzeBackward];
Check(api.backwardRequests == 1, @"backward analyze button calls host API"); Check(api.backwardRequests == 1, @"backward analyze button calls host API");
@@ -598,7 +598,7 @@ int main(int argc, const char *argv[]) {
[plugin setupAnalysisForTimeRange:desired frameDuration:CMTimeMake(1, 24) error:&error]; [plugin cleanupAnalysis:&error]; [plugin setupAnalysisForTimeRange:desired frameDuration:CMTimeMake(1, 24) error:&error]; [plugin cleanupAnalysis:&error];
[plugin clearTracking]; Check([api.values[@(PGTrackData3)] length] == 0, @"clear button uses current host target"); [plugin clearTracking]; Check([api.values[@(PGTrackData3)] length] == 0, @"clear button uses current host target");
PGHostAPI *writeFailureAPI = [PGHostAPI new]; PGHostAPI *writeFailureAPI = [PGHostAPI new];
beatygrilPlugIn *writeFailurePlugin = [[beatygrilPlugIn alloc] initWithAPIManager:writeFailureAPI]; FCPBeautyGirlPlugIn *writeFailurePlugin = [[FCPBeautyGirlPlugIn alloc] initWithAPIManager:writeFailureAPI];
[writeFailurePlugin addParametersWithError:&error]; [writeFailurePlugin analyzeForward]; [writeFailurePlugin addParametersWithError:&error]; [writeFailurePlugin analyzeForward];
[writeFailurePlugin setupAnalysisForTimeRange:clip frameDuration:CMTimeMake(1, 24) error:&error]; [writeFailurePlugin setupAnalysisForTimeRange:clip frameDuration:CMTimeMake(1, 24) error:&error];
[writeFailurePlugin analyzeFrame:portraitSource atTime:writeFailureAPI.hostTime error:&error]; [writeFailurePlugin analyzeFrame:portraitSource atTime:writeFailureAPI.hostTime error:&error];
@@ -608,7 +608,7 @@ int main(int argc, const char *argv[]) {
[writeFailurePlugin analyzeForward]; [writeFailurePlugin analyzeForward];
Check(writeFailureAPI.forwardRequests == 2, @"persistence failure releases analysis busy state for retry"); Check(writeFailureAPI.forwardRequests == 2, @"persistence failure releases analysis busy state for retry");
PGHostAPI *unavailable = [PGHostAPI new]; [unavailable.disabledAPIs addObject:@"FxParameterCreationAPI_v5"]; PGHostAPI *unavailable = [PGHostAPI new]; [unavailable.disabledAPIs addObject:@"FxParameterCreationAPI_v5"];
beatygrilPlugIn *missingPlugin = [[beatygrilPlugIn alloc] initWithAPIManager:unavailable]; FCPBeautyGirlPlugIn *missingPlugin = [[FCPBeautyGirlPlugIn alloc] initWithAPIManager:unavailable];
error = nil; Check(![missingPlugin addParametersWithError:&error] && error != nil, @"missing host creation API reports error"); error = nil; Check(![missingPlugin addParametersWithError:&error] && error != nil, @"missing host creation API reports error");
[unavailable.disabledAPIs removeAllObjects]; unavailable.rejectedParameter = PGThin; [unavailable.disabledAPIs removeAllObjects]; unavailable.rejectedParameter = PGThin;
error = nil; Check(![missingPlugin addParametersWithError:&error] && error != nil, @"host rejecting one control fails complete parameter creation"); error = nil; Check(![missingPlugin addParametersWithError:&error] && error != nil, @"host rejecting one control fails complete parameter creation");
+8 -8
查看文件
@@ -56,7 +56,7 @@ static PGInspectorState *State(NSDictionary *values,NSSet *disabled) {
return [PGInspectorState stateWithValues:values disabledParameters:disabled?:[NSSet set] hasEdits:YES]; return [PGInspectorState stateWithValues:values disabledParameters:disabled?:[NSSet set] hasEdits:YES];
} }
static void RegistrationTests(void) { static void RegistrationTests(void) {
PGHostAPI *api=[PGHostAPI new];beatygrilPlugIn *plugin=[[beatygrilPlugIn alloc]initWithAPIManager:api];[plugin addParametersWithError:nil]; PGHostAPI *api=[PGHostAPI new];FCPBeautyGirlPlugIn *plugin=[[FCPBeautyGirlPlugIn alloc]initWithAPIManager:api];[plugin addParametersWithError:nil];
NSUInteger visible=0;for(NSNumber *key in api.definitions){NSDictionary *d=api.definitions[key];if(!([d[@"flags"]unsignedIntValue]&kFxParameterFlag_HIDDEN)){visible++;Check(key.unsignedIntValue==PGInspectorPanel,@"only the custom panel is visible in the native parameter list");}} NSUInteger visible=0;for(NSNumber *key in api.definitions){NSDictionary *d=api.definitions[key];if(!([d[@"flags"]unsignedIntValue]&kFxParameterFlag_HIDDEN)){visible++;Check(key.unsignedIntValue==PGInspectorPanel,@"only the custom panel is visible in the native parameter list");}}
Check(visible==1,@"all duplicate standard controls and manual-analysis groups are hidden"); Check(visible==1,@"all duplicate standard controls and manual-analysis groups are hidden");
FxParameterFlags flags=[api.definitions[@(PGInspectorPanel)][@"flags"]unsignedIntValue]; FxParameterFlags flags=[api.definitions[@(PGInspectorPanel)][@"flags"]unsignedIntValue];
@@ -136,7 +136,7 @@ static void ModelTests(void) {
Check(s.faceChin==0 && s.faceBigEye==0 && s.skinBrightness==0 && s.skinTonePreset==0 && s.midtoneDetail==0 && s.highPassDetail==0 && s.showTrackBox==0,@"card eye switches bypass the complete associated effect group"); Check(s.faceChin==0 && s.faceBigEye==0 && s.skinBrightness==0 && s.skinTonePreset==0 && s.midtoneDetail==0 && s.highPassDetail==0 && s.showTrackBox==0,@"card eye switches bypass the complete associated effect group");
} }
static void ControllerTests(void) { static void ControllerTests(void) {
PGInspectorTestAPI *api=[PGInspectorTestAPI new];beatygrilPlugIn *plugin=[[beatygrilPlugIn alloc]initWithAPIManager:api];[plugin addParametersWithError:nil]; PGInspectorTestAPI *api=[PGInspectorTestAPI new];FCPBeautyGirlPlugIn *plugin=[[FCPBeautyGirlPlugIn alloc]initWithAPIManager:api];[plugin addParametersWithError:nil];
api.values[@(PGMidtone)]=@.5; api.values[@(PGMidtone)]=@.5;
PGInspectorController *c=[[PGInspectorController alloc]initWithAPIManager:api];[c refresh]; PGInspectorController *c=[[PGInspectorController alloc]initWithAPIManager:api];[c refresh];
Check(c.available && Near([c.state valueForParameter:PGMidtone],.5) && !c.state.hasEdits,@"initial UI reads the current legacy/template values instead of replacing them"); Check(c.available && Near([c.state valueForParameter:PGMidtone],.5) && !c.state.hasEdits,@"initial UI reads the current legacy/template values instead of replacing them");
@@ -169,7 +169,7 @@ static void ControllerTests(void) {
[c setValue:.1 forParameter:PGBrightness];Check(Near([c.state valueForParameter:PGChin],-.8),@"new-time edits preserve the other controls from that time instead of a stale prior frame"); [c setValue:.1 forParameter:PGBrightness];Check(Near([c.state valueForParameter:PGChin],-.8),@"new-time edits preserve the other controls from that time instead of a stale prior frame");
api.values=[api.undoValues mutableCopy];[c documentDidChange]; api.values=[api.undoValues mutableCopy];[c documentDidChange];
Check(Near([c.state valueForParameter:PGBrightness],[seekValues[@(PGBrightness)]doubleValue]),@"a host undo notification refreshes same-time state immediately without a timed wait"); Check(Near([c.state valueForParameter:PGBrightness],[seekValues[@(PGBrightness)]doubleValue]),@"a host undo notification refreshes same-time state immediately without a timed wait");
PGHostAPI *legacy=[PGHostAPI new];beatygrilPlugIn *legacyPlugin=[[beatygrilPlugIn alloc]initWithAPIManager:legacy];[legacyPlugin addParametersWithError:nil]; PGHostAPI *legacy=[PGHostAPI new];FCPBeautyGirlPlugIn *legacyPlugin=[[FCPBeautyGirlPlugIn alloc]initWithAPIManager:legacy];[legacyPlugin addParametersWithError:nil];
legacy.values[@(PGDetailEnabled)]=@NO;legacy.values[@(PGHighPass)]=@.6;legacy.values[@(PGSharpness)]=@.4; legacy.values[@(PGDetailEnabled)]=@NO;legacy.values[@(PGHighPass)]=@.6;legacy.values[@(PGSharpness)]=@.4;
PGInspectorController *imported=[[PGInspectorController alloc]initWithAPIManager:legacy];[imported refresh];[imported setValue:.3 forParameter:PGBrightness]; PGInspectorController *imported=[[PGInspectorController alloc]initWithAPIManager:legacy];[imported refresh];[imported setValue:.3 forParameter:PGBrightness];
PGBeautySettings migrated=PGSettingsWithInspectorState(PGBeautyDefaults(),imported.state); PGBeautySettings migrated=PGSettingsWithInspectorState(PGBeautyDefaults(),imported.state);
@@ -185,7 +185,7 @@ static void ControllerTests(void) {
Check(!offline.available && ![offline setValue:.2 forParameter:PGChin],@"missing host actions disable editing instead of unsafe parameter access"); Check(!offline.available && ![offline setValue:.2 forParameter:PGChin],@"missing host actions disable editing instead of unsafe parameter access");
} }
static void ViewInteractionTests(void) { static void ViewInteractionTests(void) {
PGHostAPI *api=[PGHostAPI new];beatygrilPlugIn *plugin=[[beatygrilPlugIn alloc]initWithAPIManager:api];[plugin addParametersWithError:nil]; PGHostAPI *api=[PGHostAPI new];FCPBeautyGirlPlugIn *plugin=[[FCPBeautyGirlPlugIn alloc]initWithAPIManager:api];[plugin addParametersWithError:nil];
PGInspectorView *view=(PGInspectorView *)[plugin createViewForParameterID:PGInspectorPanel];[view refreshFromHost]; PGInspectorView *view=(PGInspectorView *)[plugin createViewForParameterID:PGInspectorPanel];[view refreshFromHost];
NSSlider *chin=(NSSlider *)FindControl(view,NSSlider.class,@"下巴");Check(chin!=nil && chin.enabled,@"custom view exposes an accessible native chin slider"); NSSlider *chin=(NSSlider *)FindControl(view,NSSlider.class,@"下巴");Check(chin!=nil && chin.enabled,@"custom view exposes an accessible native chin slider");
chin.doubleValue=-.75;Fire(chin);PGInspectorState *s=api.values[@(PGInspectorPanel)]; chin.doubleValue=-.75;Fire(chin);PGInspectorState *s=api.values[@(PGInspectorPanel)];
@@ -238,7 +238,7 @@ static void ViewInteractionTests(void) {
} }
} }
static void BeautyControlInteractionTests(void) { static void BeautyControlInteractionTests(void) {
PGInspectorTestAPI *api=[PGInspectorTestAPI new];beatygrilPlugIn *plugin=[[beatygrilPlugIn alloc]initWithAPIManager:api];[plugin addParametersWithError:nil]; PGInspectorTestAPI *api=[PGInspectorTestAPI new];FCPBeautyGirlPlugIn *plugin=[[FCPBeautyGirlPlugIn alloc]initWithAPIManager:api];[plugin addParametersWithError:nil];
api.values[@(PGFeatureProtectionAmount)]=@.37;api.values[@(PGHighPass)]=@.63;api.values[@(PGHue)]=@12;api.values[@(PGBrightness)]=@.3; api.values[@(PGFeatureProtectionAmount)]=@.37;api.values[@(PGHighPass)]=@.63;api.values[@(PGHue)]=@12;api.values[@(PGBrightness)]=@.3;
PGInspectorView *view=(PGInspectorView *)[plugin createViewForParameterID:PGInspectorPanel];[view refreshFromHost]; PGInspectorView *view=(PGInspectorView *)[plugin createViewForParameterID:PGInspectorPanel];[view refreshFromHost];
Check(Near([view.controller.state valueForParameter:PGFeatureProtectionAmount],.37) && !view.controller.state.hasEdits,@"an untouched inspector preserves native fractional protection when the legacy boolean is enabled"); Check(Near([view.controller.state valueForParameter:PGFeatureProtectionAmount],.37) && !view.controller.state.hasEdits,@"an untouched inspector preserves native fractional protection when the legacy boolean is enabled");
@@ -276,7 +276,7 @@ static void BeautyControlInteractionTests(void) {
Check(api.actionDepth==0 && api.actionStarts==api.actionEnds && api.accessViolations==0,@"all new numeric, bypass, reset and master interactions use balanced host actions"); Check(api.actionDepth==0 && api.actionStarts==api.actionEnds && api.accessViolations==0,@"all new numeric, bypass, reset and master interactions use balanced host actions");
} }
static void HostHandshakeTests(void) { static void HostHandshakeTests(void) {
PGInspectorTestAPI *api=[PGInspectorTestAPI new];beatygrilPlugIn *plugin=[[beatygrilPlugIn alloc]initWithAPIManager:api];[plugin addParametersWithError:nil]; PGInspectorTestAPI *api=[PGInspectorTestAPI new];FCPBeautyGirlPlugIn *plugin=[[FCPBeautyGirlPlugIn alloc]initWithAPIManager:api];[plugin addParametersWithError:nil];
api.values[@(PGMidtone)]=@.5; api.values[@(PGMidtone)]=@.5;
api.parameterAPIsRequireAction=YES;api.actionRequiresView=YES; api.parameterAPIsRequireAction=YES;api.actionRequiresView=YES;
PGInspectorView *view=(PGInspectorView *)[plugin createViewForParameterID:PGInspectorPanel];[view refreshFromHost]; PGInspectorView *view=(PGInspectorView *)[plugin createViewForParameterID:PGInspectorPanel];[view refreshFromHost];
@@ -293,7 +293,7 @@ static void HostHandshakeTests(void) {
Check(api.accessViolations==0 && api.actionDepth==0 && api.actionStarts==api.actionEnds,@"action-scoped connection, edits, failure and reconnection remain balanced"); Check(api.accessViolations==0 && api.actionDepth==0 && api.actionStarts==api.actionEnds,@"action-scoped connection, edits, failure and reconnection remain balanced");
} }
static void ContinuousPreviewTests(void) { static void ContinuousPreviewTests(void) {
PGInspectorTestAPI *api=[PGInspectorTestAPI new];beatygrilPlugIn *plugin=[[beatygrilPlugIn alloc]initWithAPIManager:api];[plugin addParametersWithError:nil]; PGInspectorTestAPI *api=[PGInspectorTestAPI new];FCPBeautyGirlPlugIn *plugin=[[FCPBeautyGirlPlugIn alloc]initWithAPIManager:api];[plugin addParametersWithError:nil];
api.parameterAPIsRequireAction=YES;api.actionRequiresView=YES; api.parameterAPIsRequireAction=YES;api.actionRequiresView=YES;
PGInspectorView *view=(PGInspectorView *)[plugin createViewForParameterID:PGInspectorPanel];[view refreshFromHost]; PGInspectorView *view=(PGInspectorView *)[plugin createViewForParameterID:PGInspectorPanel];[view refreshFromHost];
NSArray *names=@[@"短脸",@"五官保护",@"非肤色区保护",@"微细锐化"],*ids=@[@(PGShort),@(PGFeatureProtectionAmount),@(PGNonSkinProtection),@(PGMicroDetail)]; NSArray *names=@[@"短脸",@"五官保护",@"非肤色区保护",@"微细锐化"],*ids=@[@(PGShort),@(PGFeatureProtectionAmount),@(PGNonSkinProtection),@(PGMicroDetail)];
@@ -319,7 +319,7 @@ static void ContinuousPreviewTests(void) {
static void OptionalInspectorPreview(void) { static void OptionalInspectorPreview(void) {
NSString *path=NSProcessInfo.processInfo.environment[@"PAINTFCP_INSPECTOR_PNG"]; NSString *path=NSProcessInfo.processInfo.environment[@"PAINTFCP_INSPECTOR_PNG"];
if(!path.length)return; if(!path.length)return;
PGHostAPI *api=[PGHostAPI new];beatygrilPlugIn *plugin=[[beatygrilPlugIn alloc]initWithAPIManager:api];[plugin addParametersWithError:nil]; PGHostAPI *api=[PGHostAPI new];FCPBeautyGirlPlugIn *plugin=[[FCPBeautyGirlPlugIn alloc]initWithAPIManager:api];[plugin addParametersWithError:nil];
api.values[@(PGMidtone)]=@.4; api.values[@(PGMidtone)]=@.4;
PGInspectorView *view=(PGInspectorView *)[plugin createViewForParameterID:PGInspectorPanel];[view refreshFromHost]; PGInspectorView *view=(PGInspectorView *)[plugin createViewForParameterID:PGInspectorPanel];[view refreshFromHost];
[view setFrameSize:NSMakeSize(380,20)]; [view setFrameSize:NSMakeSize(380,20)];