What to import from PandaModules for OrthographicLens?

The manual does not explicitly say what to import. It mentions the code

lens = OrthographicLens()
lens.setFilmSize(20, 15)

but does not say what to import. I have seen examples of the use of OrthographicLens() and, in all cases, they just use

from pandac.PandaModules import *

What do I have to import from pandac.PandaModules for OrthographicLens so that I do not have to import all?

from pandac.PandaModules import OrthographicLens

Or, using the new panda3d module system:

from panda3d.core import OrthographicLens


Ah, thank you!

from pandac.PandaModules import OrthographicLens

base.cam.setPos( 0, -10, 0 )
base.cam.node( ).setLens( OrthographicLens( ) )
base.cam.node( ).getLens( ).setFilmSize( 5, 5 )

works perfectly.


from panda3d.core import OrthographicLens

did not work for me. I was using Panda3d 1.5.4 and I installed Panda3D 1.7.0 without uninstalling the previous version. I assume that I would need to uninstall the older version to get the new Panda3D module system to work.

Hmm, yes, I would recommend uninstalling Panda completely before reinstalling a new version.