Any way to always set Viewport to non-Iray on Launch or file Open?

I find that there can be a big delay if I quit Daz3D with the iRay preview on, or forget to turn it off before opening a new file or other operation that will require the card to load/purge a bunch of stuff. Rendering I am used to waiting for, but not paying the price of many minutes while each part of the scene is re-rendered just to be invalidated by the next object load, over and over.

Maybe this is more a support request or a call for me to learn some internals. But that will take longer than the load taking place right now as I type!

Comments

  • Theer is a script to set the drwa style of the active viewport here http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/specific_ui/active_viewport_drawstyle/start . You could have it go through all the viewports, instead of just the active one, and check to see if the current style was "NVIDIA Iray", then if it was set it to whatever default you want to use. Use Edit>Prefrences>Startup>Load File to run the script on launch and/or Edit>Preferences>Scene>Load File to run it on File>New.

  • A quick hack job, it seemed to work (famous last words):

    // Clear nVidia Iray preview mode// derived from http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/specific_ui/active_viewport_drawstyle/start// used under CC Attribution 3.0 Unported// Modification by Richard Haseltine, Feb 2018        // Define an anonymous function;    // serves as our main loop,    // limits the scope of variables    (function( sDrawStyle ){         	// Get the viewport manager    	var oViewportMgr = MainWindow.getViewportMgr();         	// Declare a working variable    	var oDrawStyle;         	// If a fallback DrawStyle wasn't specified    	if( sDrawStyle.isEmpty() ){         		// We're done...    		return;    	}         	// Find a DrawStyle by label    	var oDrawStyle = oViewportMgr.findUserDrawStyle( sDrawStyle );    	// If we do not have a DrawStyle with that label    	if( !oDrawStyle ){    		// Inform the user    		print( sDrawStyle, "could not be found." );         		// We're done...    		return;    	}         	// Get the number of viewport3    	var oNoViewports = oViewportMgr.getNumViewports();    	    	var oCurViewport, o3dViewport;    	    	// Iterate over the viewports    	for ( var n = 0 ; n < oNoViewports ; n++ ) {    		    		// get the nth viewport    		oCurViewport = oViewportMgr.getViewport( n );    		    		// if we don't have one, skip this    		if ( !oCurViewport ) {    			break;    		}     	    	// Get the 3D viewport	    	var o3dViewport = oCurViewport.get3DViewport();	    		    	// If it is using the iray style	    	if ( o3dViewport.getUserDrawStyle() == "NVIDIA Iray" ) {     		    	// Set the DrawStyle		    	o3dViewport.setDrawStyle( oDrawStyle );		    			    }		    	    }         // Finalize the function and invoke    })( "Texture Shaded" );

     

Sign In or Register to comment.