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 as soon as renderStacks UI opens. If you want to change rstck struct property. This is the place to do.
Here is an example script which sets secondary pool for Deadline and add custom item for resolution dropdown.

global rsPreRsOpenFn
fn rsPreRsOpenFn = (
    if SMTDsettings != undefined then (SMTDsettings.Pool2Name = "mySecondaryPool") -- Set secondary pool for Deadline
    append rstck.resPreset "7680 x 4320 x 1.0" -- Add item to the resolution preset in Resolution pmodifier


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. Then,  you will need to take care ALL render output related settings by yourself. renderStacks would not set any output path at all when this function exists.

This function runs inside of ActivatePsss function right after renderStacks assemble output path using RenderOutput* pmodifiers.

I strongly recommend to set custom output path in rsUserPreRenderFn instead of this function. If you want to prevent renderStacka setting output path while using RenderOutput’s other properties, make this as empty function.


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. THis function will be executed for every single pass to be rendered. If you want to override anything what renderStacks did for a pass, this is a place to do.

If you need  to run a custom hard-coded function for render output, tun the code here.


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


Added in 1.221,This function runs right after you hit Net Submit button. If you are submitting 5 passes, this function will run only once before all 5 submissions.

From 1.229, thin function must return true for the submission to be continue. Therefore, you can use this function to implement own submission or sanity check code.

rstck properties for global user functions

You can get the needed renderStacks’ data for your user function from the following properties of rstck struct.

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

The overview of global user functions execution order

  1. Launch renderStacks.
  2. rstck struct is created.
  3. rsPostCreateFn
  4. rsPreRsOpenFn
  5. UI opens.
  6. Start network submission
  7. rsUserPreSubmitFn
  8. Pass activation starts.
  9. rsUserSetOutputPath
  10. Pass activation ends.
  11. rsUserPreRenderFn
  12. Submit a pass
  13. rsUserPostRenderFn