How to get the list of user draw styles? [SOLVED]
![bigD3d](https://secure.gravatar.com/avatar/f82348051f336b2ccbeb8793e4a9eb67?&r=pg&s=100&d=https%3A%2F%2Fvanillicon.com%2Ff82348051f336b2ccbeb8793e4a9eb67_100.png)
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
![](https://hpclscruffy.daz3d.com/forums/uploads/thumbnails/FileUpload/f9/b19613ba6cca183cf9017374a6da3a.jpg)
![](https://hpclscruffy.daz3d.com/forums/uploads/thumbnails/FileUpload/f9/b19613ba6cca183cf9017374a6da3a.jpg)
Draw Styles.jpg
310 x 323 - 41K
Post edited by bigD3d on
Comments
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());
}