NodePath.projectTexture crashes Panda 1.4.2?

Hi again,
I recently switched to Panda 1.4.2 (which by the way gives me extra 10 fps over 1.3.2 with the exact same game. Great work, guys!).
However, when I try to use projectTexture() , python crashes without a warning. Increasing the notify-level doesn’t help, it crashes right before anything helpful could be printed to the console.
Could someone please tell me if there is a way to fix this? The example below causes the crash on 1.4.2 while it runs perfectly on 1.3.2 (on my machine, at least).

import direct.directbase.DirectStart
from import Actor
from pandac.PandaModules import *
from direct.showbase.DirectObject import DirectObject

class World(DirectObject):
	def __init__(self):
		ripple = Actor.Actor('ripple.egg')
		ripple.setPos(0, 5,0)

		proj = render.attachNewNode(LensNode('proj'))
		lens = PerspectiveLens()
		proj.setPos(1.5, -7.3, 2.9)
		proj.setHpr(0, 0, 0)

		tex = loader.loadTexture('maps/envir-reeds.png')
		ts = TextureStage('ts')
		ripple.projectTexture(ts, tex, proj)

w =	World()

Thanks very much, Christof.

It’s already fixed in the latest build, but still I haven’t tried it yet.

Thanks for the hint. It works fine with the 2007.11.28 build.
Is it possible to restrain the projection only to geometry which is in front of the projector? Per default, it projects in both directions. (I want to project a texture on only one wall in a room without having to subdivide the room’s model). Setting the near/far distance of the lens doesn’t have any effect.
Thanks in advance, Christof.

You will probably have to figure out on your own which geometry is in front of the projector, and apply the effect only to that geometry.

I have, however, heard of someone using a 3-D texture to solve this problem automatically. Load your texture as a 1-level 3-D texture. Then make the wrap mode in Z be WmBorderColor, and choose white as the border color. Also be sure to turn off filtering.

The upshot is that the lens will project 3-D coordinates so that Z=0 is at the lens’ near plane, and Z=1 is at the lens’ far plane. Behind the near plane will be Z<0, and beyond the far plane will be Z>1.

Because of your wrap mode and filtering, These colors Z<0 and Z>1 will be painted white, and colors 0 <= Z <= 1 will be painted the meat of your texture.