Properties

Describes the types of properties that can be added to metanode definitions and how their data is stored

Standard Types

Single element value property types

Type

Internal Type

API Function

VR_BOOL

bool

VRAddPropertyBool

VR_CHAR

char

VRAddPropertyChar

VR_INT

int

VRAddPropertyInt

VR_FLOAT

float

VRAddPropertyFloat

VR_DOUBLE

double

VRAddPropertyDouble

VR_WORLD_FLOAT

double (in x64 versions)

VRAddPropertyWorldFloat

VR_LINK

UserClass

VRAddPropertyLink

VR_STRING

const char*

VRAddPropertyString

Array and Vector types

The above properties (except links and strings) can be stored in array or vector properties, too.

An array property is fixed size, defined when the property is added to the metanode.

There are a number of standard array property types such as VRAddPropertyMat3f or VRAddPropertyVec4w, or array properties of arbitrary size can be defined.

Type

Internal Type

API Function

VR_BOOL

bool[]

VRAddPropertyArrayBool

VR_CHAR

char[]

VRAddPropertyArrayChar

VR_INT

int[]

VRAddPropertyArrayInt

VR_FLOAT

float[]

VRAddPropertyArrayFloat

VR_DOUBLE

double[]

VRAddPropertyArrayDouble

VR_WORLD_FLOAT

double[] (in x64 versions)

VRAddPropertyArrayWorldFloat

Vector properties are variable size, allowing data to be added and removed at runtime. This is usually used for storing mesh vertices, etc.

Type

Internal Type

API Function

VR_CHAR

vector(char)

VRAddPropertyVectorChar

VR_INT

vector(int)

VRAddPropertyVectorInt

VR_FLOAT

vector(float)

VRAddPropertyVectorFloat

VR_WORLD_FLOAT

vector(double) (in x64 versions)

VRAddPropertyVectorWorldFloat

VR_STRING

vector(string)

VRAddPropertyVectorString

Semantics and Hints

Properties can be given semantics and gui hints.

Storage

Properties added to a metanode are indexed in the order they are added, however, the internal memory used to store the property data on a specific node instance may be re-arranged to provide more optimal alignment for performance improvement and platform / architecture compatibility. This is transparent to the API.


No Results.

Getting StartedArchitectureBest PracticesHow ToAdvanced TopicsChangelogvrtreevrtree_cppvtCoreCoreForeign Function InterfaceMetanodesMigrationsObserversPropertiesSettingsTreeUtilitiesAPI DefinitionsVR ExchangePluginsLua API