Copy link to clipboard
Copied
Hi, I developed an Ae plugin and I have lots of question about version management.
If my last plugin's UI layout was:
#1: slider1
#2: slider2
#3: slider3
And my next plugin's layout will be:
#1: slider1
#2:checkbox1 <- newly insert
#3: slider2
#4:slider3
What should I do to transfer the data from the old to the new one? (This happening while user are about opening the project which includes old plugin data)
There is a dedicated section for this in the SDK manual. The name of the parameter is not relevant, but the IDs you give them. There is a parameter ID/index and there is a disk ID, and you manage them separately. As long as the disk ID is the same, AE treats it as the same parameter, no matter in what position in the parameter list for the UI it is, so you can freely move it around.
Here is an excerpt from the manual explaining it in more detail, but it should be straightforward, I guess:
"It is
Copy link to clipboard
Copied
As long as the actual internal match names of the controls don't change, AE will/ should handle this automatically and update any projects referencing older plug-in versions, at least unless there aren't any specific hierarchical dependencies of different properties that would require contextual handling of control groups and sub-controls.
Mylenium
Copy link to clipboard
Copied
There is a dedicated section for this in the SDK manual. The name of the parameter is not relevant, but the IDs you give them. There is a parameter ID/index and there is a disk ID, and you manage them separately. As long as the disk ID is the same, AE treats it as the same parameter, no matter in what position in the parameter list for the UI it is, so you can freely move it around.
Here is an excerpt from the manual explaining it in more detail, but it should be straightforward, I guess:
"It is possible to add or remove parameters from a plug-in, without forcing users to re-apply all instances of that plug-in to use the updated version. You must first create a parameter array index. During PF_Cmd_PARAM_SETUP, assign index values to each parameter as you add them, using a simple enumeration. The order of enumeration corresponds to the order in which the parameters are registered during PF_Cmd_PARAM_SETUP, which in turn determines the order in which they appear in the Effect Control and Timeline panels.
Create another enumeration for disk IDs. The order of this enumeration must not be changed, though you may add to the end of this list. Note that the order of this list need not correspond with that of the parameter array index. Parameter disk IDs should range from 1 to 9999.
Before calling PF_ADD_PARAM(), specify the disk ID in the PF_ParamDef.uu.id field. If no value is specified, After Effects makes parameters sequential starting with 1. The parameter’s information is tagged with this ID when saved. In this way, After Effects can still understand that, although your “Foobarocity” slider is now the fourth parameter passed, it’s
the same parameter as when it was second. To delete a parameter without forcing re-application, remove the code which creates it and its entry in the parameter array index list. However, do not remove its entry in the disk ID list. To add a new parameter, add an entry in the appropriate location in the parameter array indices list, add the parameter creation code, and append the disk ID to the end of the disk ID enumeration. To re-order, change the parameter array index list and reorder the
parameter creation code appropriately."
Copy link to clipboard
Copied
Hi, Toby,
Thank you very much for your answer!
I have succussfully insert the independent disc ID enum to my code just as you said, and Ae successfully cast them to my new plugins!
Here is what I have done:
BEFORE: (fake code)
ADD_SLIDER(id=1, name="slider1")
ADD_SLIDER(id=2, name="slider2")
ADD_SLIDER(id=3, name="slider3")
AFTER: (fake code)
ADD_SLIDER(id=1, name="slider1")
ADD_CHECKBOX(id=4, name="checkbox1") // newly insert!
ADD_SLIDER(id=2, name="slider2")
ADD_SLIDER(id=3, name="slider3")
Note: The ID in all ADD_SOMETHING macro doesn't mean the ui layout id, it means the disc id as Mr. Toby said.
Hope this post will help you.
ZzStarSound