Quick Sign In:  

Forum: VirtualDJ Plugins

Topic: Adding parameters after OnLoad
The plugin I'm building has two loading stages.

1. Engine Loading - Happens when the DLL is loaded
2. File Loading - Where all the major initialization happens.

Currently 1 happens in the OnLoad function as it has to present to the user a window to select a file to open. Once that happens it goes through 2. when the plugin is activated for the first time. Is it possible to call DeclareParameter outside of OnLoad? Depending on the file selected it would change the exposed parameters.
 

Posted Wed 10 Jan 24 @ 2:36 am
AdionPRO InfinityCTOMember since 2006
It was not really designed with that in mind, but I think adding new parameters should work fine.
It's not possible to modify or remove any parameters that have already been declared though, and if the interface for the plugin was already shown, it would have to be closed and reopened to show the new parameters.
 

Posted Wed 10 Jan 24 @ 4:42 am
So I did some testing with this and it does work as you said. In my case initially removing parameters wouldn't happen often. It would be a nice feature to be able to dynamically add and remove parameters. In the plugin I'm building it loads in patch files which can each have their own different parameters specified.
 

Posted Fri 12 Jan 24 @ 7:50 pm