RenderPipeline

public abstract class RenderPipeline : IDisposable
Provides facilities to a render plug-in for integrating with the standard Rhino render window. Also adds helper functions for processing a render scene. This is the suggested class to use when integrating a renderer with Rhino and maintaining a "standard" user interface that users will expect.

Constructors

RenderPipeline

#
Constructs a subclass of this object on the stack in your Rhino plug-in's Render() or RenderWindow() implementation. This constructor should be used when a non-blocking RenderWindow is required. Note that the asynchronous render context will not be used when mode is Scripted.
protected RenderPipeline(
doc,
A Rhino document.
mode,
A command running mode, such as scripted or interactive.
plugin,
A plug-in.
sizeRendering,
The width and height of the rendering.
caption,
The caption to display in the frame window.
channels,
The color channel or channels.
reuseRenderWindow,
This parameter is obsolete.
clearLastRendering,
true if the last rendering should be removed. Indicates that this render is being done using RenderQuiet(). It specifically makes sure the render mesh iterator does not display any progress user interface.
aRC
The asynchronous render context to set
)

RenderPipeline

#
Constructs a subclass of this object on the stack in your Rhino plug-in's Render() or RenderWindow() implementation.
protected RenderPipeline(
doc,
A Rhino document.
mode,
A command running mode, such as scripted or interactive.
plugin,
A plug-in.
sizeRendering,
The width and height of the rendering.
caption,
The caption to display in the frame window.
channels,
The color channel or channels.
reuseRenderWindow,
This parameter is obsolete.
clearLastRendering
true If the last rendering should be removed. Indicates that this render is being done using RenderQuiet(). It specifically makes sure the render mesh iterator does not display any progress user interface.
)

Finalizer

~RenderPipeline

#
~RenderPipeline()

Properties

ConfirmationSeconds

#Since v5.0
Sets the number of seconds that need to elapse during rendering before the user is asked if the rendered image should be saved.
public int ConfirmationSeconds { set; }

PlugIn

#Since v5.0
public PlugIn PlugIn { get; }

RenderSessionId

#Since v5.11
Get the Id associated with this render session, this is useful when looking up Rhino.Render.RenderPanels.
public Guid RenderSessionId { get; }

Methods

AddLightToScene

#
protected virtual bool AddLightToScene()

AddRenderMeshToScene

#
protected virtual bool AddRenderMeshToScene(
obj,
Material
material,
Mesh
mesh
)

CloseWindow

#Since v5.11
Closes the render window associated with this render instance.
public bool CloseWindow()
Return true if successful or false if not.

CommandResult

#Since v5.0
public Result CommandResult()

ContinueModal

#
Frequently called during a rendering by the frame work in order to determine if the rendering should continue.
protected abstract bool ContinueModal()
Returns true if the rendering should continue.

Dispose

#Since v5.0
public void Dispose()

Dispose

#
protected virtual void Dispose(
isDisposing
)

GetRenderWindow

#Since v5.0
Get the RenderWindow associated with this RenderPipeline instance. This is virtual rather than abstract for V5 compat
public RenderWindow GetRenderWindow()
RenderWindow if one exists, null otherwise (i.e. rendering has already completed).

GetRenderWindow

#Since v6.0
As GetRenderWindow(). The parameter withWireframeChannel controls whether the returned RenderWindow will have the channel added. The parameter fromRenderViewSource controls from where the RenderSize is queried.
public RenderWindow GetRenderWindow(
withWireframeChannel,
true if the RenderWindow needs to have a wireframe channel.
fromRenderViewSource
true if the RenderWindow size needs to be set from RenderViewSource size. false will use the active view.
)
RenderWindow if one exists, null otherwise (i.e. rendering has already completed).

GetRenderWindow

#Since v6.0
As GetRenderWindow(), but if withWireframeChannel is true the returned RenderWindow will have the channel added.
public RenderWindow GetRenderWindow(
withWireframeChannel
)
RenderWindow with wireframe channel enabled, or null if no RenderWindow can be found (i.e. rendering has completed already)

GetRenderWindow

#Since v7.19
As GetRenderWindow(). The parameter withWireframeChannel controls whether the returned RenderWindow will have the channel added. The parameter fromRenderViewSource controls from where the RenderSize is queried. The viewportInfo instance will be used to set up wireframe channel. This is necessary for rendering different view than is currently active in the viewport
public RenderWindow GetRenderWindow(
viewportInfo,
ViewportInfo used to generate the wireframe channel
fromRenderViewSource,
true if the RenderWindow size needs to be set from RenderViewSource size. false will use the active view.
region
The region to render. Usually the same as the full render window but in the case of RenderWindow and RenderInWindow, it is the region the user selected in the viewport.
)
RenderWindow if one exists, null otherwise (i.e. rendering has already completed).

GetRenderWindow

#Since v7.11
As GetRenderWindow(). The parameter withWireframeChannel controls whether the returned RenderWindow will have the channel added. The parameter fromRenderViewSource controls from where the RenderSize is queried. The viewportInfo instance will be used to set up wireframe channel. This is necessary for rendering different view than is currently active in the viewport
public RenderWindow GetRenderWindow(
viewportInfo,
ViewportInfo used to generate the wireframe channel for
fromRenderViewSource
true if the RenderWindow size needs to be set from RenderViewSource size. false will use the active view.
)
RenderWindow if one exists, null otherwise (i.e. rendering has already completed).

GetRenderWindowFromRenderViewSource

#Since v6.0
Like GetRenderWindow(), but with the size for RenderWindow set from RenderViewSources if fromRenderViewSource is set to true
public RenderWindow GetRenderWindowFromRenderViewSource(
fromRenderViewSource
true if
)
RenderWindow if one exists, null otherwise (i.e. rendering has already completed).

IgnoreRhinoObject

#
protected virtual bool IgnoreRhinoObject()

LocalizeRenderReturnCode

#Since v7.1
public static string LocalizeRenderReturnCode()

NeedToProcessGeometryTable

#
protected virtual bool NeedToProcessGeometryTable()

NeedToProcessLightTable

#
protected virtual bool NeedToProcessLightTable()

OnRenderBegin

#
Called by the framework when it is time to start rendering, the render window will be created at this point and it is safe to start
protected abstract bool OnRenderBegin()

OnRenderBeginQuiet

#
Called by the framework when it is time to start rendering quietly, there is no user interface when rendering in this mode and the default post process effects will get applied to the scene when the rendering is complete.
protected virtual bool OnRenderBeginQuiet(
imageSize
)

OnRenderEnd

#
Called by the framework when the user closes the render window or clicks on the stop button in the render window.
protected abstract void OnRenderEnd()

OnRenderWindowBegin

#
protected abstract bool OnRenderWindowBegin(
view,
rectangle
)

PauseRendering

#Since v6.0
Implement to pause the current render session
public virtual void PauseRendering()

Render

#Since v5.0
Call this function to render the scene normally. The function returns when rendering is complete (or cancelled).
A code that explains how rendering completed.

RenderEnterModalLoop

#
protected virtual bool RenderEnterModalLoop()

RenderExitModalLoop

#
protected virtual bool RenderExitModalLoop()

RenderPreCreateWindow

#
protected virtual bool RenderPreCreateWindow()

RenderSceneWithNoMeshes

#
protected virtual bool RenderSceneWithNoMeshes()

RenderSize

#Since v5.0 Obsolete v6.4
public static Size RenderSize()

RenderSize

#Since v6.0
Get the render size as specified in the ON_3dmRenderSettings, and from RenderSources when fromRenderSources is true.
public static Size RenderSize(
doc,
fromRenderSources
)
The render size.

RenderSize

#Since v6.0
Get the render size as specified in the ON_3dmRenderSettings. Will automatically return the correct size based on the ActiveView or custom settings.
public static Size RenderSize()
The render size.

RenderWindow

#Since v5.0
Call this function to render the scene in a view window. The function returns when rendering is complete (or cancelled).
public RenderPipeline.RenderReturnCode RenderWindow(
view,
the view that the user selected a rectangle in.
rect,
rectangle that the user selected.
inWindow
true to render directly into the view window.
)
A code that explains how rendering completed.

ResumeRendering

#Since v6.0
Implement to resume current render session
public virtual void ResumeRendering()

SaveImage

#Since v5.14
Saves the rendered image to a file. Does not prompt the user in any way.
public bool SaveImage(
fileName,
Full path to the file name to save to.
saveAlpha
Determines if alpha will be saved in files that support it (e.g., PNG).
)

SetAsyncRenderContext

#Since v6.0
public void SetAsyncRenderContext()

SupportsPause

#Since v6.0
Override and return true if the renderer supports pausing
public virtual bool SupportsPause()
true if pausing is supported, false otherwise