Script to Set Opacity = 0 on Any Selected Surfaces
![3dward](https://secure.gravatar.com/avatar/2c3191152707293f20a4f528571da745?&r=pg&s=100&d=https%3A%2F%2Fvanillicon.com%2F2c3191152707293f20a4f528571da745_100.png)
A script to set the opacity of any selected surfaces (including multiple surfaces) to opacity = 0 would speed up my workflow, but how would you code that in a script?
You currently have no notifications.
A script to set the opacity of any selected surfaces (including multiple surfaces) to opacity = 0 would speed up my workflow, but how would you code that in a script?
Licensing Agreement | Terms of Service | Privacy Policy | EULA
© 2025 Daz Productions Inc. All Rights Reserved.
Comments
If you select them on both the Scene tab and the Surfaces tab you just have to change Opacity on the one selected on the Surfaces tab, and the rest will follow. Here I have expanded and selected all objects on both tabs, so that all will be zeroed. Just make sure that all surfaces have the same shader (Iray or 3DL).
https://www.screencast.com/t/TYijPBllJV
Note that with Iray the shaders settings for some objects may leave some strange shadows in the viewport, you'll usually not see these when you render, but otherwise they can be hidden by setting Glossy Color to black. See screenshot.
Note btw that some things like the eyes go black on the video, that's because their Opacity already is zeroed by default and then is set to 1.0 when the setting is reversed.
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/material/select_by_tag/start shows how to gather a material list
I had a script that did almost this, so here is a modified version to do exactly this.
Thanks. I realize should have asked it to toggle opacity between 100 and 0 based on which it already was. How would you do that? I tried adding oProperty.setValue (100); in the code block with the comment
after its else if statement, but that just causes an error
.
The value is between 0 and 1.
Oh my goodness! This works so well! It works on DS default 3DL shaders as well as Iray! Wow - this is hugely helpful, thank you!