Notifications
Clear all

[Closed] Either dynamically generating paramblocks or making locals persistent?

Is it possible to either generate paramblocks dynamically in a scripted plugin or making plugin local variables somehow be saved from scene to scene?

EDIT: I guess I could use tabs as parameter arrays.

Also, is it possible to have a Bitmap parameter actually store the bitmap in memory, instead of loading it from disk each time?

1 Reply

I am pretty new to scripted plugins, so I may be shooting way off target.

As your edit suggests I have always used Tab arrays for my parameters that might need expanding, and then combined that with the tabSizeVariable:true to account for additional parameters.

Where I have needed to expand the UI with additional controls for the parameters, I have positioned and detailed the maximum number of controls I could possibly need. For example 10 spinners for a Tab array parameter that I probably think will never expand above 10. Then I have controlled the visibility/enabled inputs to any of these spinners that I dont actually need.

To control visibility/enabled inputs of the UI controls I used the code

on “rollout” open do
(
plugin.rollout.UIcontrol.enabled = false

)

in this code bracket you can execute for loops etc which reference you parameter arrayTab size, to cycle through an activate only the required UI elements. This was kindly shown to me by Magicm. Thanks :). It means that when you select your instance of the plugin your UI can be updated from the code in this block.

I have also found the “closeutility/openutility rollout” very useful for adjusting to different parameter sets when I need to swap around.

If I want local variables to be persistant in plugins, I just build them in to be another parameter, which will then be saved for loading/saving/deselecting etc…

Cant help you with the bitmap thing at the moment. I hope at least some of this is of any use…

Good luck,

EverZen