Eyeon:Script/Reference/Applications/Fusion/Classes/Composition/Render
From VFXPedia
Contents |
Composition : Render
Arguments
There are two forms to this function. The first has normal arguments. The second uses a table as its only argument.
Render(wait_for_render, renderstart, renderend, step, proxy, hiQ, mblur)
- wait_for_render (required, boolean)
a true or false value indicating whether the script should wait for the render to complete, or continue processing once the render has begun.
- renderstart (optional, number)
the frame to start rendering at
- renderend (optional, number)
the frame to stop rendering at
- step (optional, number)
render 1 out of x frames. For example, a value of 2 here would render every second frame.
- proxy (optional, number)
scale all frames down by this factor, for faster rendering
- hiQ (optional, boolean)
do high-quality rendering (defaults to true, if not specified)
- mblur (optional, boolean)
calculate motion-blur when rendering (defaults to true, if not specified)
Render(arguments_table)
- arguments_table (required, table)
A table containing values that describe the render. Table entries should be one or more of the following :
- Start (number)
First frame to render. Default: Comp's render end setting.
- End (number)
Final frame to render (inclusive). Default: Comp's render end setting.
- HiQ (boolean)
Render in HiQ. Default true.
- RenderAll (boolean)
Render all tools, even if not required by a saver. Default false.
- MotionBlur (boolean)
Do motion blur in render, where specified in tools. Default true.
- SizeType (number)
Resizes the output:
- -1 - Custom (only used by PreviewSavers during a preview render)
- 0 - Use prefs setting
- 1 - Full Size (default)
- 2 - Half Size
- 3 - Third Size
- 4 - Quarter Size
- Width (number)
Width of result when doing a Custom preview (defaults to pref)
- Height (number)
Height of result when doing a Custom preview (defaults to pref)
- KeepAspect (boolean)
Maintains the frame aspect when doing a Custom preview. Defaults to Preview prefs setting.
- StepRender (boolean)
Render only 1 out of every X frames ("shoot on X frames") or render every frame, default false.
- Steps (number)
If step rendering, how many to step. Default 5.
- UseNetwork (boolean)
Enables rendering with the network. Default false.
- Groups (string)
Use these network slave groups to render on (when net rendering). Default "all".
- Flags (number)
Number specifying render flags, usually 0 (the default). Most flags are specified by other means, but a value of 262144 is used for preview renders.
- Tool (tool handle)
Handle to a tool to specifically render. If this is specified only sections of the comp up to this tool will be rendered. eg you could specify comp.Saver1 to only render *up to* Saver1, ignoring any tools (including savers) after it. default nil
- FrameRange (string)
Describes which frames to render. (eg "1..100,150..180"), defaults to "Start".."End" (above)
- Wait (boolean)
Whether the script command will wait for the render to complete, or return immediately, default false
Returns
Returns true if the composition rendered successfully, nil if it failed to start or complete the render.
Remarks
The Render function starts rendering the current composition. There are two forms for calling this function, one where the arguments are passed as described above, and a second form where all the arguments are passed in a table. The table format is useful for declaring non-contiguos render ranges, such as the following one.
Requirements
- eyeonScript 5.0
- Fusion 5.0
Examples
Loads c:\sample.comp, then renders the composition
fusion = Fusion() composition = fusion:LoadComp("c:\\sample.comp", false)''' -- start the render -- wait, use the composition's render range err = composition:Render(true) if not err then print("failed to render the composition!")''' os.exit(10)''' end
Renders the composition using the current frame range. Script continues to execute while the render takes place.
-- render again but don't wait, -- use the composition's render range composition:Render(false) count_frame = nil while composition:GetAttrs().COMPB_Rendering do -- print each frame number as it renders wait(0.1) -- check every 1/10th sec. test_frame = composition:GetAttrs().COMPN_LastFrameRendered if test_frame ~= count_frame then print("Frame " .. test_frame .. " complete.")''' count_frame = test_frame end end
A render that specifies an explicit render range, and returns once the render has completed.
-- render again, wait for the render -- specify explicit render range composition:Render(true, 1, 100, 1) -- wait, specify the render range
The following example renders a non-contiguous frame range, and returns once the render has completed.
comp:Render({ FrameRange = "1..10,20,30,40..50", Wait = true })
Render up to the Saver1 tool, but nothing further downstream.
comp:Render({Tool = comp.Saver1})
Tips for Render (edit)
EyeonTips:Script/Reference/Applications/Fusion/Classes/Composition/Render