defold/extension-rive/rive.cmd
Command queue helpers for interacting with the Rive runtime
- GitHub: defold/extension-rive — pinned to
13.1.0(released while Defold 1.13.1 was current)- Pick a release from defold/extension-rive releases and add its Source code (zip) URL (or a packaged
.zipasset, if the library ships one) togame.projectunder[project]dependencies, then Fetch Libraries in the Defold editor. - Run
bunx @defold-typescript/cli resolveto materialize its types. - Import it under a namespace alias of your choice:
import * as cmd from "rive.cmd"
- Pick a release from defold/extension-rive releases and add its Source code (zip) URL (or a packaged
Functions
rive.cmd.instantiateArtboardNamed(file_handle: FileHandle, artboard_name: string): ArtboardHandlerive.cmd.instantiateDefaultArtboard(file_handle: FileHandle): ArtboardHandlerive.cmd.deleteArtboard(artboard_handle: ArtboardHandle)rive.cmd.instantiateStateMachineNamed(artboard_handle: ArtboardHandle, name: string): StateMachineHandlerive.cmd.instantiateDefaultStateMachine(artboard_handle: ArtboardHandle): StateMachineHandlerive.cmd.advanceStateMachine(state_machine_handle: StateMachineHandle, delta: number)rive.cmd.bindViewModelInstance(state_machine_handle: StateMachineHandle, view_model_handle: ViewModelInstanceHandle)rive.cmd.deleteStateMachine(state_machine_handle: StateMachineHandle)rive.cmd.instantiateBlankViewModelInstance(file_handle: FileHandle, artboard_or_viewmodel: ArtboardHandle | string): ViewModelInstanceHandlerive.cmd.instantiateDefaultViewModelInstance(file_handle: FileHandle, artboard_or_viewmodel: ArtboardHandle | string): ViewModelInstanceHandlerive.cmd.instantiateViewModelInstanceNamed(file_handle: FileHandle, artboard_or_viewmodel: ArtboardHandle | string, instance_name: string): ViewModelInstanceHandlerive.cmd.referenceNestedViewModelInstance(view_model_handle: ViewModelInstanceHandle, path: string): ViewModelInstanceHandlerive.cmd.referenceListViewModelInstance(view_model_handle: ViewModelInstanceHandle, path: string, index: number): ViewModelInstanceHandlerive.cmd.setViewModelInstanceNestedViewModel(view_model_handle: ViewModelInstanceHandle, path: string, nested_handle: ViewModelInstanceHandle)rive.cmd.insertViewModelInstanceListViewModel(view_model_handle: ViewModelInstanceHandle, path: string, nested_handle: ViewModelInstanceHandle, index: number)rive.cmd.appendViewModelInstanceListViewModel(view_model_handle: ViewModelInstanceHandle, path: string, nested_handle: ViewModelInstanceHandle)rive.cmd.swapViewModelInstanceListValues(view_model_handle: ViewModelInstanceHandle, path: string, indexa: number, indexb: number)rive.cmd.removeViewModelInstanceListViewModelIndex(view_model_handle: ViewModelInstanceHandle, path: string, index: number)rive.cmd.removeViewModelInstanceListViewModel(view_model_handle: ViewModelInstanceHandle, path: string, nested_handle: ViewModelInstanceHandle)rive.cmd.deleteViewModelInstance(view_model_handle: ViewModelInstanceHandle)rive.cmd.fireViewModelTrigger(view_model_handle: ViewModelInstanceHandle, trigger_path: string)rive.cmd.setViewModelInstanceBool(view_model_handle: ViewModelInstanceHandle, path: string, value: boolean)rive.cmd.setViewModelInstanceNumber(view_model_handle: ViewModelInstanceHandle, path: string, value: number)rive.cmd.setViewModelInstanceColor(view_model_handle: ViewModelInstanceHandle, path: string, vector4_color: vector4)rive.cmd.setViewModelInstanceEnum(view_model_handle: ViewModelInstanceHandle, path: string, enum_string: string)rive.cmd.setViewModelInstanceString(view_model_handle: ViewModelInstanceHandle, path: string, string_value: string)rive.cmd.setViewModelInstanceImage(view_model_handle: ViewModelInstanceHandle, path: string, render_image_handle: RenderImageHandle)rive.cmd.setViewModelInstanceArtboard(view_model_handle: ViewModelInstanceHandle, path: string, artboard_handle: ArtboardHandle)rive.cmd.getViewModelInstanceBool(view_model_handle: ViewModelInstanceHandle, path: string): booleanrive.cmd.getViewModelInstanceNumber(view_model_handle: ViewModelInstanceHandle, path: string): numberrive.cmd.getViewModelInstanceColor(view_model_handle: ViewModelInstanceHandle, path: string): vector4rive.cmd.getViewModelInstanceEnum(view_model_handle: ViewModelInstanceHandle, path: string): stringrive.cmd.getViewModelInstanceString(view_model_handle: ViewModelInstanceHandle, path: string): stringrive.cmd.getViewModelInstanceListSize(view_model_handle: ViewModelInstanceHandle, path: string): numberrive.cmd.subscribeToViewModelProperty(view_model_handle: ViewModelInstanceHandle, path: string, data_type: constant)rive.cmd.unsubscribeToViewModelProperty(view_model_handle: ViewModelInstanceHandle, path: string, data_type: constant)rive.cmd.loadFile(riv_bytes: string): FileHandlerive.cmd.deleteFile(file_handle: FileHandle)rive.cmd.decodeImage(image_bytes: string): RenderImageHandlerive.cmd.deleteImage(image_handle: RenderImageHandle)rive.cmd.decodeAudio(audio_bytes: string): AudioSourceHandlerive.cmd.deleteAudio(audio_handle: AudioSourceHandle)rive.cmd.decodeFont(font_bytes: string): FontHandlerive.cmd.deleteFont(font_handle: FontHandle)rive.cmd.addGlobalImageAsset(asset_name: string, render_image_handle: RenderImageHandle)rive.cmd.removeGlobalImageAsset(asset_name: string)rive.cmd.addGlobalAudioAsset(asset_name: string, audio_handle: AudioSourceHandle)rive.cmd.removeGlobalAudioAsset(asset_name: string)rive.cmd.addGlobalFontAsset(asset_name: string, font_handle: FontHandle)rive.cmd.removeGlobalFontAsset(asset_name: string)rive.cmd.requestViewModelNames(file_handle: FileHandle)rive.cmd.requestArtboardNames(file_handle: FileHandle)rive.cmd.requestViewModelInstanceViewModelName(instance_handle: ViewModelInstanceHandle)rive.cmd.requestViewModelEnums(file_handle: FileHandle)rive.cmd.requestViewModelPropertyDefinitions(file_handle: FileHandle, viewmodel_name: string)rive.cmd.requestViewModelInstanceNames(file_handle: FileHandle, viewmodel_name: string)rive.cmd.requestViewModelInstanceBool(instance_handle: ViewModelInstanceHandle, property_name: string)rive.cmd.requestViewModelInstanceNumber(instance_handle: ViewModelInstanceHandle, property_name: string)rive.cmd.requestViewModelInstanceColor(instance_handle: ViewModelInstanceHandle, property_name: string)rive.cmd.requestViewModelInstanceEnum(instance_handle: ViewModelInstanceHandle, property_name: string)rive.cmd.requestViewModelInstanceString(instance_handle: ViewModelInstanceHandle, property_name: string)rive.cmd.requestViewModelInstanceListSize(instance_handle: ViewModelInstanceHandle, property_name: string)rive.cmd.requestViewModelInstanceListClear(view_model_handle: ViewModelInstanceHandle, path: string)rive.cmd.requestStateMachineNames(artboard_handle: ArtboardHandle)rive.cmd.requestDefaultViewModelInfo(artboard_handle: ArtboardHandle, file_handle: FileHandle)
rive.cmd.instantiateArtboardNamed(file_handle: FileHandle, artboard_name: string): ArtboardHandle
Returns the artboard handle created for the named artboard.
Parameters
file_handle:FileHandle— Handle to a previously loaded Rive file.artboard_name:string— Name of the artboard to instantiate.
Returns
artboard_handle:ArtboardHandle— Artboard handle created for the named artboard.
rive.cmd.instantiateDefaultArtboard(file_handle: FileHandle): ArtboardHandle
Returns the default artboard handle for the file.
Parameters
file_handle:FileHandle— Handle to a previously loaded Rive file.
Returns
artboard_handle:ArtboardHandle— Default artboard handle for the file.
rive.cmd.deleteArtboard(artboard_handle: ArtboardHandle)
Deletes an instantiated artboard.
Parameters
artboard_handle:ArtboardHandle— Handle to the artboard that should be removed.
rive.cmd.instantiateStateMachineNamed(artboard_handle: ArtboardHandle, name: string): StateMachineHandle
Creates a named state machine for the provided artboard.
Parameters
artboard_handle:ArtboardHandle— Artboard where the state machine resides.name:string— Name to assign to the new state machine.
Returns
state_machine_handle:StateMachineHandle— Handle referencing the created state machine.
rive.cmd.instantiateDefaultStateMachine(artboard_handle: ArtboardHandle): StateMachineHandle
Creates the default state machine for an artboard.
Parameters
artboard_handle:ArtboardHandle— Artboard used as the source for the state machine.
Returns
state_machine_handle:StateMachineHandle— Handle referencing the created state machine.
rive.cmd.advanceStateMachine(state_machine_handle: StateMachineHandle, delta: number)
Advances the state machine by the requested delta time.
Parameters
state_machine_handle:StateMachineHandle— State machine to advance.delta:number— Time in seconds to advance the state machine.
rive.cmd.bindViewModelInstance(state_machine_handle: StateMachineHandle, view_model_handle: ViewModelInstanceHandle)
Binds the state machine to the provided view model instance.
Parameters
state_machine_handle:StateMachineHandle— State machine handle.view_model_handle:ViewModelInstanceHandle— View model instance handle.
rive.cmd.deleteStateMachine(state_machine_handle: StateMachineHandle)
Deletes a created state machine.
Parameters
state_machine_handle:StateMachineHandle— Handle to the state machine to delete.
rive.cmd.instantiateBlankViewModelInstance(file_handle: FileHandle, artboard_or_viewmodel: ArtboardHandle | string): ViewModelInstanceHandle
Returns a blank view model instance handle for the given artboard or view model.
Parameters
file_handle:FileHandle— Handle to a previously loaded Rive file.artboard_or_viewmodel:ArtboardHandle | string— Artboard handle or view model name that identifies where to instantiate.
Returns
view_model_instance_handle:ViewModelInstanceHandle— Blank view model instance handle.
rive.cmd.instantiateDefaultViewModelInstance(file_handle: FileHandle, artboard_or_viewmodel: ArtboardHandle | string): ViewModelInstanceHandle
Returns a default-populated view model instance handle for the given artboard or view model.
Parameters
file_handle:FileHandle— Handle to a previously loaded Rive file.artboard_or_viewmodel:ArtboardHandle | string— Artboard handle or view model name the instance should derive from.
Returns
view_model_instance_handle:ViewModelInstanceHandle— Default view model instance handle.
rive.cmd.instantiateViewModelInstanceNamed(file_handle: FileHandle, artboard_or_viewmodel: ArtboardHandle | string, instance_name: string): ViewModelInstanceHandle
Creates a named view model instance and returns its handle.
Parameters
file_handle:FileHandle— Handle to a previously loaded Rive file.artboard_or_viewmodel:ArtboardHandle | string— Artboard handle or view model name that will host the instance.instance_name:string— Name to assign to the new view model instance.
Returns
view_model_instance_handle:ViewModelInstanceHandle— Named view model instance handle.
rive.cmd.referenceNestedViewModelInstance(view_model_handle: ViewModelInstanceHandle, path: string): ViewModelInstanceHandle
Returns a handle to the nested view model at the given path.
Parameters
view_model_handle:ViewModelInstanceHandle— Parent view model instance handle.path:string— Dot-delimited path to the nested view model.
Returns
view_model_handle:ViewModelInstanceHandle— Handle to the nested view model.
rive.cmd.referenceListViewModelInstance(view_model_handle: ViewModelInstanceHandle, path: string, index: number): ViewModelInstanceHandle
Returns the handle for the list entry at the specified path and index.
Parameters
view_model_handle:ViewModelInstanceHandle— Parent view model instance handle.path:string— Dot-delimited path to the list view model.index:number— Index within the list entry to reference. 0️⃣ 0-based; passed torive.cmdunchanged.
Returns
view_model_handle:ViewModelInstanceHandle— Handle to the referenced list entry.
rive.cmd.setViewModelInstanceNestedViewModel(view_model_handle: ViewModelInstanceHandle, path: string, nested_handle: ViewModelInstanceHandle)
Replaces the nested view model at the given path with the supplied handle.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance whose nested child is updated.path:string— Path to the nested view model.nested_handle:ViewModelInstanceHandle— Handle of the nested view model to attach.
rive.cmd.insertViewModelInstanceListViewModel(view_model_handle: ViewModelInstanceHandle, path: string, nested_handle: ViewModelInstanceHandle, index: number)
Inserts a nested view model into the list at the given index.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance owning the list.path:string— Path to the target list.nested_handle:ViewModelInstanceHandle— Handle of the view model to insert.index:number— Destination index for the insertion. 0️⃣ 0-based; passed torive.cmdunchanged.
rive.cmd.appendViewModelInstanceListViewModel(view_model_handle: ViewModelInstanceHandle, path: string, nested_handle: ViewModelInstanceHandle)
Appends a nested view model to the list at the specified path.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance owning the list.path:string— Path to the target list.nested_handle:ViewModelInstanceHandle— Handle of the view model to append.
rive.cmd.swapViewModelInstanceListValues(view_model_handle: ViewModelInstanceHandle, path: string, indexa: number, indexb: number)
Swaps two entries in the nested list.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance that owns the list.path:string— Path to the nested list.indexa:number— First index to swap. 0️⃣ 0-based; passed torive.cmdunchanged.indexb:number— Second index to swap. 0️⃣ 0-based; passed torive.cmdunchanged.
rive.cmd.removeViewModelInstanceListViewModelIndex(view_model_handle: ViewModelInstanceHandle, path: string, index: number)
Removes the entry at the supplied index from the nested list.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance owning the list.path:string— Path to the target list.index:number— Index of the entry to remove. 0️⃣ 0-based; passed torive.cmdunchanged.
rive.cmd.removeViewModelInstanceListViewModel(view_model_handle: ViewModelInstanceHandle, path: string, nested_handle: ViewModelInstanceHandle)
Removes the specified nested view model from the list at the path.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance owning the list.path:string— Path to the target list.nested_handle:ViewModelInstanceHandle— Handle of the view model to remove.
rive.cmd.deleteViewModelInstance(view_model_handle: ViewModelInstanceHandle)
Deletes the view model instance handle.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance to delete.
rive.cmd.fireViewModelTrigger(view_model_handle: ViewModelInstanceHandle, trigger_path: string)
Fires a trigger on the view model instance.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance handle.trigger_path:string— Trigger path to activate.
rive.cmd.setViewModelInstanceBool(view_model_handle: ViewModelInstanceHandle, path: string, value: boolean)
Updates the boolean property at the path.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance handle.path:string— Path to the boolean property.value:boolean— New boolean value.
rive.cmd.setViewModelInstanceNumber(view_model_handle: ViewModelInstanceHandle, path: string, value: number)
Updates the numeric property at the path.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance handle.path:string— Path to the numeric property.value:number— New numeric value.
rive.cmd.setViewModelInstanceColor(view_model_handle: ViewModelInstanceHandle, path: string, vector4_color: vector4)
Updates the color property using the supplied vector.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance handle.path:string— Path to the color property.vector4_color:vector4— Color encoded as a Defold Vector4 (WXYZ).
rive.cmd.setViewModelInstanceEnum(view_model_handle: ViewModelInstanceHandle, path: string, enum_string: string)
Updates the enum property at the path.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance handle.path:string— Path to the enum property.enum_string:string— Enum name to select.
rive.cmd.setViewModelInstanceString(view_model_handle: ViewModelInstanceHandle, path: string, string_value: string)
Updates the string property at the path.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance handle.path:string— Path to the string property.string_value:string— New string value.
rive.cmd.setViewModelInstanceImage(view_model_handle: ViewModelInstanceHandle, path: string, render_image_handle: RenderImageHandle)
Updates the image property at the path.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance handle.path:string— Path to the image property.render_image_handle:RenderImageHandle— Render image handle to assign.
rive.cmd.setViewModelInstanceArtboard(view_model_handle: ViewModelInstanceHandle, path: string, artboard_handle: ArtboardHandle)
Updates the artboard reference at the path.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance handle.path:string— Path to the artboard reference.artboard_handle:ArtboardHandle— Artboard handle to assign.
rive.cmd.getViewModelInstanceBool(view_model_handle: ViewModelInstanceHandle, path: string): boolean
Returns the cached boolean property at the path.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance handle.path:string— Path to the boolean property.
Returns
value:boolean— Cached value. Raises error if unavailable.
rive.cmd.getViewModelInstanceNumber(view_model_handle: ViewModelInstanceHandle, path: string): number
Returns the cached numeric property at the path.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance handle.path:string— Path to the numeric property.
Returns
value:number— Cached value. Raises error if unavailable.
rive.cmd.getViewModelInstanceColor(view_model_handle: ViewModelInstanceHandle, path: string): vector4
Returns the cached color property at the path.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance handle.path:string— Path to the color property.
Returns
value:vector4— Cached color. Raises error if unavailable.
rive.cmd.getViewModelInstanceEnum(view_model_handle: ViewModelInstanceHandle, path: string): string
Returns the cached enum property at the path.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance handle.path:string— Path to the enum property.
Returns
value:string— Cached enum name. Raises error if unavailable.
rive.cmd.getViewModelInstanceString(view_model_handle: ViewModelInstanceHandle, path: string): string
Returns the cached string property at the path.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance handle.path:string— Path to the string property.
Returns
value:string— Cached value. Raises error if unavailable.
rive.cmd.getViewModelInstanceListSize(view_model_handle: ViewModelInstanceHandle, path: string): number
Returns the cached list size for the path.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance handle.path:string— Path to the list property.
Returns
value:number— Cached list size. Raises error if unavailable.
rive.cmd.subscribeToViewModelProperty(view_model_handle: ViewModelInstanceHandle, path: string, data_type: constant)
Subscribes for updates to the named property.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance handle.path:string— Path to the property to subscribe.data_type:constant— Data type identifier from rive::DataType.
rive.cmd.unsubscribeToViewModelProperty(view_model_handle: ViewModelInstanceHandle, path: string, data_type: constant)
Cancels a previous subscription.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance handle.path:string— Path to the property.data_type:constant— Data type identifier previously subscribed.
rive.cmd.loadFile(riv_bytes: string): FileHandle
Loads Rive bytes and returns a file handle.
Parameters
riv_bytes:string— Raw Rive file data.
Returns
file_handle:FileHandle— Loaded Rive file handle.
rive.cmd.deleteFile(file_handle: FileHandle)
Deletes the runtime file handle.
Parameters
file_handle:FileHandle— File handle to delete.
rive.cmd.decodeImage(image_bytes: string): RenderImageHandle
Decodes image bytes and returns a render image handle.
Parameters
image_bytes:string— Encoded image data.
Returns
render_image_handle:RenderImageHandle— Decoded render image handle.
rive.cmd.deleteImage(image_handle: RenderImageHandle)
Deletes the render image handle.
Parameters
image_handle:RenderImageHandle— Render image handle to delete.
rive.cmd.decodeAudio(audio_bytes: string): AudioSourceHandle
Decodes audio bytes and returns an audio source handle.
Parameters
audio_bytes:string— Encoded audio data.
Returns
audio_handle:AudioSourceHandle— Decoded audio source handle.
rive.cmd.deleteAudio(audio_handle: AudioSourceHandle)
Deletes the audio source handle.
Parameters
audio_handle:AudioSourceHandle— Audio source handle to delete.
rive.cmd.decodeFont(font_bytes: string): FontHandle
Decodes font bytes and returns a font handle.
Parameters
font_bytes:string— Encoded font data.
Returns
font_handle:FontHandle— Decoded font handle.
rive.cmd.deleteFont(font_handle: FontHandle)
Deletes the font handle.
Parameters
font_handle:FontHandle— Font handle to delete.
rive.cmd.addGlobalImageAsset(asset_name: string, render_image_handle: RenderImageHandle)
Registers a global image asset.
Parameters
asset_name:string— Name used to reference the global asset.render_image_handle:RenderImageHandle— Render image handle to register.
rive.cmd.removeGlobalImageAsset(asset_name: string)
Unregisters the named global image asset.
Parameters
asset_name:string— Name of the asset to remove.
rive.cmd.addGlobalAudioAsset(asset_name: string, audio_handle: AudioSourceHandle)
Registers a global audio asset.
Parameters
asset_name:string— Name used to reference the global audio.audio_handle:AudioSourceHandle— Audio source handle to register.
rive.cmd.removeGlobalAudioAsset(asset_name: string)
Unregisters the named global audio asset.
Parameters
asset_name:string— Name of the audio asset to remove.
rive.cmd.addGlobalFontAsset(asset_name: string, font_handle: FontHandle)
Registers a global font asset.
Parameters
asset_name:string— Name used to reference the global font.font_handle:FontHandle— Font handle to register.
rive.cmd.removeGlobalFontAsset(asset_name: string)
Unregisters the named global font asset.
Parameters
asset_name:string— Name of the font asset to remove.
rive.cmd.requestViewModelNames(file_handle: FileHandle)
Requests view model names for the file.
Parameters
file_handle:FileHandle— File handle whose view models to query.
rive.cmd.requestArtboardNames(file_handle: FileHandle)
Requests artboard names for the file.
Parameters
file_handle:FileHandle— File handle whose artboards to query.
rive.cmd.requestViewModelInstanceViewModelName(instance_handle: ViewModelInstanceHandle)
Requests the view model name used by the view model instance.
Parameters
instance_handle:ViewModelInstanceHandle— View model instance handle to query.
rive.cmd.requestViewModelEnums(file_handle: FileHandle)
Requests enum definitions for the file.
Parameters
file_handle:FileHandle— File handle whose enums to query.
rive.cmd.requestViewModelPropertyDefinitions(file_handle: FileHandle, viewmodel_name: string)
Requests property definitions for the view model.
Parameters
file_handle:FileHandle— File handle whose view models to query.viewmodel_name:string— View model name whose property metadata to request.
rive.cmd.requestViewModelInstanceNames(file_handle: FileHandle, viewmodel_name: string)
Requests instance names for the view model.
Parameters
file_handle:FileHandle— File handle whose view models to query.viewmodel_name:string— View model name to inspect.
rive.cmd.requestViewModelInstanceBool(instance_handle: ViewModelInstanceHandle, property_name: string)
Requests the boolean value for the property.
Parameters
instance_handle:ViewModelInstanceHandle— View model instance handle.property_name:string— Name of the bool property.
rive.cmd.requestViewModelInstanceNumber(instance_handle: ViewModelInstanceHandle, property_name: string)
Requests the numeric value for the property.
Parameters
instance_handle:ViewModelInstanceHandle— View model instance handle.property_name:string— Name of the numeric property.
rive.cmd.requestViewModelInstanceColor(instance_handle: ViewModelInstanceHandle, property_name: string)
Requests the color value for the property.
Parameters
instance_handle:ViewModelInstanceHandle— View model instance handle.property_name:string— Name of the color property.
rive.cmd.requestViewModelInstanceEnum(instance_handle: ViewModelInstanceHandle, property_name: string)
Requests the enum value for the property.
Parameters
instance_handle:ViewModelInstanceHandle— View model instance handle.property_name:string— Name of the enum property.
rive.cmd.requestViewModelInstanceString(instance_handle: ViewModelInstanceHandle, property_name: string)
Requests the string value for the property.
Parameters
instance_handle:ViewModelInstanceHandle— View model instance handle.property_name:string— Name of the string property.
rive.cmd.requestViewModelInstanceListSize(instance_handle: ViewModelInstanceHandle, property_name: string)
Requests the list size for the property.
Parameters
instance_handle:ViewModelInstanceHandle— View model instance handle.property_name:string— Name of the list property.
rive.cmd.requestViewModelInstanceListClear(view_model_handle: ViewModelInstanceHandle, path: string)
Clears all entries from the nested list at the path.
Parameters
view_model_handle:ViewModelInstanceHandle— View model instance owning the list.path:string— Path to the target list.
rive.cmd.requestStateMachineNames(artboard_handle: ArtboardHandle)
Requests state machine names for the artboard.
Parameters
artboard_handle:ArtboardHandle— Artboard handle to query.
rive.cmd.requestDefaultViewModelInfo(artboard_handle: ArtboardHandle, file_handle: FileHandle)
Requests metadata about the default view model or artboard.
Parameters
artboard_handle:ArtboardHandle— Artboard handle to query.file_handle:FileHandle— File handle providing metadata.