Suppressing Movie Codec Dialog from displaying

Hi folks. I'm developing a batch render script as a means of learing DS scripting. The script can render multiple camera shots from multiple scenes, and everything is working with one problem. Presently, I'm only rendering movie files.

When it's about to render the next shot, the dialog pops up requesting you to select a codec. The dialog box is actually named 'Compressor', which is technically correct. It sort of defeats the whole purpose of a batch rendering operation when the user has to sit there and click the OK button each time.

I would have expected that DzRenderOptions would have provided the means, but apparently it doesn't. If anyone can show me how to do this I will be one happy cook!

 

Comments

  • Richard HaseltineRichard Haseltine Posts: 55,156

    You could use an image sequence - it's usually advised anyway. I don't know if it's possible to suppress the script, or how you would do so if it is.

  • Thanks Richard. I've started adding support to output a sequence of images. But I'm running into a problem.

    Even though I'm configuring the RenderOptions properties for image series, they're not overriding the Render panel settings. So if the scene was last saved with  some other Render Type, such as MovieFile, that's what I get. I'm going to keep experimenting with the option settings and see what happens.

     

  • For anyone following this thread, I found the following code will render an Image Series to file.

    function renderShot()
    {
    	var nTimeStep = Scene.getTimeStep().valueOf();
    	var nStartTicks = 0;
    	var nEndTicks = 0;
    
    	nStartTicks = getTicks( gnFrameStart);
    	nEndTicks = getTicks( gnFrameEnd);
    
    	App.getRenderMgr().getRenderOptions().renderSerFilename = gsMediaDir + "/" + gsBaseImageName;
    	App.getRenderMgr().getRenderOptions().startTime = nStartTicks;
    	App.getRenderMgr().getRenderOptions().endTime = nEndTicks;
    
    	bResult = App.getRenderMgr().doRender( App.getRenderMgr().getRenderOptions() );
    }
    

    The setting for renderSerFilename was what had stumped me. gsMediaDir and gsBaseImageName are global string variables that are set before the call to renderShot. 

    gsMediaDir is an absolute path to a media folder to receive the images.

    gsBaseImageName is the name of my current camera, such as Camera 1.

    Only by combining these two variables for assignment to renderSerFilename was I able to get my script to work.

    Incidentally, the getTicks() function multiples the starting and ending frames by a factor determined by the frames per second (FPS) setting.

    I hope some folks will find this useful.

     

Sign In or Register to comment.