Use script to toggle Per Pixel Shading, Show Aspect Frame, and Show Thirds Guide?
argel1200
Posts: 758
Is it possible to write a script to toggle (or if necessary have separate "on" an 'off" scripts) the following?
Viewport(?) >> Show Aspect Frame
Viewport(?) >> Show Thirds Guide
Prefernces >> Interface >> Per Pixel Shading
I was looking at the example Action_Find_Classname scrip, but none of these appeare to be actions. So, I'm looking for some guidance on where to look in the scripting guides modify these settings. Mainly interested because I toggle them a lot. Especially Per Pixel Shading which needs to be toggled off to see textures on skydomes, the effects spheres in Render Sphere, etc. Thanks!
Comments
I'm not sure where, if at all, per-pixel shading is to be found but the other two are available as boolean properties of Dz3DViewport -
aspectOn
thirdsGuideOn
So
will get the viewport manager from the global MainWindow, the current viewport from the manager, and the current 3D viewport from the viewport and will then turn the thirds guide on.
Thanks Richard!! For anyone curious, here are two scripts that toggle each, respectively.
Thirds:
Aspect:
More improvements. Now the script that toggles the thirds guide also turns the aspect frame on and the aspect frame script turns the thirds guide off if the aspect frame is toggled off. For anyone reading this a few years from now, these work with DAZ Studio 4.7.0.12.
Thirds Guide:
Aspect Frame:
Thanks for sharing your scripts.
And for anyone reading this past 2021, they still work in Daz 4.15.0.2.
Thank you very much! I use the thirds guide quite a bit and was frustrated trying to find a way to keybind it.
Glad you find them useful! I can't imagine going back to not having them!!