Re: FxHostCapabities protocol not reading correct values?
Re: FxHostCapabities protocol not reading correct values?
- Subject: Re: FxHostCapabities protocol not reading correct values?
- From: Martin Baker <email@hidden>
- Date: Thu, 21 Nov 2013 09:44:55 +0000
Yes because all effects run in the Motion engine. It certainly would be nice to get accurate reporting of the host app but in the meantime you can check the main bundle instead:
// Find out which Host Application called the plugin
CFBundleRef appBundle = CFBundleGetMainBundle();
CFStringRef appIdentity = NULL;
if (appBundle != NULL) appIdentity = CFBundleGetIdentifier(appBundle);
NSString *bundleIdentifier = (NSString *)appIdentity;
if ([bundleIdentifier length] > 0) {
if ([bundleIdentifier caseInsensitiveCompare: @"com.apple.motion"] == NSOrderedSame)
// Motion 2-4
else if ([bundleIdentifier caseInsensitiveCompare: @"com.apple.motionapp"] == NSOrderedSame)
// Motion 5
else if ([bundleIdentifier caseInsensitiveCompare: @"com.apple.finalcutexpress"] == NSOrderedSame)
// Final Cut Express
else if ([bundleIdentifier caseInsensitiveCompare: @"com.apple.finalcutpro"] == NSOrderedSame)
// FCP 5-7
else if ([bundleIdentifier caseInsensitiveCompare: @"com.apple.finalcuttrial"] == NSOrderedSame)
// FCPX Trial
else if ([bundleIdentifier caseInsensitiveCompare: @"com.apple.finalcut"] == NSOrderedSame)
// FCPX
}
Martin Baker
www.digital-heaven.co.uk
www.twitter.com/digitalheaven
------------------------------------------------------
Digital Heaven Ltd is registered in England and Wales
Company registration number: 3628396
Registered address: 55 Lynwood Drive, Worcester Park, Surrey KT4 7AE
VAT registration number: GB 736 0989 03
On 20 Nov 2013, at 22:45, Ardo Avancena wrote:
> I'm trying to use FxHostCapabilities protocol to figure out if the plugin is currently running in FCP, but whenever I run FCP and use a generator from motion, It always says host is motion.
>
> Is is because it was using a motion generated file? Is there a different way for me to go about finding what app is running the plugin at the moment?
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Pro-apps-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden