FisheyeLens

Is it still there or is it just not available on the mac, as I am trying to use it based on a previous posting and I keep getting:

File “pandatest3.py”, line 1, in
from pandac.PandaModules import FisheyeLens
ImportError: cannot import name FisheyeLens

and when I comment this out and use

pandac.PandaModules import*

I get the following:

File “pandatest3.py”, line 20, in SpinCameraTask
fishLens = FisheyeLens()
NameError: global name ‘FisheyeLens’ is not defined

Hence my query…

Oh, hmm, looks like this module has been moved to the “libpandafx” library. Try importing it from there:

from libpandafx import FisheyeLens

David

Actually, doesn’t PandaModules already import that?
In a makepanda build, PandaModules.py contains:

from libpandafxModules import *

which contains:

from libpandafx import *

I’m quite sure makepanda compiles “distort”, as part of pandafx.
Did you use the osx build from the download page?

I just tried the libpandafx module, and it says:

ImportError: No module named libpandafx

I used libpandafxModules, and it says:

ImportError: cannot import name FisheyeLens

I used the build from the download page.

I can confirm - in my makepanda build, it fails to import as well. I’ve checked the lib - the symbols seem to be there (Python wrappers also.).
In the makepanda script, I noticed it set “pandfx” as interrogate -module parameter instead of “pandafx” - I’m going to try and see if fixing that typo fixes the problem.

actually is this a graphics card issue? as CylindricalLens is also not there… in the same format.

There is another posting saying i need to render a normal lens and then distort it?

No, this cannot be a graphics card issue - then it would at least import correctly. It’s a build issue I’m in the progress of fixing. All modules from pandafx (or at least distort) aren’t working.

Yes, I can confirm this was the issue. It will be fixed in the upcoming 1.6.1 release.