Share

InCanvasRendering.renderComplete Event

Parent Object: InCanvasRendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/InCanvasRendering.h>

Description

The RenderEvent event fires when the rendering has reached the quality that was specified when the rendering started. This event is only fired when using advanced rendering (the isAdvanced property is True). To save the finished rendering, use the saveImage method.

You can add or remove event handlers from the RenderEvent.

Syntax

-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "inCanvasRendering_var" is a variable referencing an InCanvasRendering object.
# "inCanvasRendering_renderComplete" is the event handler function.
futil.add_handler(inCanvasRendering_var.renderComplete, inCanvasRendering_renderComplete, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the renderComplete event.
def inCanvasRendering_renderComplete(args: adsk.fusion.RenderEventArgs):
# Code to react to the event.
app.log('In inCanvasRendering_renderComplete event handler.')

Property Value

This is an event property that returns a RenderEvent.

Version

Introduced in version September 2023

Was this information helpful?