New in 2021.1

This page lists changes in version 2021.1 affecting user-facing APIs.

Lua API - Create Metanodes

We have added various functions for creating your own metanode types from the Lua API. These may look familiar if you have previously used the C API to do this as the functions and their operation are similar.

Function

Description

vrCreateMetaNode

Creates a new metanode

vrFinishMetaNode

Finishes a metanode (call this after creating it and adding properties, etc.)

vrAddPropertyBool

Adds a new boolean property to an unfinished metanode

vrAddPropertyChar

Adds a new character property to an unfinished metanode

vrAddPropertyInt

Adds a new integer property to an unfinished metanode

vrAddPropertyFloat

Adds a new float property to an unfinished metanode

vrAddPropertyDouble

Adds a new double property to an unfinished metanode

vrAddPropertyWorldFloat

Adds a new world float property to an unfinished metanode

vrAddPropertyLink

Adds a new link property to an unfinished metanode

vrAddPropertyString

Adds a new string property to an unfinished metanode

vrAddPropertyVec2i

Adds a new vec2i property to an unfinished metanode

vrAddPropertyVec2f

Adds a new vec2f property to an unfinished metanode

vrAddPropertyVec2d

Adds a new vec2d property to an unfinished metanode

vrAddPropertyVec2w

Adds a new vec2w property to an unfinished metanode

vrAddPropertyVec3i

Adds a new vec3i property to an unfinished metanode

vrAddPropertyVec3f

Adds a new vec3f property to an unfinished metanode

vrAddPropertyVec3d

Adds a new vec3d property to an unfinished metanode

vrAddPropertyVec3w

Adds a new vec3w property to an unfinished metanode

vrAddPropertyVec4i

Adds a new vec4i property to an unfinished metanode

vrAddPropertyVec4f

Adds a new vec4f property to an unfinished metanode

vrAddPropertyVec4d

Adds a new vec4d property to an unfinished metanode

vrAddPropertyVec4w

Adds a new vec4w property to an unfinished metanode

vrAddPropertyMat3f

Adds a new mat3f property to an unfinished metanode

vrAddPropertyMat3d

Adds a new mat3d property to an unfinished metanode

vrAddPropertyMat3w

Adds a new mat3w property to an unfinished metanode

vrAddPropertyMat4f

Adds a new mat4f property to an unfinished metanode

vrAddPropertyMat4d

Adds a new mat4d property to an unfinished metanode

vrAddPropertyMat4w

Adds a new mat4w property to an unfinished metanode

vrAddPropertyArrayBool

Adds a new boolean array property to an unfinished metanode

vrAddPropertyArrayChar

Adds a new character array property to an unfinished metanode

vrAddPropertyArrayInt

Adds a new integer array property to an unfinished metanode

vrAddPropertyArrayFloat

Adds a new float array property to an unfinished metanode

vrAddPropertyArrayDouble

Adds a new double array property to an unfinished metanode

vrAddPropertyArrayWorldFloat

Adds a new world float array property to an unfinished metanode

vrAddPropertyVectorBool

Adds a new boolean vector property to an unfinished metanode

vrAddPropertyVectorChar

Adds a new character vector property to an unfinished metanode

vrAddPropertyVectorInt

Adds a new integer vector property to an unfinished metanode

vrAddPropertyVectorFloat

Adds a new float vector property to an unfinished metanode

vrAddPropertyVectorDouble

Adds a new double vector property to an unfinished metanode

vrAddPropertyVectorWorldFloat

Adds a new world float vector property to an unfinished metanode

vrAddPropertyVectorString

Adds a new string vector property to an unfinished metanode

C API - Create and Observe Settings

We have added various functions for creating and observing settings from the C API.

Function

Description

VRCreateSettingBool

Creates a boolean setting if it doesn't already exist

VRCreateSettingInt

Creates an integer setting if it doesn't already exist

VRCreateSettingArrayInt

Creates an integer array setting if it doesn't already exist

VRCreateSettingFloat

Creates a float setting if it doesn't already exist

VRCreateSettingArrayFloat

Creates a float array setting if it doesn't already exist

VRCreateSettingDouble

Creates a double setting if it doesn't already exist

VRCreateSettingArrayDouble

Creates a double array setting if it doesn't already exist

VRCreateSettingString

Creates a string setting if it doesn't already exist

VRCreateSettingLink

Creates a link setting if it doesn't already exist

VRSetSettingCaption

Assigns a custom caption to a setting, allowing the text displayed to in user interface to be different from the setting name

VRSetSettingRange

Assigns a range to a numeric setting

VRSetSettingStep

Assigns a step size to a numeric setting

VRSetSettingType

Assigns a type to a setting, which determines how the setting is presented in the user interface

VRSetSettingFilter

Assigns a filter to a setting

VRGetSettingSize

Returns the number of bytes required to store a setting's value. For string settings, this includes the terminating null character

VRReadSettingBool

Reads a boolean setting

VRReadSettingInt

Reads an int setting

VRReadSettingArrayInt

Reads an int array setting

VRReadSettingFloat

Reads a float setting

VRReadSettingArrayFloat

Reads a float array setting

VRReadSettingDouble

Reads a double setting

VRReadSettingArrayDouble

Reads a double array setting

VRReadSettingString

Reads a string setting

VRReadSettingLink

Reads a link setting

VRWriteSettingBool

Sets the value of a boolean setting

VRWriteSettingInt

Sets the value of an int setting

VRWriteSettingArrayInt

Sets the value of an int array setting

VRWriteSettingFloat

Sets the value of a float setting

VRWriteSettingArrayFloat

Sets the value of a float array setting

VRWriteSettingDouble

Sets the value of a double setting

VRWriteSettingArrayDouble

Sets the value of a double array setting

VRWriteSettingString

Sets the value of a string setting

VRWriteSettingLink

Sets the value of a link setting

VRGetSettingNode

Gets the VRTree node associated with a setting. If the setting has a scene override, the override node is returned; otherwise, the user setting node is returned

VRGetRootSettingNode

Gets the VRTree node associated with the root of the settings hierarchy

VRGetSceneRootSettingNode

Gets the VRTree node associated with the root of the scene overrides, if present

VRAddSettingToScene

Adds a scene override of a setting (if it doesn't already exist) and copies the value from the user setting to the override

VRRemoveSettingFromScene

Removes a scene override of a setting

VRAddCallbackSettingChanged

Registers a function to be called when a setting value changes

VRRemoveCallbackSettingChanged

Removes a callback that was added with VRAddCallbackSettingChanged()

Other Changes

  • Modified vrNodeArraySet, vrNodeArrayPush and vrNodeArraySetElement so that they accept zero or more values, maths types (vrVec2/3/4, vrMat3/4, etc.), strings containing binary data, or nested tables containing any combination of these.

  • Added an optional parameter to vrNodeArrayPop specifying how many items to pop (defaults to 1).

  • Added vrNodeArrayClear to clear the values held in an array property.

  • Made all the vrNodeArray* functions accept a single VectorPropUD userdata argument as an alternative to the node and property name.


No Results.

Getting StartedArchitectureBest PracticesHow ToAdvanced TopicsChangelogvrtree_cppCoreForeign Function InterfaceMetanodesMigrationsObserversPropertiesSettingsTreeUtilitiesAPI DefinitionsVR ExchangePluginsLua API