• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Specifying a filename in a plugin dialog

New Here ,
Jul 19, 2007 Jul 19, 2007

Copy link to clipboard

Copied

I'm completely new to AE plugin development, so bear with me. I'm going to attempt to update the AEFlame plugin to the latest version of the flame renderer (AEFlame is now 8 years behind!)...but the most important thing I can see as far as the interface isn't particularly straightforward to implement.

There's already a great flame editor (Apophysis) so there's no need to recreate that in the plugin. What is absolutely essential is that we are able to select a file to use as the source of the flame data (XML), and I can't see a way to do this through standard parameter types. I'd want to change some render settings, but nothing more complex than that - the flame contents would be hidden from the user.

It seems to me like the most elegant solution would be to write support for a new file type (.flame or .flam3) that would permit AE to treat these files as elements of the project - parametric descriptions of bitmap images. Is that correct? Is there an easy way for me to be able to select a file from a dialog within an effects plugin?

Many thanks for any recommendations or assistance.

Regards,
Erik Reckase
flam3dev
TOPICS
SDK

Views

2.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 19, 2007 Jul 19, 2007

Copy link to clipboard

Copied

Sounds like a job for a custom UI ECW param: Draw a button (or whatever UI element you want) within the custom UI and handle the mouse click event on that region/rectangle.

Then call the appropriate OS API to display the File Open dialog and process the user selection. If you want the plugin to be cross-platform on Mac and Windows then you'll need to write conditional platform code; you can use the preprocessor to do so:

#ifdef MSWindows
...
#else
...
#endif

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 22, 2007 Jul 22, 2007

Copy link to clipboard

Copied

Sure, I can do that. I can understand the custom UI part, but what does ECW stand for? Let me ask another few questions, though.

A flame file can contain multiple flames. It would be excellent to allow the user to select which flame in the file to use via a popup menu after the file was loaded. However, in the SDK documentation, it appears that the entries of the popup menu cannot be changed once the parameter is added...but that doesn't say that it can't be removed and then added again. These entries would have to be somehow dynamically changed to reflect the contents of the flame file. I'd also want to have the name of the flame file stored somewhere for reference in the plugin UI.

Also, given that I was not planning on providing access to most of the flame contents to the user, how is this information stored? Would the XML have to be loaded each time that a change to one of the render control variables was made? It seems like the 'memory' of the plugin (what gets stored) is only the contents of the plugin parameters and not any 'auxilliary' data - is that correct?

Thanks for any assistance.

Erik

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 22, 2007 Jul 22, 2007

Copy link to clipboard

Copied

ECW = Effect Control Window (I just meant a custom UI for your effect plugin.)

In addition to painting the "Open" button (or whatever UI element), your custom UI could also paint a drop-down combo box or list box to allow the user to select the appropriate flame item from the chosen file. You could then populate this element dynamically after the user selects the XML file.

Your custom UI could also paint the filename text after the user selects one. And something like "(Select a file)" if the user has not yet chosen one.

You'll need to save your custom UI data in the plugin's sequence data, so that when the project is saved (or a preset is created), the effect retains all of the user's selections. One of the example projects shows how to flatten & unflatten sequence data, can't remember which one off the top of my head but if you search for "flatten" I'm sure you'll find it.

You *could* load the XML file each time you need to render, but it'd be better to cache it and then access that cache each time you need to render.

I'm not sure if an arbitrary data type would be a better/alternative option -- I've not used them myself but they may be worth investigating too.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 23, 2007 Jul 23, 2007

Copy link to clipboard

Copied

http://www.haohecaiwu.cn

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 01, 2007 Aug 01, 2007

Copy link to clipboard

Copied

Erik, if the filename is the same for all frames in a given sequence, then sequence data is the place to store it. Use an options dialog; you can rename the Options button to "pick file" or whatever you like.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 01, 2007 Aug 01, 2007

Copy link to clipboard

Copied

Well, the filename will not necessarily be the same for all frames. My plan right now is to have a checkbox that is used to trigger a file dialog, and then once the file is read, the data will be stored in an arb that is not displayed on the UI. I wasn't planning on displaying the filename, but that might be possible. The flame parameters will be hidden from the user, while the render parameters can be modified, interpolated, etc.

Where is the options dialog documented?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 03, 2007 Aug 03, 2007

Copy link to clipboard

Copied

LATEST
i Where is the options dialog documented?

Search the SDK Guide for PF_Cmd_I_DO_DIALOG.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines