Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


RhinoScriptComputeDeviceInfo

A structure packing all details for a GPU compute device into a single block

Property Name

Description

Name

The name of the device

UseForRendering

Specifies whether the device is to be used for rendering or not

 


Name

Name of the device

 

Syntax:

BSTR Name

Examples:

Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Tabs Page
titleRhino Python


import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
cudaDevices = vray.GetDeviceList(1)
name = cudaDevices[0].Name()

Tabs Page
titleRhino Python 2


import rhVRay as vray

cudaDevices = vray.GetDeviceList(vray.RenderEngines.RE_CUDA)
name = cudaDevices[0].Name

 

...

 

Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script


Option Explicit

Dim vray, imgWidthParam, paramType
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
Set imgWidthParam = vray.Scene.Plugin("/SettingsOutput").Param("img_width")
paramType = imgWidthParam.Type

Tabs Page
titleRhino Python


import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
param = vray.Scene().Plugin("/SettingsOutput").Param("img_width")
paramType = param.Type()

Tabs Page
titleRhino Python 2


import rhVRay as vray

paramType = vray.Scene.SettingsOutput.Param("img_width").Type

 


 

TypeAsString

Returns the data type of the parameter as string. 

 

Syntax:

BSTR TypeAsString

Examples:

 

Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, imgWidthParam, paramType
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
Set imgWidthParam = vray.Scene.Plugin("/SettingsOutput").Param("img_width")
paramType = imgWidthParam.TypeAsString

Tabs Page
titleRhino Python


import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
param = vray.Scene().Plugin("/SettingsOutput").Param("img_width")
paramType = param.TypeAsString()

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

 

paramType = vray.Scene.SettingsOutput.Param("img_width").TypeAsString

 



RhinoScriptScenePlugin


Represents a reference to a NeUI plugin

Property NameDescription
ParamsReturns an array of references to all parameters for the current plugin
ParamNamesReturns an array of strings of all parameter names in the current plugin
NameReturns the name of the plugin
CategoryReturns the category of the plugin
TypeReturns the type of the plugin

 

 

Method NameDescription
ParamReturns a reference to a given plugin parameter
 



Params

Returns an array of references to all parameters for the current plugin


Syntax:

VARIANT Params

Examples:

 

Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, params
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
params = vray.Scene.Plugin("/SettingsOutput").Params

Tabs Page
titleRhino Python


import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
params = vray.Scene().Plugin("/SettingsOutput").Params()

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

params = vray.Scene.SettingsOutput.Params

 

 



ParamNames

Returns an array of strings of all parameter names in the current plugin


Syntax:

VARIANR ParamNames

Examples:

 

Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, paramNames
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
paramNames = vray.Scene.Plugin("/SettingsOutput").ParamNames

Tabs Page
titleRhino Python


import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
paramNames = vray.Scene().Plugin("/SettingsOutput").ParamNames()

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

paramNames = vray.Scene.SettingsOutput.ParamNames

 

 



Name

Returns the name of the plugin


Syntax:

BSTR Name

Examples:

 

Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, pluginName
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
pluginName = vray.Scene.Plugin("/SettingsOutput").Name

Tabs Page
titleRhino Python


import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
pluginName = vray.Scene().Plugin("/SettingsOutput").Name()

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

pluginName = vray.Scene.SettingsOutput.Name

 

 



Category

Returns the category of the plugin


Syntax:

BSTR Category

Examples:

 

Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, pluginCategory
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
pluginCategory = vray.Scene.Plugin("/SettingsOutput").Category

Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
pluginCategory = vray.Scene().Plugin("/SettingsOutput").Category()

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

pluginCategory = vray.Scene.SettingsOutput.Category

 



Type

Returns the type of the plugin

Syntax:

BSTR Type

Examples:

Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, pluginType
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
pluginType = vray.Scene.Plugin("/SettingsOutput").Type

Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
pluginType = vray.Scene().Plugin("/SettingsOutput").Type()

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

pluginType = vray.Scene.SettingsOutput.Type

 

 



Param

Returns a reference to a given plugin parameter


Syntax:

RhinoScriptSceneParam *Param(
[in, string] BSTR paramName
)
 

Parameters: 

[in] BSTR paramName : Name of the parameter to get

 

Return: 

RhinoScriptSceneParam

Examples:

 

Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, imgWidth
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
imgWidth = vray.Scene.Plugin("/SettingsOutput").Param("img_width")

Tabs Page
titleRhino Python


import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
imgWidth = vray.Scene().Plugin("/SettingsOutput").Param("img_width")

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

imgWidth = vray.Scene.SettingsOutput.Param("img_width")

 

 


RhinoScriptScene

Represents the NeUI scene

 

Method NameDescription
PluginsReturns an array of references to all plugins in the scene
PluginNamesReturns an array of strings of all plugin names in the scene


Method NameDescription
PluginReturns a reference to a given scene plugin
PluginFromObjectReturns a reference to a plugin that is linked to an Rhino model object, given by ID
PluginsByTypeReturns an array of references to all plugins of a given type in the scene
PluginsByCategoryReturns an array of references to all plugins of a given category in the scene
RefreshRefreshes the NeUI window
MaterialsGets an array of all material plugins in the scene
LightsGets an array of all light plugins in the scene
SettingsGets an array of all settings plugins in the scene
SpecialObjectsGets an array of all special object plugins (proxies, clippers, furs and infinite planes) in the scene
LoadSettingsLoads a given .vropt file into the scene. The default file will be loaded on failure
SaveSettingsSaves the current settings into a given .vropt file
BeginChangeOpens a transaction to modify the scene. Call EndChange() when done modifying the scene
EndChangeCloses a scene modification transaction, previously opened by a call to BeginChange()
 


Plugins

Returns an array of references to all plugins in the scene


Syntax:

VARIANT Plugins

Examples:


Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, plugins
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
plugins = vray.Scene.Plugins

Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
plugins = vray.Scene().Plugins()

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

plugins = vray.Scene.Plugins

 



PluginNames

Returns an array of strings of all plugin names in the scene


Syntax:

VARIANT PluginNames

Examples:


Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, settingsOutput
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
plugins = vray.Scene.PluginNames

Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
plugins = vray.Scene().PluginNames()

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

plugins = vray.Scene.PluginNames

 



Plugin

Returns a reference to a given scene plugin


Syntax:

RhinoScriptScenePlugin* Plugin(

[in, string] const BSTR pluginName
)

Parameters:

[in] BSTR pluginName : Name of the plugin to get

Return:

RhinoScriptScenePlugin

Examples:


Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, settingsOutput
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
Set settingsOutput = vray.Scene.Plugin("/SettingsOutput")

Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
settingsOutput = vray.Scene().Plugin("/SettingsOutput")

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

settingsOutput = vray.Scene().Plugin("/SettingsOutput")

 

 


PluginFromObject


Returns a reference to a plugin that is linked to an Rhino model object, given by ID

Syntax:

VARIANT PluginFromObject(

[in, string] const BSTR id
)

Parameters:

[in] BSTR id : Rhino model object id to query

Return:

RhinoScriptScenePlugin

 

Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, vrayMtl
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
vrayPlugin = vray.Scene.PluginFromObject("99dec31e-c736-4f7d-a98c-9dd321396344")

Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
vrayPlugin = vray.Scene().PluginFromObject("99dec31e-c736-4f7d-a98c-9dd321396344")

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

vrayPlugin = vray.Scene.PluginFromObject("99dec31e-c736-4f7d-a98c-9dd321396344")

 



PluginsByType

Returns an array of references to all plugins of a given type in the scene

 

Syntax:

VARIANT PluginsByType(
[in, string] const BSTR typeName

[in] VARIANT_BOOL onlyTopLevel

)


Parameters:

[in] BSTR typeName : Name of the plugins Type

[in] VARIANT_BOOL onlyTopLevel : VARIANT_TRUE to consider only top-level plugins, or all plugins otherwise. VARIANT_TRUE by default

 

Return:

VARIANT array of RhinoScriptScenePlugin
Examples:


Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

 

Dim vray, vrayMtl
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
vrayMtlAssets = vray.Scene.PluginsByType("MtlSingleBRDF")
vrayMtlAll = vray.Scene.PluginsByType("MtlSingleBRDF", False)

Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

 

vray = rs.GetPlugInObject("V-Ray for Rhino")
vrayMtlAssets = vray.Scene().PluginsByType("MtlSingleBRDF", True)
vrayMtlAll = vray.Scene().PluginsByType("MtlSingleBRDF", False)

Tabs Page
titleRhino Python 2

 

import rhVRay as vray


vrayMtlAssets = vray.Scene.PluginsByType("MtlSingleBRDF", True)
vrayMtlAll = vray.Scene.PluginsByType("MtlSingleBRDF", False)

 



PluginsByCategory

Returns an array of references to all plugins of a given category in the scene

 

Syntax:

VARIANT PluginsByCategory(
[in, string] const BSTR categoryName
[in] VARIANT_BOOL onlyTopLevel
)


Parameters:

[in] BSTR categoryName : Name of the plugins type

[in] VARIANT_BOOL onlyTopLevel : VARIANT_TRUE to consider only top-level plugins, or all plugins otherwise. VARIANT_TRUE by default

 

Return:

VARIANT array of RhinoScriptScenePlugin
Examples:


Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, mtls
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
mtls = vray.Scene.PluginsByCategory("material")
all_mtl_plugins = vray.Scene.PluginsByCategory("material", False)

Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
mtls = vray.Scene().PluginsByTCategory("material")
all_mtl_plugins = vray.Scene.PluginsByCategory("material", False)

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

mtls = vray.Scene.PluginsByCategory("material", True)
all_mtl_plugins = vray.Scene.PluginsByCategory("material", False)

 



Refresh

Refreshes the NeUI window

 

Syntax:

void Refresh()
Examples:


Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
vray.Scene.Refresh

Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
vray.Scene().Refresh()

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

vray.Scene.Refresh

 


Materials

Gets an array of all material plugins in the scene

 

Syntax:

VARIANT Materials()

 

Return:

VARIANT array of RhinoScriptScenePlugin
Examples:


Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, materials
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
materials = vray.Scene.Materials

Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
materials = vray.Scene().Materials()

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

materials = vray.Scene.Materials 



Lights

Gets an array of all light plugins in the scene

 

Syntax:

VARIANT Lights()

 

Return:

VARIANT array of RhinoScriptScenePlugin
Examples:


Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, lights
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
lights = vray.Scene.Lights

Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
lights = vray.Scene().Lights()

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

lights = vray.Scene.Lights

 

 


Settings

Gets an array of all settings plugins in the scene

 

Syntax:

VARIANT Settings()


Return:

VARIANT array of RhinoScriptScenePlugin
Examples:

 

Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, settings
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
settings = vray.Scene.Settings

Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
settings = vray.Scene().Settings()

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

settings = vray.Scene.Settings

SpecialObjects

Gets an array of all special object plugins (proxies, clippers, furs and infinite planes) in the scene


Syntax:

VARIANT SpecialObjects()


Return:

VARIANT array of RhinoScriptScenePlugin
Examples:


Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, so
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
so = vray.Scene.SpecialObjects

Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
so = vray.Scene().SpecialObjects()

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

specialObj = vray.Scene.SpecialObjects

 


LoadSettings

Loads a given .vropt file into the scene. The default file will be loaded on failure


Syntax:

VARIANT_BOOL LoadSettings(
[in, string] const BSTR fileName
)

Parameters:

[in] BSTR fileName : Name of the file to load in

Return:

None-zero if succeeded, zero if failed
Examples:


Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, success Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
success = vray.Scene.LoadSettings "Rhino Default.vropt"

Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
success = vray.Scene().LoadSettings("Rhino Default.vropt")

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

success = vray.Scene.LoadSettings("Rhino Default.vropt")

 


SaveSettings

Saves the current settings into a given .vropt file

 

Syntax:

VARIANT_BOOL SaveSettings(
[in, string] const BSTR fileName
)

Parameters:

[in] BSTR fileName : Name of the file to write out

Return:

None-zero if succeeded, zero if failed
Examples:


Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, success
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")

success = vray.Scene.SaveSettings "settings.vropt"

Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
success = vray.Scene().SaveSettings("settings.vropt")

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

success = vray.Scene.SaveSettings("settings.vropt")

 


BeginChange

Opens a transaction to modify the scene. Call EndChange() when done modifying the scene

 

Syntax:

void BeginChange()

Examples:

 

Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, success
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
success = vray.Scene.BeginChange
'scene modification statements
success = vray.Scene.EndChange

Tabs Page
titleRhino Python


import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
success = vray.Scene().BeginChange()
# scene modification statements
success = vray.Scene().EndChange()

Tabs Page
titleRhino Python 2


import rhVRay as vray

success = vray.Scene.BeginChange()
# scene modification statements
success = vray.Scene().EndChange()
#or in a RAII-manner
with vray.Scene.Transaction():
    # scene modification statements.
    # exiting the scope is equivalent to calling vray.Scene.EndChange()

 


EndChange

Closes a scene modification transaction, previously opened by a call to BeginChange()

 

Syntax:

void EndChange()

Examples:

Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, success
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
success = vray.Scene.BeginChange
'scene modification statements
success = vray.Scene.EndChange

Tabs Page
titleRhino Python


import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
success = vray.Scene().BeginChange()
# scene modification statements
success = vray.Scene().EndChange()

Tabs Page
titleRhino Python 2


import rhVRay as vray

success = vray.Scene.BeginChange()
# scene modification statements
success = vray.Scene().EndChange()
#or in a RAII-manner
with vray.Scene.Transaction():
    # scene modification statements.
    # exiting the scope is equivalent to calling vray.Scene.EndChange()

 


 

RhinoScriptObject

Represents the NeUI scene

 

Property NameDescription
SceneReturns the currently active scene
VersionReturns the current plugin version
VRayVersionReturns the current V-Ray core version
Method NameDescription
Render

Starts a V-Ray render

CancelRenderStops the current rendering process
GetSceneValue

Gets a stringified value from a scene plugin. This method is a shortcut to getting a scene parameter and calling GetValue() ot in

SetSceneValue

Sets a stringified value to the scene. Call RefreshUI to update the NeUI window

RefreshUI

Refreshes the NeUI asset manager window

GetDeviceListReturns the compute devices available on the machine for a given render mode
SetDeviceListSets a list of devices available on the machine, to be used for a given render mode
RefreshUIRefreshes the NeUI asset manager window

 


Scene

Returns the currently active scene

 

Syntax:

RhinoScriptScene* Scene


Examples:

Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, scene
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
Set scene = vray.Scene

Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
scene = vray.Scene()

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

scene = vray.Scene

 


Version

Returns the current plugin version


Syntax:

int Version


Examples:


Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, version
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
version = vray.Version

Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
version = vray.Version()

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

version = vray.Version

 

 


VRayVersion

Returns the current V-Ray core version


Syntax:

int VRayVersion


Examples:


Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray, vray_version
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
vray_version = vray.VRayVersion

Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
vray_version = vray.VRayVersion()

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

vray_version = vray.VRayVersion

 


Render

Starts a V-Ray render

 

Syntax:

void Render(
[in] RenderModes mode,
[in] RenderEngines engine,
[in] int timeout
)

Parameters:

[in] RenderModes mode: Specifies the mode the render job shall be executed in

[in] RenderEngines engine: Specifies the render engine to use for the current render job

[in] int timeout: Specifies whether the current render job shall be executed synchronously or asynchronously.
Use -1 for syncrhonous renders, and >=0 for specific wait timeout in milliseconds


Examples:


Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
Call vray.Render(0, 0, -1)

Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
vray.Render(0, 0, -1)

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

vray.Render(0,0,-1)

 


CancelRender

Stops the current rendering process

 

Syntax:

void CancelRender()
Examples:

 

Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
vray.CancelRender

Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
vray.CancelRender()

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

vray.CancelRender()

 

GetSceneValue

Gets a stringified value from a scene plugin. This method is a shortcut to getting a scene parameter and calling GetValue() ot in

 

RefreshUI

Refreshes the NeUI asset manager window


Syntax:

BSTR GetSceneValue

 

Parameters:

[in] BSTR pluginName : Name of the plugin

[in] BSTR paramName : Name of the parameter

 

Return:

Returns the value of the given plugins parameter as a string
Examples:

void RefreshUI(


[in, string]BSTR pluginName,
[in, string]BSTR paramName,
)

)
Examples:


Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray

, imageWidth, imageHeight


Set vray = Rhino.GetPlugInObject("V-Ray for Rhino

")
imageWidth = CInt(vray.getSceneValue("/SettingsOutput", "img_width"))
imageHeight = CInt(vray.getSceneValue("/SettingsOutput", "img_height"))
Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
imageWidth = int(vray.getSceneValue("/SettingsOutput", "img_width"))
imageHeight = int(vray.getSceneValue("/SettingsOutput", "img_height"))

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

imageWidth = int(vray.GetSceneValue("/SettingsOutput", "img_width"))
imageHeight = int(vray.GetSceneValue("/SettingsOutput", "img_height"))

 

SetSceneValue

Sets a stringified value to the scene. Call RefreshUI to update the NeUI window

 

Syntax:

VARIANT_BOOL SetSceneValue(
[in, string]BSTR pluginName,
[in, string]BSTR paramName,
[in, string]BSTR value
)

 

Parameters:

[in] BSTR pluginName : Name of the plugin

[in] BSTR paramName : Name of the parameter

[in] BSTR value : Stringified value to set

 

Return:

Returns True if setting was successful, False otherwise
Examples:

 

Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
vray.SetSceneValue "/SettingsOutput", "img_width", 800

")
vray.RefreshUI

Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
vray.

SetSceneValue("/SettingsOutput", "img_width", 800

RefreshUI()

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

vray.

SetSceneValue("/SettingsOutput", "img_width", 800

RefreshUI()

 

RefreshUI

Refreshes the NeUI asset manager window

GetDeviceList


Returns the compute devices available on the machine for a given render mode

Syntax:

void RefreshUI
VARIANT GetDeviceList(RenderEngines engine)

Return:

VARIANT

Examples:


Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script
 
Tabs Page
titleRhino Script

 

Option Explicit

Dim vray
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
vray.RefreshUI
Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs.GetPlugInObject("V-Ray for Rhino")
cudaDevices = vray.

RefreshUI

GetDeviceList(1)

Tabs Page
titleRhino Python 2

 

import rhVRay as vray

cudaDevices = vray.

RefreshUI(

GetDeviceList(vray.RenderEngines.RE_CUDA)

 

 

SpecialObjects

Gets an array of all special object plugins (proxies, clippers, furs, and infinite planes) in the scene

Syntax:

...


SetDeviceList


Sets a list of devices available on the machine, to be used for a given render mode

 

Syntax:

VARIANT_BOOL SetDeviceList(RenderEngines engine, VARIANT ids)

Return:

VARIANT

...

_BOOL

Examples:


Divbox
stylebackground-color:#e6f3ff; font-family: monospace
Tabs Container
directionhorizontal
Tabs Page
titleRhino Script

 

...

Option Explicit

...

Tabs Page
titleRhino Python

 

import rhinoscriptsyntax as rs

vray = rs

...

.GetPlugInObject("V-Ray for Rhino")

...

ids = [0, 1]
success = vray

...

.SetDeviceList(1, System.Array[System.Int32](ids))

Tabs Page
titleRhino Python 2

 

import

...

rhVRay as

...

vray

success = vray

...

.

...

SetDeviceList(vray.RenderEngines.RE_CUDA, [0, 1])

 

...

...