What is the Property Builder
The property builder is used to enable the setup in modules, with this tool, options are defined for the user.
Use
The property builder can be called up by right-clicking on a module. In this example, we use the PropertiesExample module to show how the different functions are used.
This module is delivered with pixera, but here is the download link, attention the functionality may be limited in older pixera versions.
https://static.helpjuice.com/helpjuice_production/uploads/upload/image/9741/direct/1718638835392/PropertiesExample.json
To open the Property Builder, right-click on the module and select: "Launch Property Builder".
Overview
- The name of the property, this is important for the assignment in the code and for the understanding of the user. Ideally, the name of the property is self-explanatory.
- The value specifies what is entered as the preset, which in many cases can be defined by the user. A value can already be defined in the property builder. If read only is activated, this value can no longer be changed afterwards.
- The type hint determines the type as which the value is saved. This does not necessarily correspond to what can be read in the lua code. Here it can happen that these in lua still have to be converted into the correct format when reading out.
- Read Only defines whether the user can edit this property or not.
- Show Name specifies whether the name of the property is also visible to the user, or whether only the element itself is displayed.
- If “Group” is specified, elements with the same element are grouped together in this category.
- Options Source specifies a path to an action which offers the option of selection as a return. This automatically displays the property in the format of a dropdown window. The format of the reutrn must correspond to a list (one-dimensional array). In the example code of this module, a list is generated from a map, to hide the values that are not useful for the user, behind a meaningful text, so a value can be stored for different elements.
- Options Action is used to call actions for a selection. The selected input is sent to the action. This action can thus be executed directly upon selection. The init function can also be specified here if a module needs to be reinitialized after a change.
The reading of the set value can also be done with the self.helper:getProperty("My Property") function from the helper, this can be done at any time.
- In the "image" tab, a file can be stored which is displayed as an image. Please note that this image is saved directly in the module and can significantly increase the data size of the module.
Creating Properties
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/9741/direct/1718638992834/image.png)
- New properties are added with this element, they will be added below the current selected element.
- This element is used to delete properties.
- This element changes the order of the selected element.
- This element changes the order of the selected element.
- The desired element can be selected in this area.
The “Auto Init” Action
This Auto init action has a special meaning, this property is included in almost all modules and is executed from the C++ part of Pixera when the Lua core is started (rebuilt). This always refers to the name of the property and the action of the module with the name init. If this property is found and set to true, the action of the module with the name "init()" is executed, this is related to the name of the action.
The “uninit” action is always called when the Lua core gets closed or rebuild. This is a related to the name of the action. The "uninit" action is always called regardless of the "Auto Init" property.
Pixera 2.0.108 | 17. June 2024 | J.B.