Skip navigation
jk1m2
Currently Being Moderated

custom importer

Aug 26, 2013 3:34 AM

Tags: #importer_api

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?

Guide.

 
Replies
  • Currently Being Moderated
    Aug 28, 2013 10:17 AM   in reply to jk1m2

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 16, 2013 9:19 PM   in reply to jk1m2

    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.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points