_-Render command returns immediately

Hi,

until version 3 it was possible to prevent the Render command from exiting immediately in a script using the commands


Set VRay = Rhino.GetPluginObject("V-Ray for Rhino")
VRay.SetBatchRenderOn True

but it seems that this option is gone. I see that during batch renders the Render command does indeed executes without returning immediately, is this modality still available via script, perhaps setting some vray parameters via script?

also, other commands like SaveVisopt seem gone. Though the new API allows to read/write the settings without exporting to file, it would still be useful to save/load via script in some circumstances. Are these commands still available as attributes of the PluginObject?

Kind regards,
Paolo

Hello, Paolo,

This will be achievable in the upcoming V-Ray Next for Rhino, Update 2.

Logged your request as a ticket for the dev team. Could you please describe an example scenario how you would like to utilize saving/loading .vropts?

Kind regards,
Peter

Hi Peter,

thanks for your reply!

Could you please describe an example scenario how you would like to utilize saving/loading .vropts

the first usage that comes to my mind is scripting a presets library (especially a non-UI one). As for my render scripts, in the past I used to save, edit/read via xml and load in order to get/apply render options. Now I am using the API for all my settings, except one:

I have not found a way to query the vray version via API alone. Am I overlooking something in the documentation? Another way could be to look for json files in the plugin directory. As a last resort, I can infer the version by calling version specific options inside try/catch statements

regards,
Paolo

When building a collection of preset .vropts, please keep in mind that:
- the .vropt export grabs all settings, including those of the Camera, Environment and Render Output
- using .vropt files from previous major versions of V-Ray for Rhino is not recommended
- preset .vropts are not universal. Each scene usually require individual individual solution even if it comes down to minor tuning of just camera settings.
With this said, I’d also like to mention that partial exports and other workflow enhancements are something we are discussing internally.

To get the V-Ray for Rhino version, try the following:

from Rhino import PlugIns
info = PlugIns.PlugIn.GetPlugInInfo(PlugIns.PlugIn.IdFromName("V-Ray for Rhino"))
print("V-Ray for Rhino version: %s"%info.Version)

To get the V-Ray Core version, use this:

import clr
clr.AddReferenceToFileAndPath("C:\\Program Files\\Chaos Group\\V-Ray\\V-Ray for Rhinoceros\\vrayappsdk\\bin\\VRaySDK.Net.dll")

import VRay
vrayVersion = VRay.Globals.GetVRayVersion()

major = (vrayVersion >> 16) & 0xFF
minor = (vrayVersion >> 8) & 0xFF
revision = vrayVersion & 0xFF

print("V-Ray core version is %s.%s.0%s" % (major, minor, revision))

Regards,
Peter

Hi Peter,

thanks a lot, your snippet does exactly what I needed!

glad for the highlights about .vropt as well, I look forward to the next enhancements

Kind regards,
Paolo