Rhino 4.0 crashes when calling V-Ray via script

This line in my script which is supposed to make ‘V-Ray for Matrix’ the default renderer crashes Rhino 4.0. Why does this happen?

Rhino.DefaultRenderer("{E8CFE179-B60C-411A-8416-62A893334519}")

Hi @krsnadas,

it looks like Rhino.DefaultRenderer in Rhino 4 does never accept Plugin Ids and always crashes if the string passed to this method is not a string listed under:

Render > Current Renderer.

If you have VRay x86 properly installed and working in Rhino 4, check how it is listed in the menu and use the exact string in your RhinoScript method. Eg. For setting the built in Rhino Render current, this seems to work without crashing:

Main()
Sub Main()
  Rhino.DefaultRenderer "Rhino Render"
End Sub

but something like this crashed Rhino 4 here too:

Main()
Sub Main()
  Rhino.DefaultRenderer "BlaBla Render"
End Sub

c.

1 Like

Thanks, @clement. You’re right; it works fine with the name!