schiz
April 20, 2009, 3:10pm
1
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…
drwr
April 20, 2009, 3:19pm
2
Oh, hmm, looks like this module has been moved to the “libpandafx” library. Try importing it from there:
from libpandafx import FisheyeLens
David
rdb
April 20, 2009, 3:23pm
3
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?
schiz
April 20, 2009, 3:28pm
4
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.
rdb
April 20, 2009, 3:34pm
5
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.
schiz
April 20, 2009, 3:35pm
6
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?
rdb
April 20, 2009, 3:42pm
7
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.
rdb
April 20, 2009, 4:59pm
8
Yes, I can confirm this was the issue. It will be fixed in the upcoming 1.6.1 release.