Share

Application.cameraChanged Event

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

The cameraChanged event fires immediately after a change in the camera has been made. Camera changes happen when user changes the view by rotating, zooming in or out, panning, changing from parallel to perspective, or when the extents of the viewport changes.

You can add or remove event handlers from the CameraEvent.

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. ---------
# "application_var" is a variable referencing an Application object.
# "application_cameraChanged" is the event handler function.
futil.add_handler(application_var.cameraChanged, application_cameraChanged, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the cameraChanged event.
def application_cameraChanged(args: adsk.core.CameraEventArgs):
# Code to react to the event.
app.log('In application_cameraChanged event handler.')

Property Value

This is an event property that returns a CameraEvent.

Version

Introduced in version December 2017

Was this information helpful?