Contact Us

CATEGORIES

Whoops…Nothing found

Try other keywords in your search

Property Builder

 2 Minutes

 0 Likes

 505 Views

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

  1.  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.
     
  2. 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.
     
  3. 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.
     
  4. Read Only defines whether the user can edit this property or not.
     
  5. Show Name specifies whether the name of the property is also visible to the user, or whether only the element itself is displayed. 
     
  6. If “Group” is specified, elements with the same element are grouped together in this category.
     
  7. 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.


     
  8. 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.
     
  9.  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

  1. New properties are added with this element, they will be added below the current selected element.
  2. This element is used to delete properties.
  3. This element changes the order of the selected element.
  4. This element changes the order of the selected element.
  5. 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.

Was this article helpful?