vray.VFB

class vray.VFB

Bases: object

A namespace-like class for VFB related methods. It’s associated with one specific VRayRenderer instance and does not affect any other instances.

Attributes

alwaysOnTop

Set the always-on-top state of the V-Ray VFB.

confirmClearImage

Gets/sets whether a confirmation dialog is shown when clearing the image buffer through the VFB “Clear image” button.

interactivity

Gets/sets whether moving and rotating the scene with the mouse in V-Ray VFB is enabled.

layerManager

Returns a VFBLayerManager wrapper object with methods related to VFB layer management.

position

Get/set the V-Ray VFB window position in screen coordinates.

shown

Show/hide V-Ray frame buffer.

size

Get/set the V-Ray VFB window size in pixels.

Methods

__init__()

applySettingsVFB

Fill in the lens effects settings from the SettingsVFB plugin into the VFB GUI.

clearImage

Clears the current image buffer.

enableProgressBar

Enables the progress bar in the VFB window.

fillSettingsVFB

Fill in the lens effects settings from the VFB GUI into the SettingsVFB plugin.

getLayers

Get VFB2 layers as JSON string.

getPersistentState

Get an opaque serialized buffer with the V-Ray VFB Persistent state.

getSettings

Get VFB2 settings as JSON string.

getState

Get an opaque serialized buffer with the V-Ray VFB state.

loadColorCorrectionsPreset

Loads the global state of the color correction controls.

loadImage

Load an image from disk into the framebuffer.

logMessage

Logs a message to the VFB log if it is enabled.

resetState

Reset the V-Ray VFB state as if it was just created.

saveColorCorrectionsPreset

Saves the global state of the color correction controls.

saveImage

Saves the current image directly to file.

setLayers

Set VFB2 layers as JSON string.

setPersistentState

Set the V-Ray VFB Persistent state with data returned from getPersistentState (possibly from a previous session).

setProgressText

Sets a text string to the VFB progress bar. The text is only shown if the progress bar window is enabled. text - Text string to set.

setProgressTextAndValue

Sets a progress text and value to the VFB progress bar The text is only shown if the progress bar window is enabled. text - Text string to set. value - Value to be set in the range of 0..1.

setProgressValue

Sets a progress bar value to the VFB progress bar The text is only shown if the progress bar window is enabled. value - Value to be set in the range of 0..1.

setProjectPath

Set the directory that will be used if “Use project path” is enabled in the History settings.

setSettings

Set VFB2 settings as JSON string.

setState

Set the V-Ray VFB state with data returned from getState (possibly from a previous session).

setTitlePrefix

Sets a prefix string for the VFB window title.

applySettingsVFB()

Fill in the lens effects settings from the SettingsVFB plugin into the VFB GUI. If the plugin does not exist in the scene or its ‘cc_settings’ parameter is empty, nothing is changed.

Returns boolean for success or failure (True: settings were applied, False: nothing was changed)

clearImage()

Clears the current image buffer.

enableProgressBar()

Enables the progress bar in the VFB window. enable - Enable. Default is true.

fillSettingsVFB()

Fill in the lens effects settings from the VFB GUI into the SettingsVFB plugin. The plugin is created if it does not already exist in the scene.

  • instanceName - The name of the new instance if one has to be created. If not set a default autogenerated name is used.

Returns boolean for success or failure

getLayers()

Get VFB2 layers as JSON string.

getPersistentState()

Get an opaque serialized buffer with the V-Ray VFB Persistent state.

getSettings()

Get VFB2 settings as JSON string.

getState()

Get an opaque serialized buffer with the V-Ray VFB state.

loadColorCorrectionsPreset()

Loads the global state of the color correction controls.

  • filename - Path to the preset to be loaded including the ‘.vccglb’ extension.

Returns boolean for success or failure

loadImage()

Load an image from disk into the framebuffer. All image channels are loaded.

  • filename - Path to the image file.

Returns boolean for success or failure

logMessage()

Logs a message to the VFB log if it is enabled. * level - the level of the message (one of the vray.LOGLEVEL_* constants) * message - the text to be logged

resetState()

Reset the V-Ray VFB state as if it was just created.

saveColorCorrectionsPreset()

Saves the global state of the color correction controls.

  • filename - Path to the preset to be saved. Automatically appends ‘.vccglb’ extension.

Returns boolean for success or failure

saveImage()

Saves the current image directly to file.

This call is equivalent to using the VFB save button and supports the same formats.

  • filename, string - target file name. The extension determines the format.

  • options, dict - save options, see below. Can be omitted entirely or partially

Options dict:

  • skipAlpha, bool - do not write the alpha channel into a separate file

  • frameNumber, bool - the current frame number will be appended to the file name(s)

  • noAlpha, bool - do not write the alpha channel together with the color data

  • singleChannel, bool - only a single channel is written to the file (the current one in vfb)

  • skipRGB, bool - do not write the RGB channel into a separate file

  • writeIntegerIDs, bool - (EXR only) write to EXR as integer data

  • multiChannel, bool - create a single multi-channel file if the file format supports it

  • applyColorCorrections, bool - bake the VFB color corrections to the output file

  • compressionType, string - (EXR only) one of ‘noCompression’, ‘runLength’, ‘zipScanline’, ‘zipBlock’, ‘piz’, ‘pxr24’, ‘b44’, ‘b44a’, ‘dwaa’, ‘dwab’

  • bitsPerChannel, int - (EXR only) either 16 or 32

Returns True on success.

setLayers()

Set VFB2 layers as JSON string.

setPersistentState()

Set the V-Ray VFB Persistent state with data returned from getPersistentState (possibly from a previous session).

setProgressText()

Sets a text string to the VFB progress bar. The text is only shown if the progress bar window is enabled.

text - Text string to set.

setProgressTextAndValue()

Sets a progress text and value to the VFB progress bar The text is only shown if the progress bar window is enabled.

text - Text string to set. value - Value to be set in the range of 0..1.

setProgressValue()

Sets a progress bar value to the VFB progress bar The text is only shown if the progress bar window is enabled.

value - Value to be set in the range of 0..1.

setProjectPath()

Set the directory that will be used if “Use project path” is enabled in the History settings.

Returns boolean for success or failure

setSettings()

Set VFB2 settings as JSON string.

setState()

Set the V-Ray VFB state with data returned from getState (possibly from a previous session).

setTitlePrefix()

Sets a prefix string for the VFB window title.

Returns boolean for success or failure

alwaysOnTop

Set the always-on-top state of the V-Ray VFB. No getter available.

confirmClearImage

Gets/sets whether a confirmation dialog is shown when clearing the image buffer through the VFB “Clear image” button.

interactivity

Gets/sets whether moving and rotating the scene with the mouse in V-Ray VFB is enabled.

layerManager

Returns a VFBLayerManager wrapper object with methods related to VFB layer management.

position

Get/set the V-Ray VFB window position in screen coordinates.

shown

Show/hide V-Ray frame buffer.

size

Get/set the V-Ray VFB window size in pixels.