Re: Moefs not storing all FxPlug parameters?
Re: Moefs not storing all FxPlug parameters?
- Subject: Re: Moefs not storing all FxPlug parameters?
- From: Darrin Cardani <email@hidden>
- Date: Thu, 4 Aug 2011 09:46:04 -0700
On Aug 4, 2011, at 8:55 AM, Nathan Weston wrote:
> When I make a Motion Effect containing an FxPlug, it appears that it only stores parameters which have been changed from the default value. Is that expected behavior?
Yes this is intentional. It's an optimization to make reading Motion Effects faster.
> This is a really bad idea. Consider the following case:
> 1. User creates a Motion Effect with version 1 of my plugin. They leave parameter X at the default value.
> 2. I release version 2 of my plugin, in which I've changed the default value of X to something nicer.
> 3. User installs version 2, and their Motion Effect now renders differently.
>
> In effect, it means we can never change parameter default values if we want to keep backward compatibility. If you store all the parameters in the Motion Effect it's guaranteed to render consistently even if the FxPlug changes default values underneath it.
You should be checking the -versionAtCreation method and setting the default appropriately. If the plug-in's versionAtCreation is 1, set the default to the version 1 default. If it's 2, set the default to the version 2 default. Note that if your plug-in didn't have a version when the document was created, -versionAtCreation will return 0. So when you update it and add a version, just set it to 1, and you'll be able to tell the current version from older versions.
Darrin
--
Darrin Cardani
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