1. Home
  2. Docs
  3. renderStacks
  4. Pipeline Hooks
  5. Global user functions

Global user functions

User global functions

There are a few global functions that runs after a certain event of renderStacks.


runs at the end of rstck struct creation.
Since this function runs in “on create” event of rstck struct. You can not change the struct’s property here.


If you have this global function, it will override RenderOutput pmodifier or any manual setup. You can get the needed renderStacks’ data from the following properties of rstck struct.

  • rstck.passname – the activated name.
  • rstck.passcam – the camera to render for the pass

In this function you need to set this rstck properties.

  • rstck.renderoutputpath – output path of main render. You have to set this property to get a render.
  • rstck.renderelementoutputpath – the path for render elements. You can not set each render element separately. [RenderElementName] is token for the render element name.
  • rstck.setRenderElementsName rstck.renderelementoutputpath – This function will set each render elements name.This is a sample implementation
global rsUserSetOutput 
fn rsUserSetOutput = ( 
    rstck.renderoutputpath = @"c:\temp\rsUserSetOutput\rsUserSetOutput_" + rstck.passname + "_.tga" 
    rstck.renderelementoutputpath = @"c:\temp\rsUserSetOutput\[RenderElementName]\rsUserSetOutput_" + rstck.passname + "_[RenderElementName]_.tga"
    rstck.setRenderElementsName rstck.renderelementoutputpath 

When yo =u use this function, you need to set rendOutputFilename by yourself in rsUserPreRenderFn. I


runs just before render starts. At this point, the pass is activated, all pmodifiers are executed, and renderStack’s pre-render function ran. Your scene would be fully ready for render include setting all output path. If you want to override anything what renderStacks did for a pass, this is a place to do.

If you are using rsUserSetOutputPath, make sure to set rendOutputFilename or renderer’s frame buffer output option here.

fn rsUserPreRenderFn = (
    rendOutputFilename = rstck.renderoutputpath
    rendSaveFile = true
    rendShowVFB = true


runs after renders done and renderStack’s pose-render script ran.