Sidebar

reference:scripting_reference:scripting_objects:customfielddata

The CustomFieldData object is provided to a rename script via the GetNewNameData.custom property. It provides access to the value of any custom fields that your script added to the Rename dialog.

Property Name Return Type Description

<custom field property>

variant

The properties of the CustomFieldData object are entirely determined by the script itself.

In the OnGetCustomFields method, assign the default values of any custom fields you want to the GetCustomFieldData.fields property. The type of each default value controls the type of the property.

The Rename dialog only supports certain types of variables for custom fields, so you must only assign properties of compatible types. Supported types are:

  • Boolean options (True or False) - the variable type must be bool
  • Numeric options - the variable type must be int
  • String options - the variable type must be string
  • Drop-down list - the variable type must be a Vector with an int as the first element (to specify the default selection), and strings for the remaining elements.