Select camera from active vieport

Let's say your active viewport is a camera view,
I was wondering how you select that camera from active viewport by scripting.
Thanks for any help.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture

.

(
	if viewport.getType() == #view_camera do
		activeCam = getActiveCamera()
)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.