return the camera to Perspective Lens?

hello!
I changed the default state of the camera as follows:
self.lens = OrthographicLens()
self.lens.setFilmSize(20, 15)
base.cam.node().setLens(self.lens)

as the camera back to its previous state? , The PerspectiveLens()

Thanks!

self.lens = PerspectiveLens()
base.cam.node().setLens(self.lens)

Thanks! But the problem remains the same.
my code is:


self.lens = OrthographicLens()
self.lens.setFilmSize(20, 15)
base.cam.node().setLens(self.lens)
self.lens2=PerspectiveLens()
 
def CameraT(self,task):
    if  base.camera.getPos()==Point3(1.5,-2,14):
            base.cam.node().setLens(self.lens)
    else: base.cam.node().setLens(self.lens2)
    return Task.cont     
         

but the camera does not change at all, seems to follow in OrthographicLens()

Thanks for your help!

I suggest putting print statements so you can make sure the code is actually running as you expect.
It is possible the lens is not being changed at all.