Wedge HScript Render Takes Automation (filename, cam, framerange)

In the current project, I have lots of takes, multiple cameras and different frame ranges. So I use the Wedge ROP (By Take all the takes) and I have named my takes this way:

  • name_startframe_endframe, e.g.:
    • “magnetic_400_2200”
    • “terrain_600_1800”

Name is descriptive, for further comping. The first number is Start of the frame range, the second number is the End of the frame range.

I have many different ROPs to set up the renders. In the ROP, I automate the file names and frame ranges with HScript expressions. For example this one is to extract the Start Frame or End Frame from the name of the take:

{
    string take = chsop("take");
    float first = index(take, "_");
    float last = rindex(take, "_");
    
    float start = first + 1;
    float length = last - first - 1;
    string startFrameString = substr(take, start, length);
    float  startFrame = atof(startFrameString);
    
    float start = last+1;
    float length = strlen(take) - last - 1;
    string endFrameString = substr(take, start, length);
    float  endFrame = atof(endFrameString);
    
    
    return startFrame;
}

This expression is to generate the folder and filename (Output Image) e.g.
$HIP/render/magnetic_camL/magnetic_camL_$F4.png

`{
    string take = chsop("take");
    string camera = chsop("camera");
    
    float first = index(take, "_");
    float start = 0;
    float length = first;
    string takeName = substr(take, start, length);

    string camName = substr(camera, 5, 5);
    string takeName += "_" + camName;
        
    string output = "$HIP/render/";
    string output += takeName + "/" + takeName;
    string output += "_$F4.png";
    
    return output;
}`

 

Leave a Reply

Your email address will not be published. Required fields are marked *