LiveRenderAPI

The LiveRenderAPI Package is used to trigger commands related to Live Rendering in a renderer plug-in.

LiveRenderAPI.AppendTerminalOp(opKey, opType, opArgs)

Appends a terminal Op to the Live Render client.

Parameters
  • opKey (object) – An identifier that can be used to remove the Op later on.

  • opType (str) – The Op type to append to the client.

  • opArgs (GroupAttribute) – Arguments to call the Op with.

LiveRenderAPI.ClearAllTerminalOps()

Clears all of the live rendering terminal ops.

This includes the ones that are added by default from the RendererInfo plugin and implicit resolvers.

LiveRenderAPI.GetTerminalOps()

Returns a list of tuples containing the key, op type and op args of all currently applied terminal ops in the sequence that they are applied.

Return type

list of tuple(opLookupKey, opType, opArgs)

Returns

A list of tuples describing the terminal ops that are currently active on the live render client.

LiveRenderAPI.InsertTerminalOp(opKey, opType, opArgs, insertIndex)

Inserts a terminal Op in to the Live Render client’s op tree.

Parameters
  • opKey (object) – An identifier that can be used to remove the Op later on.

  • opType (str) – The Op type to append to the client.

  • opArgs (GroupAttribute) – Arguments to call the Op.

  • insertIndex (int) – The target index position within the list of terminal ops.

LiveRenderAPI.RemoveTerminalOp(opKey, deferred=False)

Removes a terminal Op with the specified key from the Live Render client.

Parameters
  • opKey (object) – An identifier to a previously appended Op.

  • deferred (bool) – Defer removal after the next update, otherwise immediately.

LiveRenderAPI.RestoreDefaultTerminalOps()

Restores live rendering terminal ops to the defaults as specified in the RendererInfo plug-in.

This includes the removal of any additional ops and the application of implicit resolvers.

LiveRenderAPI.SendCommand(command)

Sends a live render control command to current render plug-in.

Parameters

command (str) – Command to send to the renderer.

LiveRenderAPI.SendData(dataType, locationPath, attributes)

Sends location data to update the Live Render state.

Parameters
  • dataType (str or StringAttribute) – Data type or alias type to trigger an update.

  • locationPath (str or StringAttribute) – Location to apply the update.

  • attributes (GroupAttribute) – The attribute data to send in the update.

LiveRenderAPI.SetLiveAttribute(locationPath, attrPath, attrValue, attrEditor=None)

Sets a change to a Live Attribute at a location, allowing interactive updates at a location during manipulations.

Parameters
  • locationPath (str) – The location to apply a Live Attribute update.

  • attrPath (str) – The root attribute to apply the update to.

  • attrValue (FnAttribute.Attribute) – The attribute value to be set.

  • attrEditor (PyFnAttribute.GroupAttribute or None) – B{attributeEditor} attribute at locationPath.

LiveRenderAPI.SetVirtualCameraAttributes(attributes)

Sets the attributes of a virtual scene graph location camera. This location will be used for sending live updates for virtual (or built-in) viewer cameras.

Parameters

attributes (FnAttribute.GroupAttribute) – The attributes for the virtual camera location.

LiveRenderAPI.PluginActionRegistry.GetRegisteredActionClasses()
Return type

list

Returns

A list of classes that represent actions for the B{Live Rendering} menu.

LiveRenderAPI.PluginActionRegistry.RegisterActionClass(actionClass)

Registers an action class related to Live Rendering.

Parameters

actionClass (type) – A class derived from BaseLiveRenderAction, to be instantiated when populating the B{Live Rendering} menu.