Page History
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 | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
...
Divbox | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
TypeAsString
Returns the data type of the parameter as string.
Syntax:
BSTR TypeAsString
Examples:
Divbox | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
RhinoScriptScenePlugin
Represents a reference to a NeUI plugin
Property Name | Description |
---|---|
Params | Returns an array of references to all parameters for the current plugin |
ParamNames | Returns an array of strings of all parameter names in the current plugin |
Name | Returns the name of the plugin |
Category | Returns the category of the plugin |
Type | Returns the type of the plugin |
Method Name | Description |
---|---|
Param | Returns 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 | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
ParamNames
Returns an array of strings of all parameter names in the current plugin
Syntax:
VARIANR ParamNames
Examples:
Divbox | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
Name
Returns the name of the plugin
Syntax:
BSTR Name
Examples:
Divbox | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
Category
Returns the category of the plugin
Syntax:
BSTR Category
Examples:
Divbox | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
Type
Returns the type of the plugin
Syntax:
BSTR Type
Examples:
Divbox | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
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 | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
RhinoScriptScene
Represents the NeUI scene
Method Name | Description |
---|---|
Plugins | Returns an array of references to all plugins in the scene |
PluginNames | Returns an array of strings of all plugin names in the scene |
Method Name | Description |
---|---|
Plugin | Returns a reference to a given scene plugin |
PluginFromObject | Returns a reference to a plugin that is linked to an Rhino model object, given by ID |
PluginsByType | Returns an array of references to all plugins of a given type in the scene |
PluginsByCategory | Returns an array of references to all plugins of a given category in the scene |
Refresh | Refreshes the NeUI window |
Materials | Gets an array of all material plugins in the scene |
Lights | Gets an array of all light plugins in the scene |
Settings | Gets an array of all settings plugins in the scene |
SpecialObjects | Gets an array of all special object plugins (proxies, clippers, furs and infinite planes) in the scene |
LoadSettings | Loads a given .vropt file into the scene. The default file will be loaded on failure |
SaveSettings | Saves the current settings into a given .vropt file |
BeginChange | Opens a transaction to modify the scene. Call EndChange() when done modifying the scene |
EndChange | Closes 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 | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
PluginNames
Returns an array of strings of all plugin names in the scene
Syntax:
VARIANT PluginNames
Examples:
Divbox | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
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 | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
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 | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
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 | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
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 | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
Refresh
Refreshes the NeUI window
Syntax:
void Refresh()
Examples:
Divbox | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
Materials
Gets an array of all material plugins in the scene
Syntax:
VARIANT Materials()
Return:
VARIANT array of RhinoScriptScenePlugin
Examples:
Divbox | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
Lights
Gets an array of all light plugins in the scene
Syntax:
VARIANT Lights()
Return:
VARIANT array of RhinoScriptScenePlugin
Examples:
Divbox | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
Settings
Gets an array of all settings plugins in the scene
Syntax:
VARIANT Settings()
Return:
VARIANT array of RhinoScriptScenePlugin
Examples:
Divbox | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
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 | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
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 | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
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 | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
BeginChange
Opens a transaction to modify the scene. Call EndChange() when done modifying the scene
Syntax:
void BeginChange()
Examples:
Divbox | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
EndChange
Closes a scene modification transaction, previously opened by a call to BeginChange()
Syntax:
void EndChange()
Examples:
Divbox | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
RhinoScriptObject
Represents the NeUI scene
Property Name | Description |
---|---|
Scene | Returns the currently active scene |
Version | Returns the current plugin version |
VRayVersion | Returns the current V-Ray core version |
Method Name | Description |
---|---|
Render | Starts a V-Ray render |
CancelRender | Stops the current rendering process |
Gets a stringified value from a scene plugin. This method is a shortcut to getting a scene parameter and calling GetValue() ot in
Sets a stringified value to the scene. Call RefreshUI to update the NeUI window
RefreshUI | Refreshes the NeUI asset manager window |
GetDeviceList | Returns the compute devices available on the machine for a given render mode |
SetDeviceList | Sets a list of devices available on the machine, to be used for a given render mode |
Scene
Returns the currently active scene
Syntax:
RhinoScriptScene*
Scene
Examples:
Divbox | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
Version
Returns the current plugin version
Syntax:
int
Version
Examples:
Divbox | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
VRayVersion
Returns the current V-Ray core version
Syntax:
int
VRayVersion
Examples:
Divbox | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
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 | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
CancelRender
Stops the current rendering process
Syntax:
void CancelRender()
Examples:
Divbox | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
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:
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 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|
|
imageWidth = CInt(vray.getSceneValue("/SettingsOutput", "img_width"))
imageHeight = CInt(vray.getSceneValue("/SettingsOutput", "img_height"))
Tabs Page | ||
---|---|---|
| ||
|
Tabs Page | ||
---|---|---|
| ||
|
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:
style | background-color:#e6f3ff; font-family: monospace |
---|
direction | horizontal |
---|
title | Rhino Script |
---|
Option Explicit
Dim vray
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
vray.SetSceneValue "/SettingsOutput", "img_width", 800
|
|
|
RefreshUI
Refreshes the NeUI asset manager windowGetDeviceList
Returns the compute devices available on the machine for a given render mode
Syntax:
VARIANT
GetDeviceList(RenderEngines engine)Return:
VARIANT
Examples:
Divbox | ||||
---|---|---|---|---|
| ||||
|
|
title | Rhino Script |
---|
Option Explicit
Dim vray
Set vray = Rhino.GetPlugInObject("V-Ray for Rhino")
vray.RefreshUI
|
|
|
SpecialObjects
Gets an array of all special object plugins (proxies, clippers, furs, and infinite planes) in the scene
Syntax:
...
SetDeviceList
Syntax:
VARIANT_BOOL
SetDeviceList(RenderEngines engine, VARIANT ids)Return:
VARIANT
...
_BOOL
Examples:
Divbox | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|
...
Option Explicit
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
...