More results:
- Changed ProPlugPluginList version to "2"
- Kept parameterID the same with a single popup menu.
- in addParameters I checked versionAtCreation value. If it equals 1, then added the original 3 menus, else added 5 menus.
- in renderOutput again checked versionAtCreation value and if equal to 1 then remapped original popup int value to new int value. 1>3 and 2>4
- Tried this in FCP with the original v1 Motion Template and got 3 menus for BOTH old and new instances of the generator.
- So then tried remaking the Motion Template which involved starting over again with a new instance of the plugin, so I could see the 5 menus.
- In FCP this resulted in both old and new instances of the generator having 5 menus which meant the old instance showed the wrong option (old index 2 HH:MM:SS now showing as new index 2 - MM:SS). So that's no good.
So then I tried a migration strategy:
- Added a hidden "Upgraded1to2" bool parameter
- addParameters only adds 5 menus with same parameterID as before
- in finishInitialSetup, check for upgraded1to2 as NO and versionAtCreation == 1. If both true then get the popup parameter value and then set it to the new increased value. Then set upgraded1to2 to YES.
- renderOutput then just deals with the new values of the popup.
- tested with the v2 motion template in FCP. But it doesn't work. An NSLog inside the migration code always reports that the versionAtCreation == 2, even for old instances of the generator, so again the wrong menu is chosen.
So to sum up, while I can see that versionAtCreation could work in Motion, I'm struggling to see how it could work in FCP. In all 3 cases above, FCP reports the version of the plug-in used to build the Motion template and not the version of the FxPlug actually installed currently...
Martin Baker
------------------------------------------------------
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 27 Mar 2013, at 20:06, Darrin Cardani wrote:
It should work fine in Motion. I haven't tried that inside a Motion Template running in FCP, so I'm not sure what the already-published menu will look like. I think it should work, but off the top of my head, I'm not positive.
Darrin
On Mar 27, 2013, at 1:01 PM, Martin Baker <
email@hidden> wrote:
Thanks Darrin
That's useful. I think what I'm seeing is that there isn't really an easy way to migrate from one major version to another. I could see a possible way with a hidden BOOL "upgraded" flag but this seems to open a whole can of other worms (nightmares of dynamic adding of parameters etc) and it probably isn't worth the effort. The user will just have to live with the fact that the new menu options are only possible with a brand new instance of the plug-in, which in reality isn't that much of a hardship :-).
It does make complete sense that adding a new parameter and choosing which one will be hidden/shown would require a new Motion Template. But now I'm wondering if I could just leave the parameter ID unchanged and check the versionAtCreation in addParameters to set the required number of menus, and also in renderOutput, to remap the popup values if necessary from a v1 instance...
Martin
www.digital-heaven.co.uk
www.twitter.com/digitalheaven
www.videospaceonline.com
www.finalcutters.com
------------------------------------------------------
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 27 Mar 2013, at 16:56, Darrin Cardani wrote:
Oh, I should add - if you go with my suggestion of hiding either the old or new popup menu based on the version, then I think question 3 is irrelevant because the popup menu you don't want the user to see should always be hidden.
Another option is to put the new items at the end of the menu. In this case, that's not very user-friendly because of the meaning of the menu items, but it's probably the easiest option.
Darrin
On Mar 27, 2013, at 7:34 AM, Martin Baker <email@hidden> wrote:
I have a popup menu parameter which currently has the following options
SS
MM:SS
HH:MM:SS
and I want to add 2 new menus so it is like this:
SS
M:SS
MM:SS
H:MM:SS
HH:MM:SS
Q1: I'm fairly positive that Motion/FCP just stores the selected index of the popup, so a user opening a v1 project with the v2 plug-in would have their HH:MM:SS choice now showing up as MM:SS?
Q2: So looking at the versioningAPI, I can check for versionAtCreation == 1, but then what? I could internally remap old index 1 to new 3, and old index 2 to new 4 but the parameter value should really be updated programmatically so the UI shows the correct choice. So that's doable, but then for the future how do I tell Motion/FCP that this has been updated since versionAtCreation is read only?
Q3: Is it necessary to remake the Motion Template when adding menus to a popup, or is that parameter just published by ID, so will update in FCP automatically?
thanks
Martin Baker
www.digital-heaven.co.uk
www.twitter.com/digitalheaven
www.videospaceonline.com
www.finalcutters.com
------------------------------------------------------
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
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
This email sent to email@hidden
Do not post admin requests to the list. They will be ignored.