Orthographic lens on an alternate graphics buffer

I’m trying to set an orthographic lens for an alternate graphics buffer which is applied to a texture as in the teapot tutorial. I can’t figure out which object to call the setLens() method on, though.

#we now get buffer thats going to hold the texture of our new scene   
altBuffer=mainWindow.makeTextureBuffer("hello", 256, 256)
#now we have to setup a new scene graph to make this scene
altRender=NodePath("new render")

#this takes care of setting up ther camera properly
self.lens = OrthographicLens()

I’ve tried the setLens(lens) method on the altCam object but it returns: AttributeError: ‘libpanda.NodePath’ object has no attribute ‘setLens’

Is this the wrong object or am I possibly doing something else wrong?

Any help would be appreciated, thanks,

The real camera object is altCam.node().

Woot, thank you ynjh_jo that worked.

For anyone reading,

this line: self.altCam.setLens(lens)

should be changed to this line: self.altCam.node().setLens(self.lens)

in the above code.