Backdrop colour

I understand that I cannot set the backdrop colour to that of my choice (192,192,192) so that it does not keep reverting to the default.  I appreciate that it is possible to include my backdrop colour in a saved start scene but it seems that it still reverts to the default when I save a WIP scene and then reopen it.

I wonder if it is possible to set my colour using a script that would activate when DS4.8 is opened?

Comments

  • macleanmaclean Posts: 2,438

    The big problem with this new background color behaviour is that loading anything at all (figure/prop/scene) causes it to revert to the default None/White. It's incredibly annoying, but I have no solution except to add to feature request to the bug tracker. I already did this it was politely told they didn't think it was an issue, but if everyone does it, they might reconsider.

    The main reason I'm posting here is that if someone does come up with a script, I'd grab it in a second.

  • // Get Viewport Managervar VPM = MainWindow.getViewportMgr();if ( VPM ) {	// Get the active viewport	VP = VPM.getActiveViewport();	if ( VP ) {		// get the 3DViewport		var TDVP = VP.get3DViewport();		if ( TDVP ) {			// set the background colour			TDVP.background = new Color( 0 , 0, 0 );		}	}}

     

  • Richard, many thanks for the response.  I have run the script but the backdrop does not change from the default.

    This is a copy of the script as I have entered it 

     

     

    DSscript.JPG
    738 x 664 - 72K
  • macleanmaclean Posts: 2,438

    I tried it as a .duf and a .dsa but nothing happens. (Script IDE shows no errors)

  • Cayman StudiosCayman Studios Posts: 1,134
    edited November 2015

    Richard's script changes the background of the viewport, it does not change the background of the Environment backdrop.  If you start a new scene you may want a new backdrop, and the backdrop colour can be saved as part of that scene.

    You can change the default background colour in Window > Style > Customize Colors...

    Post edited by Cayman Studios on
  • Caymen, thanks for the input.  I do appreciate that the backdground colour can be changed using the path that you suggest and the backdrop colour via the environment tab, but I would really like to automate the backdrop colour process if at all posssible and thought that a script could achieve this.

  • I had a quick look, there is a Scene.setBackdrop() but an extra step sems to be required to get it to display, this doesn't work (and lacks any kind of error checking):

    var backdrop = new DzBackdrop();var material = backdrop.getMaterial();material.setDiffuseColor ( new Color ( 128, 128, 128) );Scene.setBackdrop( backdrop );

     

  • DraagonStormDraagonStorm Posts: 748
    edited November 2015

    I think what your missing is to make the Backdrop visible.

    var bkdColor = new Color( 128, 128, 128 );Scene.getBackdrop().getMaterial().setDiffuseColor( bkdColor );Scene.getBackdrop().visible = true;

     

    This works to set the backdrop to grey.

     

    Post edited by DraagonStorm on
  • I thought I'd tried that and failed. Maybe I had something else wrong too.

  • macleanmaclean Posts: 2,438

    DraagonStorm.

    That works! Thanks to both of you.

    Caymen - The annoying thing about the new behaviour is that if you set Backdrop/Color in the environment pane, then load another object, it reverts to None/White. With a script, I can put it on a toolbar and it's only one click away.

    My issue is that, for example, when I'm doing product thumbnails, or promo shots with multiple pieces on gray, every time I load something new, I have to go back and reset the background. The script at least makes for less work.

    mac

Sign In or Register to comment.