Pick, click 'n move and texture movies

YaY! first post in the new section :stuck_out_tongue:

Miel: Great idea about the code snippets.
Bigfoot29 : Good work opening this forum :slight_smile:

Since I already posted it mid thread in another forum, might aswell put it up here where more ppl can use it. A sample thing where I used texture movies for water and point and click movement.

Point 'n click example

For anyone interested, it also contains an alternative to the FMOD sound lib. (audiere with python bindings) I havent documentated the bindings yet though, and havent added positional sound yet either.
Its compiled for windows, so when using linux, switch it off in soundmgr.py (set AUDIERE = True to False)

Hi Yellow,

Thanks very much for the sample!

One thing though is that the islands aren’t textured for me when the program runs. I do get an error message when I run the program that the several image files can’t be loaded, including island.tif. I looked and couldn’t find that file.

Thanks again,


Thanks for the headsup, I uploaded a corrected version. If you still get reports about missing textures, please let me know.

Glad you liked it :slight_smile:

Hi! Another Noob here. I downloaded and run it, but I get the following error. I tried a couple of things to fix it, but my noob brain seems like it doesn’t know enough yet :confused:

Can anybody point me to a solution?

I am using the latest Panda3D version 1.3.2. Thanks! :slight_smile:

NameError: name ‘DirectObject’ is not defined

Are you using the windows version of panda3d or the linux version?
Are you able to run the GreetingCard example?
If in linux, you probably don’t have your path configured correctly.
Type this in you shell: (only in linux, in windows it won’t work)
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/panda3d:/path/to/panda3d/lib:/path/to/panda3d/bin
export PYTHON_PATH=$PYTHON_PATH:/path/to/panda3d:/path/to/panda3d/lib:/path/to/panda3d/bin
(replacing /path/to/panda3d with the path to your panda3d installation, for example /usr/share/panda3d or /usr/local/panda3d)

Hi pro-rsoft, thanks for the reply.

I am using the Windows version and I can run the greeting card, as well as the examples without any problem. Also all the tutorials.

I have even installed and set up PyODE and got the physics demo as on the Forums(can’t remember exactly which post) working.

It is only this example that is giving this error.

Thanks again for the help.

As soon as I have more time, I will go through all the tuts and get myself up to speed - hopefully by them I would be able to help myself. :wink:

I added
from direct.showbase.DirectObject import DirectObject
to Pirates.py and cameraControls.py to get past that error.

Now I get an import error on audiere. I installed the latest version I could find in the Ubuntu repositories but no success.

Ok, forum tells me to set AUDIERE = False in soundmgr.py

now I get:
Traceback (most recent call last):
File “Pirates.py”, line 21, in ?
class Pirates(DirectObject):
TypeError: Error when calling the metaclass bases
module.init() takes at most 2 arguments (3 given)

Try moving the line “from direct.showbase.DirectObject import DirectObject” to the end of the list of import statements in Pirates.py.

The error message means that DirectObject is being imported as a module, not as a class. Since the above line imports DirectObject as a class, it means that you are inadvertently picking up a different definition of DirectObject from some other point, for instance from a different import statement. By moving this line to the end of the import statements, you minimize that probability.


I had that same issue on several downloaded examples.
I always solved it by replacing something like

class fu(DirectObject)


class fu(DirectObject.DirectObject)

ok that worked
Also added
from direct.task.Task import Task
to soundmgr.py

I see a spash screen and hear the pirate theme

:util:bam(error): Bam file is version 5.4.
:util:bam(error): This program can only load version 6.0 through 6.4 bams.
:loader(error): Couldn’t load file models/frigate3-pirate: all matching files on model path invalid (the model path is currently: “.:/usr/share/panda3d:/usr/share/panda3d/models”)

As I understand it from your post here
there is nothing I can do about that.

Right, you’ll have to get the original poster to give you a version with updated bam files, or with egg files instead. Or, you can download and run it with the older version of Panda that it was originally written for.