Author Topic: Switch renderer in a python script  (Read 1090 times)


  • Newbie
  • *
  • Posts: 1
Switch renderer in a python script
« on: June 21, 2017, 07:55:31 PM »

I would like to know how I can change the renderer to Tachyon in side a script.

Thank you in advance

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 638
Re: Switch renderer in a python script
« Reply #1 on: June 22, 2017, 01:09:41 PM »
Hi Katey,

you can replace the renderer in a Python script by creating an instance of the TachyonRenderer class and assigning it to the renderer field of the RenderSettings object.

This can be done either for the global render settings object:

Code: [Select]
rs = ovito.dataset.render_settings
rs.renderer = TachyonRenderer()

or by creating an ad-hoc render settings object, which is then passed to the Viewport when rendering an image:

Code: [Select]
rs = RenderSettings(renderer = TachyonRenderer())