How to get the list of user draw styles? [SOLVED]

bigD3dbigD3d Posts: 75

Hello everyone,

I am writing a script and want to allow the user to select which kind of rendering to do, or script-wise, the UserDrawStyle. I believe these are the choices you see on the viewport drop down (see image).

I belive the object is: DzUserDrawStyle - http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/userdrawstyle_dz

And I can set which one in the viewport by typing in the name manually:

 

oViewportMgr.getViewport(0).get3DViewport().setUserDrawStyle("Filament (PBR)");

 

But how do I get all the selection choices so I can put them into a selectBox in my script?

Any help is greatly appreciated.

thanks

Draw Styles.jpg
310 x 323 - 41K
Post edited by bigD3d on

Comments

  • bigD3dbigD3d Posts: 75
    edited May 2021

    Of course, right after I posted this, I found what I was missing...

    Just in case anyone else finds this post and is curious:

    var oViewportMgr = App.getInterface().getViewportMgr();

    var numUserDrawStyles = oViewportMgr.getNumUserDrawStyles();

    for(i=0; i < numUserDrawStyles ; i++) {

    drawStyleTypeComboBox.addItem(oViewportMgr.getUserDrawStyle(i).getDescription());

    }

    Post edited by bigD3d on
Sign In or Register to comment.