Skip to content

config.xml Part Selector

daniel-flassig edited this page Jun 24, 2020 · 10 revisions

A part selector extension creates a button in the pytha part selection user interface. The extension may add to or remove parts from the selection.

Declaration of a part-selector extension in the config.xml:

<extension type="part-selector">
    <entry-point>change_selection</entry-point>
    <caption>Button Caption</caption>
    <description>A short description what this button does.</description>
</extension>

The following information can be supplied:

  • entry-point - (Mandatory) Name of the lua function that is invoked when the user presses the button.
  • caption - (Mandatory) The text that is displayed on the button. This text is translatable in the .xlif file.
  • description - A short descriptive text that is displayed when the user hovers over the button with the mouse. This text is translatable in the .xlif file.

The entry-point is invoked with one argument

change_selection(selection)
Parameter Type Description
selection table A table of element handles of the selected parts.

To modify the selection, change the content of the selection table.

There is no return value

See also:

config.xml, Function Extension, Edit Extension, Attribute Extension, Element Handles, Anatomy of a Lua Api Plugin, Localization and Translation

Clone this wiki locally