Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

After Effects rendering problem in CC 2015 and later

$
0
0

Hi,

 

I have a suite of tools that I help author that I want to update to the new versions of After Effects, but one blocking issue that I am having difficulty debugging is that when I render my images, it no longer renders them. It adds the items to the render queue, processes them through it with no errors, but no images result. So, when my code goes to load the images that it rendered it asserts because the images weren't created. I can give a snippet of my function if it helps:

 

 

 

function renderElement(elementType,element,color)

{

    //remove item from the render queue

    if(app.project.renderQueue.numItems > 0)

    {

        app.project.renderQueue.item(1).remove();

    }

    var activeItem = element;

    // make sure a comp is selected

    if (((activeItem != null) && activeItem instanceof CompItem))

    {

        var my_outputSettings_Path = {

        "Output File Info":{

           "Full Flat Path":mPaylineSetting.mColoredElementsFolderOnDrive + elementType + "_" + color[0].toString() + "_" + color[1].toString() + "_" + color[2].toString() + "_[#].png"

            //"Base Path":path,

            //"Subfolder Path":subFolder,

            //"File Name":fileName

            }

        };

        var my_renderSettings = {

        "Color Depth":"Current Settings",

        "Quality":"Draft",

        "Effects":"Current Settings",

        "Time Span Start":"0.0"

        };

 

 

        var RQitem = app.project.renderQueue.items.add(activeItem);

        // grab the first output module

        var OMitem = RQitem.outputModules[1];

        // apply templates

        RQitem.applyTemplate("PNG_Sequence");

        OMitem.applyTemplate("PNG_Alpha");

        app.project.renderQueue.item(1).setSettings( my_renderSettings );

        app.project.renderQueue.item(1).outputModule(1).setSettings( my_outputSettings_Path );

        try

        {

            app.project.renderQueue.render();

        }

        catch(error)//display error info

        {

            var str =  "Error when rendering a colored element:" + "\n"

            + "Exception: " + error.name + "\n"

            + "File Name: " + error.fileName + "\n"

            + "Line: " + error.line + "\n"

            + "Message: " + error.message + "\n";

            throw str;

        }

    }

}

 

Thanks,

 

- Adam


Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>