Fast way to change background color in Viewport?

XoechZXoechZ Posts: 1,102
edited December 1969 in Daz Studio Discussion

Hello!

I like to work with different background colors in the Viewport inside DAZ Studio. Mainly mid-grey for posing and shaping, and black for rendering.

Now I want to know if there is a faster way to switch betwenn different background colors. The obvious way - clicking the icon, choosing change background color, select a color, click OK - is a bit slow for me.

Can I create a keyboard shortcut for this? Or something else that is faster and less clicking around?

Comments

  • kitakoredazkitakoredaz Posts: 3,526
    edited December 1969

    You may save each background color as each Layout,
    then change Layout for each purpose, (eg black, white, green etc)

    and You can add short cut (icons) for, action: window>workspace>select Layouts
    in Window>workspace>customize.

    but as for me,, it seems not so quick^^;

    we can not apply short cut menu direclty for each layout, I think,,

    layout.JPG
    703 x 494 - 58K
  • prixatprixat Posts: 1,590
    edited December 1969

    If you switch layout from 'city limits' to 'self serve' (the one with the "Rooms" paradigm) then each 'Room' can retain its own colour.

    That's probably the fastest way but not ideal if your used to 'city limits'.

  • msorrelsmsorrels Posts: 44
    edited December 1969

    Go into Customize. Add a custom action. Choose DAZ Script option and paste this in

    
    var active3DViewport = MainWindow.getViewportMgr().getActiveViewport().get3DViewport();
    active3DViewport.background = QColor(255,0,0);
    

    Change the color on the second line to the color you want (this code sets the background to red)
    Once you have added the custom action, right click and assign it a keyboard shortcut. or place it on a menu or add a toolbar button.

  • kitakoredazkitakoredaz Posts: 3,526
    edited December 1969

    Thanks msorrels!
    the script is very useful!! :coolsmile:

  • XoechZXoechZ Posts: 1,102
    edited December 1969

    msorrels said:
    Go into Customize. Add a custom action. Choose DAZ Script option and paste this in
    
    var active3DViewport = MainWindow.getViewportMgr().getActiveViewport().get3DViewport();
    active3DViewport.background = QColor(255,0,0);
    

    Change the color on the second line to the color you want (this code sets the background to red)
    Once you have added the custom action, right click and assign it a keyboard shortcut. or place it on a menu or add a toolbar button.

    That is perfect !!!!!!! Exectly what I was looking for. I assigned my main colors to simple shortcurs, now I can change the color with one key hit.

    Thank you very much!

Sign In or Register to comment.