Aller au contenu

Custom attributes

Custom attributes are information attached to certain types of nodes. The attribute list is accessible via the "Custom Attributes" tab of the selected node's property panel.

Image title 2

The custom attributes panel.

Custom Attributes

Custom attributes are not available for all VRmaze entities. For example, lists do not have custom attributes.

Principle

Each VRmaze node type has a default fixed structure. It may be interesting to attach additional information to a particular node. It then becomes possible to use the attribute value in various use cases, including expressions or scripts.

Attribute name

It is possible to change the default name of the added attribute. It then becomes easier to give it a meaning.

Several attributes of the same type on the same node

It is quite possible to have the same custom attribute type multiple times.

Attribute type

Attributes can be of several types, here is the list:

  • Boolean value
  • Integer value
  • Floating number
  • Color
  • Text
  • 2D Vector [X,Y]
  • 3D vector [X,Y,Z]

Use with expressions

It is possible to reference a custom attribute in a mathematical expression. Just as time is referenced by [T], the reference to the attribute is by its name [Attribute_name].

Image title 2

The declaration of the attribute with a specific name.

Image title 2

The use of a custom attribute value in a formula.

Attribute Type

Attribute types are restricted for use in mathematical expressions. Indeed, only numbers are usable: Floating and Integer.

Programmed attributes

Some attributes called "Programmed" are custom attributes having a consequence on the protocol. Indeed, these attributes are recognized by the software which will use the value of their parameter to produce an action (when a parameter is necessary).

Node duplication during transmission

The "Repeater" attribute allows to duplicate a node on the fly, during the run. It is thus possible to create a single trial of an experiment and to duplicate the same trial several times by placing the Repeater attribute on the trial in question. This attribute is also available for an experimentation or any other VRmaze node with custom attributes outside of the Protocol.

Using the Built-in renderer for a specific protocol

VRmaze supports both URP and Builtin renderers. By default, the URP renderer is used. However, it is possible to force VRmaze to use the old renderer occasionally by adding an attribute "Old Render mode" on the protocol. This attribute is only available on the Protocol entity.

Render effect

Since VRmaze 2023 camera rendering effects are converted to custom attributes.