import rhVRay as vray
paramType = vray.Scene.SettingsOutput.Param("img_width").TypeAsString
|
import rh8VRay as vray
paramType = vray.Scene.SettingsOutput.Param("img_width").TypeAsString
|
using VRayForRhino;
string paramType = VRay.Scene["SettingsOutput"].Param("img_width").TypeAsString
|
|
|
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:
Returns an array of strings of all parameter names in the current plugin
Syntax:
VARIANR ParamNames
Examples:
Returns the name of the plugin
Syntax:
BSTR Name
Examples:
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() |
Returns an array of references to all plugins in the scene
Syntax:
VARIANT Plugins
Examples:
import rhVRay as vray
plugins = vray.Scene.Plugins
|
import rh8VRay as vray
plugins = vray.Scene.Plugins
|
using VRayForRhino;
Plugin[] plugins = VRay.Scene.Plugins.ToArray();
|
|
|
Returns an array of strings of all plugin names in the scene
Syntax:
VARIANT PluginNames
Examples:
import rhVRay as vray
plugins = vray.Scene.PluginNames
|
import rh8VRay as vray
plugins = vray.Scene.PluginNames
|
using VRayForRhino;
string[] pluginNames = VRay.Scene.PluginNames.ToArray();
|
|
|
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:
import rhVRay as vray
settingsOutput = vray.Scene.Plugin("/SettingsOutput"
|
import rh8VRay as vray
settingsOutput = vray.Scene.Plugin("/SettingsOutput")
|
using VRayForRhino;
Plugin 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
import rhVRay as vray
vrayPlugin = vray.Scene.PluginFromObject("99dec31e-c736-4f7d-a98c-9dd321396344")
|
import rh8VRay as vray
vrayPlugin = vray.Scene.PluginFromObject("99dec31e-c736-4f7d-a98c-9dd321396344")
|
using VRayForRhino;
Plugin 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:
import rhVRay as vray
vrayMtlAssets = vray.Scene.PluginsByType("MtlSingleBRDF", True)
vrayMtlAll = vray.Scene.PluginsByType("MtlSingleBRDF", False)
|
import rh8VRay as vray
vrayMtlAssets = vray.Scene.PluginsByType("MtlSingleBRDF", True)
vrayMtlAll = vray.Scene.PluginsByType("MtlSingleBRDF", False)
|
using VRayForRhino;
Plugin[] vrayMtlAssets = VRay.Scene.PluginsByType("MtlSingleBRDF", true).ToArray();
Plugin[] vrayMtlAll = VRay.Scene.PluginsByType("MtlSingleBRDF", false).ToArray();
|
|
|
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:
import rhVRay as vray
mtls = vray.Scene.PluginsByCategory("material", True)
all_mtl_plugins = vray.Scene.PluginsByCategory("material", False)
|
import rh8VRay as vray
mtls = vray.Scene.PluginsByCategory("material", True)
all_mtl_plugins = vray.Scene.PluginsByCategory("material", False)
|
using VRayForRhino;
Plugin[] mtls = VRay.Scene.PluginsByCategory("material", true).ToArray();
Plugin[] all_mtl_plugins = VRay.Scene.PluginsByCategory("material", false).ToArray();
|
|
|
Refreshes the NeUI window
Syntax:
void Refresh()
Examples:
import rhVRay as vray
vray.Scene.Refresh
|
import rh8VRay as vray
vray.Scene.Refresh
|
using VRayForRhino;
VRay.Scene.Refresh();
|
|
|
Materials
Gets an array of all material plugins in the scene
Syntax:
VARIANT Materials()
Return:
VARIANT array of RhinoScriptScenePlugin
Examples:
import rhVRay as vray
materials = vray.Scene.Materials
|
import rh8VRay as vray
materials = vray.Scene.Materials
|
using VRayForRhino;
Plugin[] materials = VRay.Scene.Materials.ToArray();
|
|
|
Lights
Gets an array of all light plugins in the scene
Syntax:
VARIANT Lights()
Return:
VARIANT array of RhinoScriptScenePlugin
Examples:
import rhVRay as vray
lights = vray.Scene.Lights
|
import rh8VRay as vray
lights = vray.Scene.Lights
|
using VRayForRhino;
Plugin[] lights = VRay.Scene.Lights.ToArray();
|
|
|
Settings
Gets an array of all settings plugins in the scene
Syntax:
VARIANT Settings()
Return:
VARIANT array of RhinoScriptScenePlugin
Examples:
import rhVRay as vray
settings = vray.Scene.Settings
|
import rh8VRay as vray
settings = vray.Scene.Settings
|
using VRayForRhino;
Plugin[] settings = VRay.Scene.Settings.ToArray();
|
|
|
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:
import rhVRay as vray
specialObj = vray.Scene.SpecialObjects
|
import rh8VRay as vray
specialObj = vray.Scene.SpecialObjects
|
using VRayForRhino;
Plugin[] specialObj = VRay.Scene.SpecialObjects.ToArray();
|
|
|
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:
import rhVRay as vray
success = vray.Scene.LoadSettings("Rhino Default.vropt")
|
import rh8VRay as vray
success = vray.Scene.LoadSettings("Rhino Default.vropt")
|
using VRayForRhino;
bool 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:
import rhVRay as vray
success = vray.Scene.SaveSettings("settings.vropt")
|
import rh8VRay as vray
success = vray.Scene.SaveSettings("settings.vropt")
|
using VRayForRhino;
bool 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:
import rhVRay as vray
vray.Scene.BeginChange()
# scene modification statements
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()
|
import rh8VRay as vray
vray.Scene.BeginChange()
# scene modification statements
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()
|
using VRayForRhino;
VRay.Scene.BeginChange();
// scene modification statements
VRay.Scene.EndChange();
// or in a RAII-manner
using(Transaction tr = 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:
import rhVRay as vray
vray.Scene.BeginChange()
# scene modification statements
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()
|
import rh8VRay as vray
vray.Scene.BeginChange()
# scene modification statements
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()
|
using VRayForRhino;
VRay.Scene.BeginChange();
// scene modification statements
VRay.Scene.EndChange();
// or in a RAII-manner
using(Transaction tr = VRay.Scene.Transaction())
{
// scene modification statements.
// exiting the scope is equivalent to calling VRay.Scene.EndChange()
|
|
|
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 |
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:
import rhVRay as vray
scene = vray.Scene
|
import rh8VRay as vray
scene = vray.Scene
|
using VRayForRhino;
Scene scene = VRay.Scene;
|
|
|
Version
Returns the current plugin version
Syntax:
int
Version
Examples:
import rhVRay as vray
version = vray.Version
|
import rh8VRay as vray
version = vray.Version
|
using VRayForRhino;
int version = VRay.Version;
|
|
|
VRayVersion
Returns the current V-Ray core version
Syntax:
int
VRayVersion
Examples:
import rhVRay as vray
vray_version = vray.VRayVersion
|
import rh8VRay as vray
vray_version = vray.VRayVersion
|
using VRayForRhino;
int 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:
import rhVRay as vray
vray.Render(0, 0, -1)
|
import rh8VRay as vray
vray.Render(0, 0, -1)
|
using VRayForRhino;
VRay.Render(0, 0, -1);
|
|
|
CancelRender
Stops the current rendering process
Syntax:
void CancelRender()
Examples:
import rhVRay as vray
vray.CancelRender()
|
import rh8VRay as vray
vray.CancelRender()
|
using VRayForRhino;
VRay.CancelRender();
|
|
|
RefreshUI
Refreshes the NeUI asset manager window
Syntax:
void RefreshUI()
Examples:
import rhVRay as vray
vray.RefreshUI()
|
import rh8VRay as vray
vray.RefreshUI()
|
using VRayForRhino;
VRay.RefreshUI();
|
|
|