Rename bug?: Custom fields not accessible on first access

DO 12.2.3

Hello.. I just noticed that the custom fields in a rename dialog isn't accessible
for reading before the script has been saved and you doubleclick it, or you
click refresh preview twice.

To reproduce:

  • Open the rename dialog (do not doubleclick a preset)
  • Click Edit (script)
  • Replace the contents of the script window with this JScript code:

[code]function OnGetCustomFields(getCustomFieldData){

function OnGetNewName(getNewNameData){
return getNewNameData.custom.test+getNewNameData.newname;

  • Click Refresh Preview

The first time you click Refresh Preview, custom.test will be undefined.
When you repeat it, it will use the specified default. If the variabletype
is a vector the script will crash with a subscript out of range the first time.

After you've refreshed once you'll have to close the rename dialog and
reopen it to make it happen again.

Unless you already had an open script (by doubleclicking a preset before pasting the code) any
changes to the field(s) seems to be ignored on the following refreshes.

This is an issue because quite often I don't save a preset before some progress
has been made, so I ended up scratching my head for some time until I found
the apparent reason for the strange error/malfunction.

As I mentioned, this doesn't seem to happen when the preset has been saved
and it is doubleclicked.
(is there a way to make a single-click load an existing preset?)

Thanks, this will be fixed in the next update.

You should find that fixed in Opus 12.2.4 beta which is now available. Thanks for the report!

It seems to work as expected so far.. :slight_smile: