We have a custom importer plugin for premiere CS6.
We dont save a custom file on disk, but we render the frames demanded by Premiere framework on the fly and return the data in imImportImageRec in imImportImage call.
1) The sequence when we create a new instance goes like
imGetPrefs8 - we show a custom entry dialog here - store the result in a global variable which is accessed in imGetInfo8.
imGetInfo8 - with private data pointer (where we store pointer to our custom class which actually renders the data( based on the variable set in imGetPrefs8 )
imImportImage - with private data pointer filled in imGetInfo8 - render here based on the frame number received using the private data.
2) And when we save and load the instance we get a call to imGetInfo8 with the private data( based on which we create a instance of our custom class to render data)
and subsequent calls to imImportImage with the private data filled in imGetInfo8.
3) Now the case comes when we modify the existing instance by double clicking it.
We get a call to imGetPrefs8 but not imGetInfo8.
but we are not able to modify the private data as per user changes done in imGetPrefs8 , as we dont get a call to imGetInfo8.
So the subsequent calls to imImportImage work with the old private data, hence the changes dont reflect.
How should we go about it?
in imGetPrefs8 why don't you check for privateInstance == NULL then create as needed.
If != NULL call your modification function.
imGetInfo89 should only populate the selector struct with info from the private data (already allocated by imGetPrefs8).
I've never looked at the synthetic importer example but this is exactly what you're doing so that should be your starting code to hack on.
The private data (instance data) pointer has to be allocated in imGetInfo and not imGetPrefs.
The pointer which is allocated in inGetInfo is only received in imImportImage not which is allocated in imGetPrefs.
Agreed, it is not ideal that imGetInfo8 is not called (bug # 3010899). Would you be able to workaround it by checking some basic attributes in imImportImage (perhaps by making some comparisons with the prefs) to make sure that your custom class in privateData is up-to-date? If the class is out-of-date, you could modify it before returning from imImportImage.