Setting OpenGL render engine in a script
Xiaojing
Posts: 14
Hi, I'm new for DAZ. I found that the rendererList doesn't contain OpenGL. And I want to render a image by OpenGL and Iray. Because of the lack of OpenGL, now I must save two Scene files, one for Iray and another for opengl. Is there a simple way to change Iray to OpenGL in a scene using script?
var oRenderMgr = App.getRenderMgr();var oRenderList = oRenderMgr.getRendererList()for(i=0;i<oRenderList.length;i++){ print(oRenderList[i].getName())}/* outputNVIDIA Iray3DelightScripted 3Delight*/
Comments
See http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/rendering/render_drawstyle/start
You could Save As a Render Settings Preset, and then merge that preset into the scene via your script:
var oContentMgr = App.getContentMgr();
oContentMgr.openFile("your-render-settings-preset.duf", true);
HTH.
- Greg
Thank you!
I found the code
You helped me again! I truly appreciate your timely help.
Thank you for your answer! You provided another soultion for me.