Need help with C4D Python - Change camera view to camera from editor cam


Hey yall, i’ve run into a wall here.
I’m writing a Python script to generate a new camera with specific settings, and then to change from the default “editor cam” over to the new generated camera.
It’s setting the new camera as the active scene camera, i’m having issues with.
Most likely, i don’t understand “SetSceneCamera”.

I’ve written:
MainCam = c4d.BaseObject(c4d.0camera)


Here it gives an error and says that SetSceneCamera doesn’t apply to a “c4d.CameraObject” object.

Can anyone help me out with this one? Thanks :slight_smile:

MainCam = c4d.BaseObject(c4d.Ocamera)

bd = doc.GetActiveBaseDraw()